How to find GLCM of part of (or between 2 concentric circles in) an image?
2 次查看(过去 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.
0 个评论
回答(1 个)
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!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!