Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Similarity Presented By: Ronak Patel Guided By: Dr. Longin Jan Latecki.

Similar presentations


Presentation on theme: "Image Similarity Presented By: Ronak Patel Guided By: Dr. Longin Jan Latecki."— Presentation transcript:

1 Image Similarity Presented By: Ronak Patel Guided By: Dr. Longin Jan Latecki

2 Pixel Based Image Similarity Typically, done by computing, for each image, a vector containing the values of an attribute and computing the distance between image feature vectors. Here we have considered the color: Red, Green and Blue. Color Image is a 3-D Matrix, and we can represent it with three 2-D Matrices: - Red color intensity for each pixel - Green color intensity for each pixel - Blue color intensity for each pixel We then compare the three matrices with the corresponding matrices of the other image. Compared using 5 methods, get a similarity measure for the three colors: Red, Green, Blue and all the three. Compare the resulting measure to a similar measure of another image.

3 Pre-processing Resize: In order to compare two pictures, we have to have image matrices of same size. Retrieve the three 2-D matrix for each color from the 3-D image matrix. Get the vector form for each matrix

4 Comparison Method I Let f and g be two matrices representing a particular color intensity of an image. A measure of similarity is the Euclidean Distance between two images is: function im_1=scale1(im11d,im21d) im = (im11d - im21d).* (im11d-im21d); im = sum(im); im_1=sqrt(im); return;

5 Let c(a,x,y) be a particular color value of the pixel (x,y) in image ‘a’. The measure of similarity is the Manhattan Distance: Comparison Method II function im_2= scale2(im11d,im21d) im_2= sum(abs(im11d - im21d)); return;

6 Comparison Method III Another measure of similarity is: function im=scale3(im11d,im21d) im = (im11d - im21d).* (im11d-im21d); im = sum(im); return;

7 Comparison Method IV We can use statistical mean and variance to add stability to pixel to pixel image difference: function spd = scale4(im11d,im21d) d_abxy=im11d-im21d; if(d_abxy ==0) spd =0; else d_ab=sum(d_abxy)/8960; sd=sum((d_abxy-d_ab).*(d_abxy-ab))/8959; spd=abs(94.657*d_ab/sqrt(sd)); end return;

8 Comparison Method V Let v(a) be a vector of all c(a,x,y) values assigned to all pixels in the image a. Image similarity can be expressed as normalized inner products of such vectors. Since it yields maximum values for equal frames, a possible disparity measure is: function imd5=scale5(imd11, imd21) imd_dot = imd11 * imd21'; imd_norm = norm(imd11)* norm(imd21); imd5 = 1-(imd_dot/imd_norm); return;

9 Image Database Consists of 100 images. 100 shots taken from four different movies Images 1-40 : Mr. Bean's Christmas Images 41-70: S hots from House Tour Images 71:90: Shots of squares on a desk Images 91:100: S hots from a Kylie Minogue interview

10 Results Input an index no. Gives me Results, sorted out with the most similar image first. Outputs a retrieval plot: original image vs sorted result

11 Image query: 40 (house tour) Result by method I

12

13 Results Method 1 and Method 3, give almost similar results. Method 2 gives less accurate results than Methods 1 and 2 because these methods seem to amplify the differences. Method 5 does not give as good results as expected. Method 4, is the best and gives very good results, close to human perception. It is also similar to the hist-based results. This is because, in the picture dataset I am working with, there is a lot of pixel-based difference due to the difference in position of the objects due to motion. Methods 1 and 3 (pixel differences) give good results when there is not much of relative pixel changes.


Download ppt "Image Similarity Presented By: Ronak Patel Guided By: Dr. Longin Jan Latecki."

Similar presentations


Ads by Google