图像均衡以补偿光源 [英] Image Equalization to compensate for light sources

查看:170
本文介绍了图像均衡以补偿光源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我参与了一个图像处理项目,我正在处理人脸问题。但是,在光源位于脸部左侧或右侧的情况下,我面临着图像问题。在那些情况下,图像中远离光源的部分是较暗的。我想更均匀地在图像上分布亮度,从而增加较暗像素的亮度,同时降低过亮像素的亮度。

Currently I am involved in an image processing project where I am dealing with human faces. But I am facing problems with the images in cases where the light source is on either the left or right side of the face. In those cases, the portion of the image away from the light source is darker. I want to distribute the brightness over the image more evenly, so that the the brightness of darker pixels is increased and the brightness of overly bright pixels is decreased at the same time.

我曾使用'伽马校正'技术做同样的事情,但结果并不理想,实际上我想创建一个亮度与光无关的输出换句话说,增加较暗部分的亮度并降低较亮部分的亮度。我不确定我是否正确地复制了问题陈述,但这是一个非常常见的问题,我在网上找不到任何有用的东西。

I had used 'gamma correction' techniques to do the same but the results are not desirable , Actually I want to create an output in which the brightness is independent of the light source, in other words , increasing the brightness of the darker part and decreasing the brightness of the brighter part. I am not sure if I reproduced the problem statement correctly but this is a very common problem and I haven't found anything useful abut this on the web.

1。右侧带光源的图像

2。增加较暗像素亮度后的图像。[img = cv2.pow(img,0.5)]

3。降低亮像素亮度后的图像[img = cv2.pow(img,2.0)]

我正在考虑采用图像2和图3的均值,但正如我们所看到的那样,过亮的像素仍然存在于图3,我想摆脱那些像素,有什么建议吗?

I was thinking of taking the mean of both the images 2 and 3 but as we see that the over bright pixels still persist in the image 3 , and I want to get rid of that pixels, Any suggestion ?

最后我需要一个亮度均匀的图像,并且不依赖于光源。

In the end I need an image with homogeneous brightness, and independent of the light source.

推荐答案

我发现了这篇论文: http://www.mirlab.org/conference_papers/International_Conference/ICASSP%202010/pdfs/0001374.pdf 我认为这完全解决了您的担忧有。

I found this paper: http://www.mirlab.org/conference_papers/International_Conference/ICASSP%202010/pdfs/0001374.pdf i think it exactly addresses the concern you have.

你需要计算一个图像的梯度,即laplacian衍生物,你可以读到它: http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_gradients/py_gradients.html

you will need to compute "gradient" of an image i.e. laplacian derivatives for which you can read up on this: http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_gradients/py_gradients.html

我很想知道你的实施情况。如果你在这里发表评论遇到麻烦,我可以尝试提供帮助。

i'd be very interested to know about your implementation. if you run into trouble post a comment here and i can try to help.

这篇关于图像均衡以补偿光源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆