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.