Comments on: Using ismember with the output of regionprops https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/?s_tid=feedtopost Retired from MathWorks in 2024 after 30 years of service. Can now be found at MATLAB Central, https://hornjourney.com, and https://matrixvalues.com. MathWorks career included image processing, toolbox development, MATLAB development and design, development team management, MATLAB design standards, Steve on Image Processing blog (https://blogs.mathworks.com/steve). Co-author of Digital Image Processing Using MATLAB (https://www.imageprocessingplace.com/DIPUM-3E/dipum3e_main_page.htm). French horn enthusiast, member of Concord Orchestra and Melrose Symphony, member of the board of Cormont Music and the Kendall Betts Horn Camp. Mon, 28 Oct 2019 19:27:31 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Rahul https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24730 Thu, 08 Dec 2011 14:54:09 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24730 Great work. Really very much important ; little little things are explained very very much well…!! thank you so much..!!

]]>
By: Luis https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24724 Sun, 04 Dec 2011 10:21:49 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24724 Hi Steve,
I have an image with big blue blobs, an image with small red blobs and an image with small green blobs. I want to identify blue blobs that have: a) no small blobs, b)green small blobs, c)red small blobs and d) both green and red small blobs; when all 3 images are superimposed. I’ve tried using regionprops centroids but something goes wrong with the loops. Any suggestion? Thank you!

]]>
By: Steve https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24336 Mon, 18 Jul 2011 15:55:27 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24336 Sum—There isn’t an existing Image Processing Toolbox function that will do it for you automatically. To implement it, I would probably dilate the region, use a logical operation to identify the dilated pixels that are not part of the original region, and then use the locations of those pixels to index into a label matrix to find the labels of adjacent regions. I’ll put this on my list of potential blog topics.

]]>
By: sum https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24330 Mon, 18 Jul 2011 04:17:50 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24330 For each labelled region is there a way to find a list of regions which surround the region?

]]>
By: Steve https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24285 Tue, 21 Jun 2011 12:45:11 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24285 Mutlu—See my 21-Jun-2011 post.

]]>
By: Mutlu https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24250 Mon, 30 May 2011 18:00:58 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24250 Hi Steve – I have two images – one contains class labels (one of 1 or 2) and one containing image segment (region) unique IDs. I am trying to use regionprops (or something like regionprops) to figure out most frequently occurring label from the label image per region and generate a new image where each unique region contains this most frequently occurring label. Is there a way to do this? Thank you very much.

]]>
By: Steve https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24201 Fri, 13 May 2011 14:06:29 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-24201 Maria—I assume you mean the mean intensity of pixel values in some other grayscale image, since the mean intensity of binary image objects is 1. If the grayscale image is called A, then this would do the trick:

stats = regionprops(img_bright_bw, A, 'MeanIntensity');
]]>
By: Mayur https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-23994 Sat, 05 Mar 2011 07:04:01 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-23994 Hey I want to calculate the aspect ratios of bounding boxes of different blobs in my binary image. and then retain only those with aspect ratios less than 0.3. How can i do this.

How can i convert the structure array of bounding box to a vector..

]]>
By: Maria https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-23984 Mon, 28 Feb 2011 17:28:08 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-23984 Hi, Steve,

I find 5 objects in a binary image. I can get Centroid values of each object. How do I use the property “MeanIntensity” of regionprops() to calculate each object’s mean intensity?

[L,N]=bwlabel(img_bright_bw);

stats2=regionprops(L,'Area', 'Centroid', 'BoundingBox');
stats2=regionprops(L,'all');
idx = find([stats2.Area] > 50);
ob1=stats2(1).Centroid;

Many thanks!
Maria

]]>
By: Christine https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-23850 Thu, 13 Jan 2011 11:21:39 +0000 https://blogs.mathworks.com/steve/2009/02/27/using-ismember-with-the-output-of-regionprops/#comment-23850 Ah, so the boarder pixels are part of the object, not around it. Thanks Steve!

]]>