this is my code :
nextImage = {}; k = 1; for i = 0:3 nextImage{k} = imread(['a',num2str(i),'.jpg']); nextImage{k} = rgb2gray(nextImage{k}); figure; imshow(nextImage{k});
subtractImage{k} = imsubtract(double(['nextImage',num2str(j)]),(nextImage(0))); figure; imshow(subtractImage{k});
end
Best Answer