how to calculate the mean for foreground and background of an image?

1 view (last 30 days)
i want to calculate the Contrast improvement index of an image.i used the command imfreehand for foreground selection(to select the ROI) and used mean2() command for mean calculation.then calculated the Contrast which is given as C= f-b/f+b.f and b is the mean of foreground and background.i want to get values like 5.0999 but i get 1.0876 like this.is the procedure i performed correct?..An one please help me with the procedure or calculating the mean grey value of foreground and background of an image.

Answers (0)

Community Treasure Hunt

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

Start Hunting!