scan through bwconncomp PixelIdxList in another image
Show older comments
Hello. I am working on an image processing project.I have generated a binary image from an image and used the bwconncomp to detect closed contours.
Next I would like to scan each Pixel group in another image and analyse the value that is in them.
gammabin = zeros(size(lens_mask)); % Creating a zero Matrix with image size
gammabin(gammafactor > 0.038) = 1; % Setting my binary limit value
CCgamma=bwconncomp(gammabin); % Generating Closed contour struct
% größte Region identifizieren - das ist die Linse
numPixels = cellfun(@numel,CCgamma.PixelIdxList); Generating %array with number of pixels for every cluster
% Looking for clusters bigger than 25
for i = 1:CCgamma.NumObjects
if numPixels(i) > 25
for j = 1 : numPixels(i)
% This is were I am kind of stuck
end
end
end
4 Comments
KALYAN ACHARJYA
on 21 Nov 2020
May be I can help you. Can you share more detail? It would be easier to understand the question with sample example. What does it means "Pixel group"? Some blockwise perration write or individual pixel.
numPixels(i)?? Is the numPixels is vector?
Image Analyst
on 21 Nov 2020
Please attach the lens_mask image. Please attach some screenshots.
See my Image Segmentation Tutorial:
Ran Mishael
on 24 Nov 2020
Ran Mishael
on 24 Nov 2020
Answers (0)
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!