使用SVD和小波变换之间的组合的图像增强 [英] Image Enhancement using combination between SVD and Wavelet Transform

查看:277
本文介绍了使用SVD和小波变换之间的组合的图像增强的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是 处理图片上的照明和表情变化 。所以我试图实现一个MATLAB代码,以便只处理图像中的重要信息。换句话说,仅在图像上使用有用信息。要做到这一点,有必要从图像中删除所有不重要的信息。



参考:的本文



让我们看看我的步骤:



1)为了得到一个 histo_equalized_image = histeq(MyGrayImage应用直方图均衡化)



2) histo_equalized_image 。但在此之前要做到这一点,我采用的SVD分解( [LDR] = SVD(histo_equalized_image)),那么这些奇异值是用来做派生图像 J = L * power(D,i)* R 其中 i 在1和2之间变化。



3)最后,派生图像与原始图像结合: C =(MyGrayImage +(a * J))/ 1 + a

4)但是,上述所有步骤在不同条件下都无法正常运行。最后,应该使用小波变换来处理这些变化(我们只使用LL图像块)。低频分量包含有用的信息,同样,不重要的
信息在此组件中丢失。 (LL)组件对于光照变化和表情变化无效。



我写了一个matlab代码,我想知道我的代码是否正确或没有(如果没有,那么如何纠正它)。此外,我有兴趣知道我是否可以优化这些步骤。我们可以改进这种方法吗?



现在看看我的Matlab代码:

 %读取RGB图像
image = imread('img.jpg');

%将其转换为灰度
image_gray = rgb2gray(image);

%将其转换为double
image_double = im2double(image_gray);

%应用直方图均衡化
histo_equalized_image = histeq(image_double);

%应用svd分解
[U S V] = svd(histo_equalized_image);

%计算派生图像
P = U * power(S,5/4)* V';


%线性组合两个图像
J =(single(histo_equalized_image)+(0.25 * P))/(1 + 0.25);

%应用DWT
[c,s] = wavedec2(J,2,'haar');
a1 = appcoef2(c,s,'haar',1); %我只需要LL bloc。


解决方案


  1. 需要定义,你是什么意思是有用或重要的信息。然后才做一些步骤。


  2. 直方图均衡是全局变换,在不同图像上给出不同的结果。你可以做一个实验 - 对图像做histeq,从中受益。然后制作原始图像的两个副本,并绘制一个黑色正方形(图像区域的30%)和第二个白色方形。然后应用histeq并比较结果。





低频组件包含有用的信息,
不重要的信息在此组件中丢失。


真的吗?边缘和形状 - (至少对我来说)很重要的是在高频率。再次,我们需要定义有用的信息。



我看不到理论背景为什么和如何你的方法将工作。你能稍微解释一下,你为什么选择这种方法?



我真的不知道这纸是与你有关的,但建议哪Edges Matter?by Bansal et al。和V.Vonikakis和I.Andreadis的Multi-Scale Image Contrast Enhancement。


My objective is to handle illumination and expression variations on an image. So I tried to implement a MATLAB code in order to work with only the important information within the image. In other words, to work with only the "USEFUL" information on an image. To do that, it is necessary to delete all unimportant information from the image.

Reference: this paper

Lets see my steps:

1) Apply the Histogram Equalization in order to get an histo_equalized_image=histeq(MyGrayImage). so that large intensity variations can be handled to some extent.

2) Apply svd approximations on the histo_equalized_image. But before to do that, I applied the svd decomposition ([L D R]=svd(histo_equalized_image)), then these singular values are used to make the derived image J=L*power(D, i)*R where i varies between 1 and 2.

3) Finally, the derived image is combined with the original image to: C=(MyGrayImage+(a*J))/1+a. Where a varies from 0 to 1.

4) But all the steps above are not able to perform well under varying conditions. So finally, wavelet transform should be used to handle those variations(we use only the LL image bloc). Low frequency component contains the useful information, also, unimportant information gets lost in this component. The (LL) component is ineffective with illumination changes and expression variations.

I wrote a matlab code for that, and I would like to know if my code is correct or no (if no, so how to correct it). Furthermore, I am interested to know if I can optimize these steps. Can we improve this method? if yes, so how? Please I need help.

Lets see now my Matlab code:

%Read the RGB image
image=imread('img.jpg');

%convert it to grayscale
image_gray=rgb2gray(image);

%convert it to double
image_double=im2double(image_gray);

%Apply histogram equalization
histo_equalized_image=histeq(image_double);

%Apply the svd decomposition
[U S V] = svd(histo_equalized_image);

%calculate the derived image
P=U * power(S, 5/4) * V';


%Linearly combine both images
    J=(single(histo_equalized_image) + (0.25 * P)) / (1 + 0.25);

    %Apply DWT
    [c,s]=wavedec2(J,2,'haar');
    a1=appcoef2(c,s,'haar',1); % I need only the LL bloc.

解决方案

  1. You need to define, what do you mean by "USEFUL" or "important" information. And only then do some steps.

  2. Histogram equalization is global transformation, which gives different results on different images. You can make an experiment - do histeq on image, that benefits from it. Then make two copies of the original image and draw in one black square (30% of image area) and white square on second. Then apply histeq and compare results.

Low frequency component contains the useful information, also, unimportant information gets lost in this component.

Really? Edges and shapes - which are (at least for me) quite important are in high frequencies. Again we need definition of "useful" information.

I cannot see theoretical background why and how your approach would work. Could you a little bit explain, why do you choose this method?

P.S. I`m not sure if this papers are relevant to you, but recommend "Which Edges Matter?" by Bansal et al. and "Multi-Scale Image Contrast Enhancement" by V. Vonikakis and I. Andreadis.

这篇关于使用SVD和小波变换之间的组合的图像增强的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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