MATLAB: To calculate mean of ROI drawn using freehand tool

cone beamfreehand toolroi

Is there any way to find the mean of the region of interest drawn using 'imfreehand' tool. I could get the mean if I use imcrop tool using 'mean2' syntax, but not when I use freehand tool. Your ideas are welcome.

Best Answer

Approximately
mean(YourImage(poly2mask(YourRoiPolygon)))