You are on page 1of 3

Pseudo Code:

1) Get RGB as an array


2) Convert RGB to grey-scale using W3C luminance
3) Normalize data
4) Perform an accurate 2D correlation

Relative Luminance
Relative Luminance is the relative brightness of any point in a
colorspace where 0=black and 1=white
E'Y= 0,299*E'R 0,587*E'G + 0,114*E'B

Normalization
data - data.mean()) / data.std())

2D correlation
The 2D Correlation performs 2D correlation on two input matrices.
Both linear and circular correlation can be computed. Two
computation methods are available: a fast algorithm based on FFT
and an accurate method based on shift accumulation. With a
normalized result, it is easier to tell the degree to which the
two input signals are correlated.
Image Resizing Run time vs. Image Resizing

60 1000
945,57
50 800
% 2D correlation

R un Time in s
40 0%
600
50%
30
75% 400
20 90%

10 200 40,17
8,02 0,15
0 0
1 2 3 4 5 6 0% 50% 75% 90%
Image Image Resizing in %

For speeding up:


Prescreen with 90 % resizing
Main screen with 75 % resizing
Image comparison by cross correlation

120

100

80

60

40

20

0
1 101 201 301 401 501 601 701 801

100 % + 97 % for 76 % for similar looking 100% + 95 % for shifted images,


same images but images, they are not they are not recognized as false
with different expose recognized as false positive negative (unlike FFT, Pearson,
(unlike FFT) histogram comparison et al.)

You might also like