defining shape of an image
14 views (last 30 days)
Show older comments
I have an RGB image,I have extracted red,green,blue regions for that image.now i want to extract the shape of that image can u tell how to process please
0 Comments
Accepted Answer
Image Analyst
on 24 Nov 2011
Pat: See my BlobsDemo http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It shows you how to find blobs and then how to use bwlabel() and regionprops() to measure several things about them such as the area, perimeter, centroid, circularity, etc. It then shows you how to apply filters with ismember() to selectively pick out certain blobs, like the nickels or dimes out from all the other coins present. You can string all these measurements together into one array and then you've created yourself a "feature vector" that describes that blob. Different kinds of blobs (blobs that look different) will be different in one or more of the features that you chose to measure.
0 Comments
More Answers (1)
Image Analyst
on 23 Nov 2011
For some arbitrary blob-shaped object, how are you defining "shape"? There are several things you could do but it's important to ask what you're going to do with that information so that you don't make some measurement that is not needed. For example maybe the circularity=(perimeter^2)/(4*pi*area) ratio is fine for your purposes and you don't need to worry about Fourier descriptors or other more complicated things.
3 Comments
Sven
on 24 Nov 2011
You still need to answer Image Analyst's question, Pat. How do you define "shape". You're the only one who knows *what* you want to extract... nobody else does... but they might know *how* to extract it if you actually specified what "shape" actually means.
Likewise for texture.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!