Some new learning about the image enhancement algorithm.

Source: Internet
Author: User

I recently read another article on the IPOL website, named Multiscale Retinex. I feel that I have basically understood this article, but I still went in and looked at it and got some gains, so I took the time to sort them out. For the original article and its supporting code, see http://www.ipol.im/pub/art/2014 /.

Previously, I have described in detail the basic principles and applications of Multiscale Retinex in my article on the principle, implementation and application of the multi-scale retina enhancement algorithm (MSRCR) with color restoration, I will not describe too much here. To facilitate the expression, we recommend the following basic computing principles:

    

In the above formula, I is the original input image, F is the filter function, generally Gaussian function, N is the number of scales, W is the weight of each scale, generally 1/N, R indicates the output of the image in the logarithm field.

Since R is the output of the logarithm field, to convert it into a digital image, it must be quantified into a digital image category of [0,255]. This quantization algorithm is of great significance, its quality directly determines the quality of the final output image.

At present, there are four methods to deal with the process described in the above article:

First, it is also the easiest thing to think of is direct linear quantization, that is, using the following formula for processing:

In this way, due to the high dynamic characteristics of data processing, the data distribution is very wide and serious polarization may occur, which is generally difficult to obtain satisfactory results.

The second is the Canonical Gain/O sorted set algorithm proposed in the classic MSRCR article "A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes. The calculation formula is as follows:

G and B are empirical parameters.

Third, the Simplest Color Balance (SCR) method mentioned in the above article is similar to the Automatic Color Order in Photoshop, he removes the smallest and largest parts of the data by a certain percentage, and then the middle part is linearly quantified to the range between 0 and 255.

The fourth type is GIMP's Retinex algorithm. For details, see the principles, implementation, and application of the multi-scale retina enhancement algorithm (MSRCR) with color restoration.

Another way is to know the HDR process. He also quantifies highly dynamic data to the visible range of the image. Therefore, he can directly apply such algorithms to this issue. I also did experiments, and the results seem average.

When processing in the second or third method, it is better to have a Color Restoration process, because if the result of MSR processing is quantified directly, the image is usually grayed out as a whole, this is because the range of the original color values after log processing is relatively small, so there is a small difference between the channels, and the subsequent linear quantization is much smoother than the log curve, therefore, the color is lost as a whole.

The correction method is as follows:

          

          

          

 

Among them, Beta = 46, α = 125 is an empirical parameter, but in the end my analysis found that beta could not be so large. Taking 1 test showed that the effect was good.

The HUE of some original images is more reasonable. If the classic MSRCR algorithm is used, the processed images are prone to partial color. In this paper, the image's Intensity data is processed in the chain, then, the data is mapped to each channel based on the original RGB ratio, so that the image can be enhanced based on the original color distribution. This is called MSRCP in this article.

There are already good examples in the Supplementary Code of this algorithm coding thesis. In fact, it is really a very simple job. You need to refer to it by yourself.

I made a comparison between the five algorithms:

Built-in Retinex enhancement algorithm of MSRCRGIMP-Gimp

MSRCRStandard-according to the algorithm written in "A Multiscale Retinex... the Human Observation of Scenes", G = 30, B =-6, β = 1, α = 125

MSRCRSCR-use Color Restoration + Simplest Color Balance algorithm to quantify the result

MSRCPSCR-use Intensity data + Simplest Color Balance algorithm to quantify the result

MSRHSV-perform (SCR Quantization) the value of the V component in the HSV space. The result after the RGB space is returned.

Their effects are compared as follows:

Original MSRCRGIMP MSRCRStandard

MSRCRSCR MSRCPSCR MSRHSV

Original MSRCRGIMP MSRCRStandard

MSRCRSCR MSRCPSCR MSRHSV

Original MSRCRGIMP MSRCRStandard

MSRCRSCR MSRCPSCR MSRHSV

Consider it for yourself.

Algorithm Effect Test: http://files.cnblogs.com/Imageshop/Retinex%E7%BB%BC%E5%90%88.rar

 

I haven't written a blog for a long time, but I don't actually feel the best of Jiang Lang, that is, I don't have the urge to write. Writing is not as serious as it was before. It feels like calculating a flow account. Forget it. Keep your account.

 

* *************************** Basically, I do not provide source code, however, I will try to use text to clearly describe the corresponding algorithm or provide the reference documentation ************************

* ************************************ Because it depends on your own the effort and the effect written in practice are exactly what they are, people must rely on their own *******************

* ************************** Author: laviewpbt time: 2014.6.26 contact QQ: 1664462947 retain the information of the Bank ********************

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.