Compute this in matlab code And print out those imagesSoluti
Compute this in matlab code. And print out those images
Solution
clc;
clear all;
close all;
Y = imread(aivazovsky78g.tif);
k=imhist(Y);
f=imbinarize(Y,140);
figure,
subplot(221);imshow(Y);title(\'original image\");subplot(222);imshow(f);title(\'thresholding by140\");
subplot(223);imshow(k);title(\'histogram\");
g=imbinarize(Y,170);
d=imabsdiff(f,g);
figure,
subplot(221);imshow(Y);title(\'original image\");subplot(222);imshow(f);title(\'thresholding by140\");
subplot(223);imshow(g);title(\'thresholding by170\");
subplot(224);imshow(d);title(\'difference\");
run this code it definetely works.

