Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- close all;
- p = imread("Tygrys.bmp");
- I = cv.cvtColor(p,'RGB2XYZ');
- IZ = I(:,:,2);
- th = graythresh(IZ) * 255;
- B = IZ < th;
- imshow(B);
- IG = cv.cvtColor(p,'RGB2GRAY');
- th = graythresh(IG) * 255;
- C = IG < th;
- figure;
- imshow(C);
- D = bitxor(B,C);
- figure;
- imshow(D);
- sum(D(:));
- IMGmean = cv.adaptiveThreshold(IG);
- IMGgaussian = cv.adaptiveThreshold(IG, 'Method', 'Gaussian');
- figure;
- imshow(IMGmean);
- figure;
- imshow(IMGgaussian);
- IMGNgaussian = imnoise(IG, 'gaussian');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement