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

1 visualización (últimos 30 días)
ElizaM
ElizaM el 13 de Sept. de 2022
Respondida: Neha el 7 de Sept. de 2023
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.

Respuestas (1)

Neha
Neha el 7 de Sept. de 2023
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!

Community Treasure Hunt

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

Start Hunting!

Translated by