0

I know how to generate a combined image:

STEP1: I = imread('image.jpg');
STEP2: Ibw = single(im2double(I));
STEP3: [U S V] = svd(Ibw); %where  U and S are letf and right odd vectors, respectively, and D the
%diagonal matrix of particular values
% calculate derived image
STEP4:  P = U * power(S, i) * V'; % where i is between 1 and 2
%To compute the combined image of SVD perturbations:
STEP5: J = (single(I) + (alpha*P))/(1+alpha); % where alpha is between 0 and 1

So by integrating P into I , we get a combined image J which keeps the main information of the original image and is expected to work better against minor changes of expression, illumination and occlusions..

I have some questions:

1) I would like to know in details What is the motivation of applying Step3 ? and what we are perturbing here?

2)In Step3, what was meant by "particular values"?

3) The derived image P can also be called: "the perturbed image"?

Any help will be very appreciated!

Christina
  • 903
  • 16
  • 39

1 Answers1

2

This method originated from this paper that can be accessed here. Let's answer your questions in order.

  1. If you want to know why this step is useful, you need to know a bit of theory about how the SVD works. The SVD stands for Singular Value Decomposition. What you are doing with the SVD is that it is transforming your N-dimensional data in such a way where it orders it according to which dimension exhibits the most amount of variation, and the other dimensions are ordered by this variation in decreasing order (SVD experts and math purists... don't shoot me. This is how I understand the SVD to be). The singular values in this particular context give you a weighting of how much each dimension of your data contributes to in its overall decomposition.

    Therefore, by applying that particular step (P = U * power(S, i) * V';), you are giving more emphasis to the "variation" in your data so that the most important features in your image will stand out while the unimportant ones will "fade" away. This is really the only rationale that I can see behind why they're doing this.

  2. The "particular" values are the singular values. These values are part of the S matrix and those values appear in the diagonals of the matrix.

  3. I wouldn't call P the derived image, but an image that locates which parts of the image are more important in comparison to the rest of the image. By mixing this with the original image, those features that you should concentrate on are more emphasized while the other parts of the image that most people wouldn't pay attention to, the get de-emphasized in the overall result.


I would recommend you read that paper that you got this algorithm from as it explains the whole process fairly well.

Some more references for you

Take a look at this great tutorial on the SVD here. Also, this post may answer more questions regarding the insight of the algorithm.

Community
  • 1
  • 1
rayryeng
  • 102,964
  • 22
  • 184
  • 193
  • Firstly, thank you for your response:), so what you wrote in 1) is considered a general explanation of SVD ? In this case: the SVD serves to broke down the image into the product of three matrices: U, S and V. And this decomposition aims to transforming the image to this order: the samples which exhibits the most variations to the samples which exhibits less variations ? Am I right ? – Christina Oct 18 '14 at 07:58
  • 1
    @Christina - Yes, it decomposes your data into the product of three matrices, and there are special properties with `U` and `V`. They basically transform your data so that it sorts the variability of your data into each dimension with the highest variability appearing first. You need to use the singular values in conjunction with each of the columns of either `U` or `V` to determine the basis vectors that describe the variability. What you have explained for the SVD is more or less what it's doing (albeit it being very simplified). This is what I have known the SVD to be doing as well. – rayryeng Oct 18 '14 at 08:00
  • Finally, do you know why we divide by (1+alpha) in step 5 ? thank you in advance :) – Christina Oct 18 '14 at 08:05
  • 1
    @Christina - Yes. If `alpha = 0`, then the output would just be the original image itself. If `alpha = 1`, then you would essentially find the average of the two images. It would add `I` and `P` and divide by 2. Everything else in between `[0,1]` would be considered a light weighting.... so my guess is that `alpha = 1` is an averaging, while `0` is showing the original image, and everything else in between mixes the perturbed image with the original with increasing effects as you increase `alpha`. – rayryeng Oct 18 '14 at 08:13
  • Ah okk, and my final question, what was meant by the "perturbed image" ? – Christina Oct 18 '14 at 08:17
  • @Christina - Oops. I didn't explain that did I? In this sense, perturbed image would be an image where the output has locations that describe what is important and what isn't important. You mix this with the original input image to get the final result (Step #5). – rayryeng Oct 18 '14 at 08:25
  • 1
    Ah okk thank youu so much :) I noticed you are from toronto, I have a lot of friends there :) thank you again for everything :) your are genius – Christina Oct 18 '14 at 08:28
  • 1
    @Christina my pleasure! Good luck!.. And cool! Maybe I'll meet them soon! – rayryeng Oct 18 '14 at 08:39
  • sure :):) I hope that – Christina Oct 18 '14 at 10:23