필터 지우기
필터 지우기

can some one help me with this problem. i want each cell separately from this input image. i am uploading the output images which i wants from this input image. you can check the output images in comments. thanks for your time

조회 수: 1 (최근 30일)
  댓글 수: 7
Arshad Ali
Arshad Ali 2018년 12월 3일
some one help me . i want each cell in a separate image from this input image?? i tried different code but not working properly. i upload tge output images above which i wants from this input image. thank you

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2018년 12월 3일
Labelise your image, then extract each unique label:
sourceimage = imread('index.png');
labelimage = bwlabel(sourceimage);
numobjects = max(labelimage(:)); %in R2018b: numobjects = max(labelimage, [], 'all');
objectimages = cell(1, numobjects);
for label = 1:numobjects
objectimages{label} = labelimage == label;
figure; imshow(objectimages{label}); %optional display
end
  댓글 수: 3
Guillaume
Guillaume 2018년 12월 3일
If you're trying to isolate the black blobs instead of the white blobs as in your original then you'll have to invert the imge. bwlabel only detects white blobs. Black is always considered background.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by