Calculating Halarick/GLCM features for just an image segment.
Show older comments
Hello, I have an image mask that I would like to apply to an image. I then want to calculate the Halarick texture features (GLCM features) for just this region. Is this possible? If so, what would the code look like?
I currently have a segmented image that contain my area of interest, but then has a large black region on the outside (see below). I'm worried this large black outside region will give me incorrect texture measurements if I input just this image into a graycomatrix.

I tried using code like:
GLCM = graycomatrix(I(I~=0));
but this doesn't keep the right orientation of the image.
Is there an easy solution? Thanks in advance!
Answers (1)
Image Analyst
on 28 Apr 2015
1 vote
Just use the whole image. Then to get rid of the effect that the zero gray level has, just zero out the first row and first column of the GLCM.
1 Comment
Categories
Find more on Texture Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!