0

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 Answers1

0
  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.

old-ufo
  • 2,799
  • 2
  • 28
  • 40
  • You can read this article: " https://www.google.com.lb/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCkQFjAA&url=http%3A%2F%2Fjacs.usv.ro%2Fgetpdf.php%3Fpaperid%3D12_8&ei=2u_gUvfSHcnN0QWF4YD4Ag&usg=AFQjCNEscc624xfkZT0BL5a-lYAC0fdZFw&sig2=URWk-aSCmQEvRxjhGqDa6w " – Ana-Maria Tannous Jan 23 '14 at 10:34
  • I wait your answer :) – Ana-Maria Tannous Jan 23 '14 at 10:34
  • Much better is not to give paper in comment to answer, but to put important part to the question itself. About paper - first, it looks like not general method, but as a pre-processing stage for one very particular technique. Second, it doesn`t look like good paper. May be, it can improve results of the face recognition for given method, but it does not mean "improves image in general". For example, well known SIFT descriptor is invariant to many transformations, but it does not "improve the image". So the question(s) is the same - what is your goal, what do you want to archive? – old-ufo Jan 23 '14 at 10:46
  • Again "I want to enhance the image" is not definition. What the criterion of the enhacement? Better score is some test? That face recognition? Then I`d download or reimplement original SVD-face recognition and then experimented with preprocessing. Do you have recognition part already work? – old-ufo Jan 23 '14 at 11:06
  • I want enhance the image in terms of illumination and expression variations. Unfortunately, I don't have part that already work :( – Ana-Maria Tannous Jan 23 '14 at 11:07
  • Sorry, I still didn`t get. Do you want to "enhance the image in terms of illumination and expression variations" for face recognition only? Or for more general tasks? Or for purpose "people look at the image and can see more (or better) then original one"? – old-ufo Jan 23 '14 at 11:11
  • No for face recognition only :) – Ana-Maria Tannous Jan 23 '14 at 11:13
  • And do you have methods in order to enhance the image for purpose "people look at the image and can see more (or better) then original one"? – Ana-Maria Tannous Jan 23 '14 at 11:14
  • >No for face recognition only :) Then it is hard - there is no "silver bullet" and as far as I know, almost all methods which improve one thing, make other thing worse. >people look at the image and can see more (or better) then original one"? See paper about contrast I advised you, as well as look at AHE - http://en.wikipedia.org/wiki/Adaptive_histogram_equalization. But the main advice - select one criterion you want to archive, go away from "make it better in general". – old-ufo Jan 23 '14 at 11:30
  • yes but I think that the histogram equalization or even the AHE, are only applied on an image that has a low contrast. So I think that applying the HE or AHE are not considered as improvement techniques for a general image. Can we apply HE and AHE even for images that have good contrast? do you know such a technique that can be applied on images in general ? – Ana-Maria Tannous Jan 23 '14 at 12:05
  • >"But the main advice - select one criterion you want to archive, go away from "make it better in general". Do you think that the denoising process can be general ? – Ana-Maria Tannous Jan 23 '14 at 12:07
  • >Can we apply HE and AHE even for images that have good contrast? - Yes. They haven`t to change a lot. >Do you think that the denoising process can be general ? No,in sense that you have to have definition "what is noise". Look, StackOverflow write me "Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat?" and it is right. I have answered you original question as far, as I can. If you want other answers - make another question. But before it - try to formulate the problem (task) as clear and formal, as you can. No more "general" stuff. – old-ufo Jan 23 '14 at 12:27
  • Unfortunately, I have only 1 reputation, so I don't think that I can move to talk with you by chatting :( . I have a good image, but when I apply the HE to it, the equalized image being not good, but when I apply the AHE, the image remains good. – Ana-Maria Tannous Jan 23 '14 at 12:31