is there an alternate function for region props
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am detecting an image containing shapes, I have done the fundamental stuff of converting the image to grayscale ... Black n white etc... Now I am extracting the extema property from the region props function to determine the corners of each binary image. Is there an alternate method or function that I can use instead of region props?
0 Commenti
Risposte (2)
Image Analyst
il 27 Set 2014
Depends on what you want to measure. If you want area, you can use bwarea(), but that's also in the Image Processing Toolbox. bwperim() could get you the perimeter length, but again, it's in the IPT. If you don't want to use the IPT, and I'm assuming the reason you're asking is that you haven't purchased it, then you'll have to write your own.
1 Commento
Image Analyst
il 27 Set 2014
If you want to find the max Feret diameter, see the attached demo. The Major Axis length does not give the length of the two most distant points.
Matt J
il 27 Set 2014
Modificato: Matt J
il 27 Set 2014
You could use bwboundaries to get the boundary points. Then use max and min to analyze the extreme points, e.g.,
B=bwboundaries(BW);
B1=B{1};
qmin=min(B1,[],1);
topleft=[qmin(1), min( B1(:,B1(:,1)==qmin(1)) )];
3 Commenti
Image Analyst
il 27 Set 2014
And bwboundaries requires the Image Processing Toolbox, so you might as well use regionprops. What would you do with bwboundaries? You could get the bounding box like Matt showed. Or do you have other plans? What do you want to measure?
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!