320 likes | 469 Views
Image indexing and retrieving using histogram based methods. 03/7/15 è³‡å·¥ç ”æ‰€ 陳慶鋒. Outline. Histogram based methods Image retrieval using the three methods Experimental result Library of Image formats Future work References. Histogram based features. Color Histogram Histogram Refinement
E N D
Image indexing and retrieving using histogram based methods 03/7/15 資工研所 陳慶鋒
Outline • Histogram based methods • Image retrieval using the three methods • Experimental result • Library of Image formats • Future work • References
Histogram based features • Color Histogram • Histogram Refinement • Color Correlogram
Color histogram • For a nn with m colors image I, the color histogram is where p為屬於I的pixel, I(p)為其顏色 , ,for
Color histogram (cont.) • Advantages -trivial to compute -robust against small changes in camera viewpoint • Disadvantages -without any spatial information
Histogram refinement The pixels of a given bucket are subdivided into classes based on local feature. Within a given bucket , only pixels in the same class are compared. The local feature which this paper used: Color Coherence Vectors(CCVs)
Histogram refinement (cont.) • CCVs For the discretized color ci, the pixels with color ci are coherence if the number of connected component>= , indicated as ci, otherwise are incoherence, indicated as ci, and total pixel with color ci= ci+ ci, a threshold is defined as the condition of coherence or not for color j, the coherence pair is (ci, ci)
Histogram refinement (cont.) • Example
Histogram refinement (cont.) • Example(cont.)
Lable A B C D E Color 1 2 1 3 2 Size 12 15 3 1 5 Histogram refinement (cont.) • Example(cont.)
Color 1 2 3 α 12 20 0 β 3 0 1 Histogram refinement (cont.) • Example(cont.)
Color correlograms • A table indexed by color pairs, where the k-th entry for color pair <i, j> specifies the probability of finding a pixel of color j at a distance k from a pixel of color i in the image. The correlogram is 1 0 0 1 1 1 1 1 1
Color correlograms(cont.) The autocorrelogram is
Color correlograms (cont.) • Example
Color correlograms (cont.) • Example(cont.)
Color correlograms (cont.) • Example(cont.)
Image retrieval using the three methods • Similarity measure -L1 distance similarity -relative distance • Performance measure -ranking measure
Similarity measure • L1 distance similarity Sim() Sim(I,I’)愈大,兩張圖的相似度愈高
Similarity measure(cont.) • Relative distance 愈小,兩張圖的相似度愈高
Performance measure • Ranking measures 令 為query images的集合,Q’i為Qi的 answer image r-measure: average r-measure: p1-measure: average p1-measure:
Experimental result • Experimental setup -Image database of 180 gray level images with size 192x128 -Quantize gray level to 16 bins -Set of CCV as 1500 -Set d of autocorrelogram as 30 -A query set which consists 25 query images and 25 answer images
Experimental result(cont.) • Results similarity hist: 1 ccv: 1 auto: 1 relative distance hist: 1 ccv: 1 auto: 1 similarity hist: 32 ccv: 26 auto: 44 relative distance hist: 33 ccv: 38 auto: 31
Experimental result(cont.) • Results(cont.) similarity hist: 41 ccv: 11 auto: 77 relative distance hist: 10 ccv: 3 auto: 7 similarity hist: 55 ccv: 26 auto: 80 relative distance hist: 2 ccv: 10 auto: 1
Similarity Relative distance Color histogram Color histogram ccv ccv auto auto r-measure r-measure 266 155 185 203 387 133 avg r-measure avg r-measure 6.2 10.64 8.12 7.4 5.32 15.48 p1-measure p1-measure 15.27 15.77 14.53 14.68 16.54 15.57 avg p1-measure avg p1-measure 0.61 0.63 0.59 0.58 0.66 0.62 Experimental result(cont.) • Results(cont.) performance measure in similarity and relative distance
Similarity Relative distance Color histogram Color histogram ccv ccv auto auto r-measure r-measure 266 155 185 203 387 133 avg r-measure avg r-measure 6.2 10.64 8.12 7.4 5.32 15.48 p1-measure p1-measure 15.27 15.77 14.53 14.68 16.54 15.57 avg p1-measure avg p1-measure 0.61 0.63 0.59 0.58 0.66 0.62 Experimental result(cont.) • Results(cont.) performance measure in similarity and relative distance
Experimental result(cont.) • Factors which affect performance - choice of image database - choices between query images and answer images - of CCV - d of color autocorrelogram
Library of Image formats • Include: imgdata.h • Formats: pgm, jpg, png, bmp • We can get: width, height, and raw data
Library of Image formats(cont.) • Functions GetPGM(char, int*, int*, unsigned char**) GetPNG(char, int*, int*, unsigned char**) GetBMP(char, int*, int*, unsigned char**) GetJPEG(char, int*, int*, unsigned char**)
Library of Image formats(cont.) • Example int width, height unsigned char* data GetJPEG(“1.jpg”, &width, &height, &data)
Future work • Image indexing and retrieving of color images (debugging) • Further study
References • [1] M. Swain and D. Ballard, “Color indexing,” International Journal of Computer Visioin, 7(1):11-32, 1991 • [2]G. Pass and R.Zabih, “Histogram refinement for content based image retrieval,” IEEE Workshop on Applications of Computer Vision, pp.96-102, 1996 • [3] G Pass and R. Zabih, “Compare images using color coherence vectors,” Applications of Computer Vision, 1996. WACV '96., Proceedings 3rd IEEE Workshop on , 2-4 Dec 1996 , Page(s): 96 -102 • [4] J. Huang, S. R. Kumar, M. Mitra, W. J. Zhu, and R.Zabih, “Image indexing using color correlograms,” Conf. Computer Vision and Pattern Recognit., pp.762-768,1997