0

I have an image in a GUI where I draw a ROI. I wish to find the various intensities of pixels with the ROI, and change their color (r, b, g) based on their intensity. How can I do this? Here is the code I use for the ROI.

r = impoly;
mask = createMask(r);
roi = mask .* y{1};
imshow(roi)
idx = find(bw); 
im(idx); 
mean(im(idx)) 
std(im(idx)) 

I hope someone can help me.

  • 2
    You should explain a bit further and post a reproducible code. As far as I can tell your `y` and `bw` are not defined. – myradio Jun 06 '18 at 11:02
  • 1
    show a [mcve] and explain us what specifically are you having problems with. You are computing some means and stds without doing anything with them. Why is that relevant? – Ander Biguri Jun 06 '18 at 11:02
  • I can't post a reproducible code because it is part of a larger gui code, so I can not really put something in here that be run. y is an array of images. bw is not defined, but as far as I could see that is how you write the code to make a roi. It works....I just want to get the intensity of pixels within the ROI area and cannot figure out how to do it –  Jun 06 '18 at 14:02

1 Answers1

0

If it is for visualization only, you could change the colormap. For example:

colormap('hsv')

You can also make a custom colormap.

S Geurts
  • 118
  • 7