Calculating Halarick/GLCM features for just an image segment.
3 views (last 30 days)
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!
0 Comments
Answers (1)
Image Analyst
on 28 Apr 2015
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.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!