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

1 vue (au cours des 30 derniers jours)
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 )

Réponse acceptée

Image Analyst
Image Analyst le 1 Août 2014
Modifié(e) : Image Analyst le 1 Août 2014
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 commentaires
solomon adenew
solomon adenew le 10 Août 2014
thanks for your correction

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by