Histogram matching principle is not much to explain, I have also been the MATLAB source rewrite into the C source code, the details can be seen in accordance with the MATLAB Histeq function rewritten under the OPENCV of the histogram prescribed C source code!
The following directly to the source code and run the results:
The source of the desired picture download link is:
Coins.png Http://pan.baidu.com/s/1slilbPF
Rice.png http://pan.baidu.com/s/1cDNVx8
Flower3.jpg http://pan.baidu.com/s/1kUEDw5x
Sea.jpg http://pan.baidu.com/s/1dEEP10t
The source code is as follows:
OPENCV version 2.4.9
//Exchange QQ2487872782
2016-8-4 Day Note: I am sorry, this code is currently not publicly published on the blog, has been deleted, I hope you understand.
Run Result:
-------------------------------------------
Welcome to join the image recognition technology group: 271891601, in addition, especially welcome to Chengdu to engage in image recognition work friends exchange, my QQ number 2487872782