Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Low level visual equalization of images

Asked by Jonathan

Jonathan (view profile)

on 3 Apr 2012

Hi all,

I'm conducting an experiment using visual stimuli in an fMRI. It is important that all stimuli have the same low level visual parameters i.e. Contrast and Brightness ( all images are greyscaled)

How can this be done in Matlab?





Jonathan (view profile)


No products are associated with this question.

2 Answers

Answer by Ashish Uthama

Ashish Uthama (view profile)

on 5 Apr 2012
Accepted answer

You could try using histeq to equalize the histogram of two images.

I was about to say its hard to quantify 'contrast' objectively, but decided to search.. and found this. Some of those definitions needs additional specifications like foreground/background which is pretty specific to the types of images you plan to use.


Ashish Uthama

Ashish Uthama (view profile)

Answer by Jurgen

Jurgen (view profile)

on 15 Nov 2012

I'm assuming the resolutions are identical. If images have different content it's hard to give them equal parameters. One could say histogram A is 10% flatter than histogram B and maybe 15% wider. But the surface areas are equal by definition.

If you shape the histograms identically, by definition the contrast and brightness will be equal for both images, but one may look a lot worse than the other (e.g. if equalizing: you may turn 1 'shade' of white on a flower into 5, whereas a rainbow may look more natural).

I happend to see this contribution by Image Analyst:



Jurgen (view profile)

Contact us