This example shows how to enhance the contrast of a grayscale image using the Histogram Equalization block.
Open the Simulink® model.
modelname = 'ex_blkHistEq.slx'; open_system(modelname)
The model reads an input image using the Image From File block. The input image in this example has very low contrast. To enhance the contrast of the input image, the model uses the Histogram Equalization block with these default parameters:
Number of bins:
Run the model and verify the change in contrast from the input image to the output image. For comparison, the model displays the input image and the output image using Video Viewer blocks.