# [Image Similarity Based on Histogram] - PowerPoint PPT Presentation

PPT – [Image Similarity Based on Histogram] PowerPoint presentation | free to download - id: 51a63d-MjJmN

The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
Title:

## [Image Similarity Based on Histogram]

Description:

### [Image Similarity Based on Histogram] Wang wan 581 Project Prof. Longin Jan Latecki Image Similarity Pixel based Histogram based Shape similarity Etc. – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 18
Provided by: wwa2
Category:
Tags:
Transcript and Presenter's Notes

Title: [Image Similarity Based on Histogram]

1
Image Similarity Based on Histogram
• Wang wan 581 Project Prof. Longin Jan Latecki

2
Image Similarity
• Pixel based
• Histogram based
• Shape similarity
• Etc.

3
What is histogram?
4
Image Histogram
• If f1, nx1, m ? 0, 255 is a gray value
image,
• then H(f) 0, 255 ? 0, nm is its histogram,
• where H(f)(k) is the number of pixels (i, j) such
that
• f(i, j)k
• If f is a RGB image.
• then we compute Hr(f),Hg(f),Hb(f) seperately
• Example

5
A rgb image I
6
Hr
7
Hb
8
Real Process
• Read and resize all the images into 4-D array
ims.
• Use imhist to compute histograms
• Compute the difference of 2 images using the
formulas
• Display the compare_order graph

9
• Display the compare_order graph
• using function sort and plot
• for k1filenum
• imkims(,,,k)
• res(1,k)imdiff1(imi,imk,bins)
• res(2,k)imdiff2(imi,imk,bins)
• res(3,k)imdiff3(imi,imk,bins)
• res(4,k)imdiff4(imi,imk,bins)
• res(5,k)imdiff4(imi,imk,bins)
• end
• for method_k 15
• y,ind(method_k,)sort(res(method_k,))
• for file_k 1filenum
• ord(method_k,ind(method_k,file_k))file_k
• end
• figure
• end
• figure
• for k 15
• subplot(2,3,k)
• plot(ord(k,))

10
Formulas a,b are two images
• (1)
• (2)
• (3)

For gray-value image , (1) and (3) get the same
result. For rgb image, they are a little
different.

11
• (4) statistic formula
• For pixel_based, this formula get best
result.
• For hist_based, this formula get worst
result.(for hist_based method,

12
• (5)

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
13
Image Database Used
• Database1
• Consists of 100 images.
• 100 shots taken from four different movies
• Images 1-40 Mr. Bean's Christmas
• Images 41-70 Shots from House Tour
• Images 7190 Shots of squares on a desk
• Images 91100 Shots from a Kylie Minogue
interview

14
• Database2
• Consists of 30 images.
• Images 0-9 are images of rose
• Images 10-19 are images with red objects other
than rose
• Images 20-25 are ocean scenes
• Image 26-29 are images of tiger
• Database3
• Consists of 10 images.
• Images 0-4 image of ocean scenes. in fact, they
are same image with different rotating angles
• Images 5-6 other images of ocean scenes

15
Result Analysis
• 1. Hist_based image similarity costs much less
time than pixel_based imge similarity.
• Suppose the width of image is w,
height is h.
• Suppose we compute the histgram of the
image into m bins
• For every formula, if the time costs are
O(n), then hist_based costs O(m), pixel_based
costs O(wh).
• In practice, when we compute the
pic_set1 with formula (1)
• w80, h112, m30
• time of pixel_based method O(80288600)
• time of hist_based method O(900)

16
• 2. Bins of histogram can be less than 255.
• If we divide the histogram into 50 pins,
• the result is almost the same as we
divide the histogram into 255 bins.
• We can even divide the histogram into 20
pins, the result is much the same.
• It doesnt mean that the higher the
number of bin is,the better result is.
• 3. For Pixel_based image similarity test
result.
• The most typical case is in pic_set3, it
get result as good as hist_based methods.
• The formula (5) get the worst result.
• (4)gt(3),(1)gt(2)gt(5)
• 4. For hist_based image similarity test
• In gerneal, the formula (4) get the
worst result.
• (3),(1)gt(5) gt(2) gt(4)

17
• 5. In pic_set1 and pic_set3, hist_based methods
get better result than pixel_based methods.
• Conclusion
• when different pictures have the same
objects but different motion/ position, the
hist_based method is better than pixel_based
methods.
• 6. In pic_set2, pixel _based methods get better
result than hist_based methods.
• Conclusion
• when different pictures have
different objects with the same color, in general
, hist_based is worse than the pixel_based methods