DiegoHerrera262/Correlation-Techniques-for-Face-Recognition

Define Normalization Method (COM filter)

Closed this issue · 2 comments

The normalize function was used to try solving problems with brightness and intensity on the picture. But applying the function directly after reading the image gives an error which also appears when trying to implement the normalization to a gray scaled picture.

Using im2double or mat2gray before normalization appears to solve the issue. However, the question about if the normalization should be before or after normalizing arises. For this, i tried three methods:

  • In the first one we normalized before gray scaling which for a random image gives a standard deviation of 0.9988 and after gray scaling the std gives 0.2677
  • For the second we normalized after gray scaling which for a random image gives a standard deviation of 0.9988. Keep in mind that the calculations are made with gray scaled images.
  • Finally in the third one, we apply the im2double function imidietly after reading, but the normalization is done after gray scaling, which gives again a std of 0.9988.

When executing these three methods in our correlation code for a VLC face recognition simulation
the correlation plane appears with some noise in all cases, but also the peak does not look reliable in the methods 2 and 3. The peak for the first method is shorter compared to the original result, whiich could be due to the normalization, however its sharpnes and brightness, is not good.

These are the results mentioned above

Target and Reference Normalized Correlation result- Method 1
Input3 Norm
Normalized Correlation result- Method 2 Normalized Correlation result- Method 3
Norm2 Norm3

It is important to find a better method for normalization

After running the codes with more images it became clear that these bad results were obtain for images with a very darker ilumination in comparison to most of the reference set. That being said, those pictures whose brightness is similar to the majority of the reference set give better results, specially when the subject is not wearing glasses.

Target and Reference Normalized Correlation result- Method 1
InputB NormB
Normalized Correlation result- Method 2 Normalized Correlation result- Method 3
Norm2B Norm3B

Note that for all cases the noise is lower and the peaks are better formed and higher than before. Particulary, methods 2 and 3 (which have in common that normalization is made after gray scaling) are the highest ones. Therefore, a first conclusion would be (again) that is extremly important to define a protocol to take the pictures, and also to have a proper ilumination.