How to find GLCM of part of (or between 2 concentric circles in) an image?

3 次查看(过去 30 天)
The image (greyscale/uint8 type) consist of a black background with the real information in between 2 rings towards the centre. But the GLCMs are calculated for the whole image. If I have to use masking to analyse the ROI, I used:
m1 = drawcircle('Center',[Xcen,Ycen],'Radius',OuterRadius,'Color','blue');
m2= drawcircle('Center',[Xcen,Ycen],'Radius',InnerRadius,'Color','red');
M=m1-m2; % I want area btw these radiuses.
But it doesn't do subtraction like this.

回答(1 个)

Neha
Neha 2023-9-7
Hi Eliza,
I understand that you want to subtract the regions obtained by the "drawcircle" function. You can refer to the code snippet given below:
% Create binary masks for both the regions
mask1=createMask(m1)
mask2=createMask(m2)
intersectionMask = mask1 - mask2
imshow(intersectionMask)
You can also refer to the following documentation link for more information about the "createMask" function:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Image Filtering and Enhancement 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by