study of properties of different regions in an image

5 views (last 30 days)
Hi, I'm a student and I need some help with my programm. I'm doing a program with which you can process a greyscale image, reduce noise and change the contrast. I can do this in the whole image or select a number of region and process (in case I would process only a region (or 2,3...)). I did the process of different using a binary mask (one different in each case) and the instruction "roifilt2", and works well. My doubt came later, after I process my image (or the differents region that I chose) I want to study some different properties (intensity of pixel, area, ecc...). I used "regionprops" (with the image turned in a binaryimage like a mask) and works well with the whole image, but when I try to study the properties of different region (that I chose) in my image, I don`t know how. I can't use my own binary mask and study only the region that I selected with regionprops because I get only the properties of the binarymask, and I can't used "roifilt2" how a thought... Somebody could give me any idea about how solve that? Exist any function with which I could use my own function only in some regions like roifilt2?

Accepted Answer

Image Analyst
Image Analyst on 4 Jun 2014
Use your existing binary image to mask out just the region you want, like
thisBinaryImage = maskOfOneRegion .* binaryImageOfAllRegions;
labeledImage = bwlabel(thisBinaryImage);
measurements = regionprops(labeledImage, 'area');
  1 Comment
Maria
Maria on 10 Jun 2014
Thank you!! I was working these days with your solution and finally this part of my program works well!! Thanks for your help!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!