How to find GLCM of part of (or between 2 concentric circles in) an image?
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Neha
on 7 Sep 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!
0 Comments
See Also
Categories
Find more on Image Filtering and Enhancement in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!