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

4 ビュー (過去 30 日間)
ElizaM
ElizaM 2022 年 9 月 13 日
回答済み: Neha 2023 年 9 月 7 日
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 Center および File ExchangeImage Filtering and Enhancement についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by