Monday 25 October 2021

FPGA HDL Implementation of Contrast Limited Adaptive Histogram Equalization (CLAHE)U sing Simulink

This example shows how to implement a contrast-limited adaptive histogram equalization (CLAHE) algorithm using Simulink® blocks. This is an image contrast enhancement algorithm that overcomes limitations in standard histogram equalization (HE). %CLAHE Algorithm modelname = 'CLAHEExample'; open_system(modelname,'force'); set_param(modelname,'SampleTimeColors','off'); set_param(modelname,'Open','on'); set_param(modelname,'SimulationCommand','Update'); set(allchild(0),'Visible','off'); %Tile Generation system = 'CLAHEExample/CLAHEHDLAlgorithm/tileGeneration'; open_system(system,'force'); %Histogram Equalization Pipeline system = 'CLAHEExample/CLAHEHDLAlgorithm/histoEqPipeline/'; subsystem = [system 'histPipe1']; open_system(subsystem,'force'); %The remaining total excess value is passed to the Redistribute subsystem as excess value. system = 'CLAHEExample/CLAHEHDLAlgorithm/histoEqPipeline/'; subsystem = [system 'histPipe1/redistribute']; open_system(subsystem,'force'); %The bilinear interpolation equation to compute a pixel value in the output image. system = 'CLAHEExample/CLAHEHDLAlgorithm/bilinearInterpolation'; open_system(system,'force'); Simulink Model : Contrast – Limited Adaptive Histogram Equalization  The input image frame is converted to a pixel stream and pixelcontrol bus using a Frame To Pixels block.  The adjusted pixel values are given to the Pixels To Frame block and converted to a frame using the control signals.  The pixel value read from the imgBuffer subsystem is passed to CLAHEHDLAlgorithm for adjustment.  The pixel stream is passed to the CLAHEHDLAlgorithm subsystem for contrast enhancement and is also stored in the imgBuffer subsystem.  While processing, the CLAHEHDLAlgorithm subsystem generates the address to read image data from the imgBuffer subsystem. The Result subsystem shows the input image and output image once all the pixels in the frame have been received by the Pixels To Frame block. Click here to download the simulink file: https://drive.google.com/file/d/1ktc0B7Ov0P9XMGCs-eTIGjWNvfuOK3ZI/view?usp=sharing




Uploaded Matlab Videos