How can i extract the component H of only the region of interest?

1 回表示 (過去 30 日間)
Tomas
Tomas 2012 年 11 月 12 日
Hello
To calculate the difference between the value h of an image and values from tab, I used these lines.
h=HSV(:,:,1);
d = abs(h - tab(i,1));
Now how can i extract the H of only the region of interest because I want to calculate the difference between the value h of only the region of interest of the image and the values from tab. knowing that bw is the binairy mask of the segmented image. thanks

回答 (1 件)

Image Analyst
Image Analyst 2012 年 11 月 13 日
You can do this
maskedDifferences = d(bw);
  5 件のコメント
Tomas
Tomas 2012 年 11 月 14 日
using whos bw, I get
Name Size Bytes Class Attributes
bw 498x750 2988000 double
To get this image, I used
bw=zeros(L,C);
if (some instructions)
bw(i,j)=1;
Image Analyst
Image Analyst 2012 年 11 月 15 日
bw = logical(bw);

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by