Hello, I have problem with displying one image of several objects that was earlier labeled. Here's a code:
close allclear allOrginal_img=imread('Orginal_img.png');Label_img = bwlabel((Orginal_img),8); disp(' ')disp(['Number of objects in picture: ' int2str(max(max(Label_img)))]);%it's 27 objects
disp(' ')figureimshow(Label_img);title('Obraz ety');i=1;a=1:i:27;for object_nr=a Object_img = Label_img == object_nr; FD=imFeretDiameter(Object_img); disp(['Feret Diameter: ' num2str(FD)]);if FD>120All_objects_img=immultiply(imcomplement(Object_img),imcomplement(Object_img+1));figureimshow(All_objects_img,'InitialMagnification','fit')title('All objects imgage')elseendend
After labeling I callculated Feret Diameter to remove objects that are not thick and long enough. My problem is that i want to display now all other objects (that were not removed) in one image. I know that I have to multiply all pictures that are consistent with condition (FD>120) but it doesn't work. Please help and thank you in advance. Here's a picture (Orginal_img)
Best Answer