0% found this document useful (0 votes)
67 views3 pages

Image Comparision

1) The document discusses converting an RGB image to grayscale using the W3C luminance formula, normalizing the data, and performing a 2D correlation on the normalized data. 2) Relative luminance is calculated using a formula that converts RGB values to a grayscale value between 0 and 1. 3) Normalization rescales the data by subtracting the mean and dividing by the standard deviation. 4) 2D correlation can be performed using a fast FFT algorithm or a more accurate shift accumulation method to determine how correlated two input signals or images are.

Uploaded by

Thami K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views3 pages

Image Comparision

1) The document discusses converting an RGB image to grayscale using the W3C luminance formula, normalizing the data, and performing a 2D correlation on the normalized data. 2) Relative luminance is calculated using a formula that converts RGB values to a grayscale value between 0 and 1. 3) Normalization rescales the data by subtracting the mean and dividing by the standard deviation. 4) 2D correlation can be performed using a fast FFT algorithm or a more accurate shift accumulation method to determine how correlated two input signals or images are.

Uploaded by

Thami K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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