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

3 Ansichten (letzte 30 Tage)
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 )

Akzeptierte Antwort

Image Analyst
Image Analyst am 1 Aug. 2014
Bearbeitet: Image Analyst am 1 Aug. 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 Kommentare

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by