I would like to know how to extract shape features like area,perimeter ,eccentricity,symmetry distance in Matlab.Do i need to convert the colour image into grayscale for doing this calculation.Or is the calculation done in the pre-processed segmented image.

 採用された回答

Image Analyst
Image Analyst 2015 年 11 月 21 日

0 投票

You need to first segment the image to get a binary image then you can call regionprops(). Whether you call rgb2gray() or just extract one of the RGB color channels, or use rgb2hsv() or rgb2lab(), or PCA or something else really depends on your image and what you need to find in it. Post your image(s) if you want more advice.

6 件のコメント

Aswathy Gopan
Aswathy Gopan 2015 年 11 月 25 日
編集済み: Aswathy Gopan 2015 年 11 月 25 日
Thank you for your answer.I have attached the image of which i want to extract the shape features like area, compactness,perimeter .The image is acually segmented one.I have few doubts like when i convert a segmented image from rgb2hsv or rgb2lab,and calculate its area,perimeter etc does it have same value or will the values change for the different colour spaces
Image Analyst
Image Analyst 2015 年 11 月 25 日
Yes, you can try to use a different color space. Then pick the channel which provides the best contrast. Then threshold it and use the techniques I show you how to measure what you need to measure in your images. Do you want to learn how to do it yourself? Or do you want me to do it for you (sorry, I can't)?
Aswathy Gopan
Aswathy Gopan 2015 年 11 月 25 日
Thank you for your comment,i want to do it by my self ,otherwise how come i learn the process.I just need a guidance whenever i am stuck in between.Ok let me try it and i will seek your help if i got any doubt.
Image Analyst
Image Analyst 2015 年 11 月 25 日
I have some color segmentation demos in different color spaces in my File Exchange. You can try one of those and tweak it for your specific color images.
Dileep Kumar Kothamasu
Dileep Kumar Kothamasu 2018 年 3 月 17 日
can someone attach the code for shape feature extraction?
Image Analyst
Image Analyst 2018 年 3 月 17 日

サインインしてコメントする。

その他の回答 (1 件)

junnie vix
junnie vix 2017 年 3 月 21 日

0 投票

I am using SURF to extract shape in matlab. I don't have any idea how to start it. Any helpful guidance or reference?

Community Treasure Hunt

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

Start Hunting!

Translated by