Calculating Halarick/GLCM features for just an image segment.
조회 수: 8 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Image Analyst
2015년 4월 28일
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.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!