Hello !
I have some difficulties with my program.
I would like to compare the area of some regions from a image with the area of regions from another image. I also would like to show the 1st image, only if the area is smaller than the area of the other image.
For example, cc1 = bwconncomp(Image1); % binary image
cc2 = bwconncomp(Image2);
stats1 = regionprops(cc1, 'Area'); %collects param
Area1 = [stats1.Area];% transfer area param
stats2= regionprops(cc2, 'Area');
Area2 = [stats2.Area];
idxArea = find(Area2 > Area1);
MatrixClean = ismember(labelmatrix(cc2), idxArea);
figure, imshow(MatrixClean), title('final image');
Someone can help me ? please ! I have this error : "Matrix dimensions must agree" but I don't know how to do that.
Have a nice day !
Best Answer