How can i calculate the texture of the soap only on the picture below

3 次查看(过去 30 天)
I want to calculate the texture properties of The soap only, but when I use the code below it Calculates the texture of the whole image. I have also tried to use regionprops but regionprops doesn’t have the properties for texture Please Help Me
soap105.jpg
RGB=imread('soap105.jpg'); RGB=imresize(RGB,[160 190]); I=rgb2gray(RGB); . After some gray level enhancement . I2=graycomatrix(I) I3=graycoprops (I2, all )

采纳的回答

Image Analyst
Image Analyst 2014-8-1
编辑:Image Analyst 2014-8-1
It looks like graycomatrix takes a rectangular matrix so you'll just have to find the smooth areas and zero them out. Then calculate graycomatrix and do your own stats to ignore the zero parts. See attached code that finds the smooth areas.
Of course your best course of action is to just make sure there is no soap dust on the sample in the first place. It's always easier to make sure you start with a good image before image capture than to fix it post-capture in software.
  11 个评论

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by