How can I specificy regions of interest on an image and return the index of the pixels in that ROI?

2 views (last 30 days)
Hi guys.
Here is my problem: I have coordinates of cells that I need to plot on image files. I then need to create circular regions of interest around these coordinates and measure the cell intensity in these regions of interest. I am not sure how to create the circular ROI around the coordinates and measure intensity of the ROI as I am new to Matlab and have never used ROI functions/worked with images in great detail. Looking forward to hearing responses. Thank you.

Answers (1)

Image Analyst
Image Analyst on 17 Jul 2014
Create a binary image (a mask) using the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F
Then get the values in the circle like this:
pixelsInCircleMask = grayImage(circleMask); % A 1D vector of gray levels.
meanGL = mean(pixelsInCircleMask); % In case you want the mean.

Community Treasure Hunt

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

Start Hunting!