3.5

3.5 | 6 ratings Rate this file 234 downloads (last 30 days) File Size: 6.94 MB File ID: #22030

Image retrieval - Query by Example Demo

by Theodoros Giannakopoulos

 

08 Nov 2008

Code covered by BSD License  

This demo provides a simple query by image example method, based on HSV values.

Download Now | Watch this File

File Information
Description

Content-based image retrieval is the task of searching images in databases by analyzing the image contents. In this demo, a simple image retrieval method is presented, based on the color distribution of the images. The user simply provides an "example" image and the search is based upon that example (query by image example). For this first version of the demo no relevance feedback is used.

Almost 1000 images have been used for populating the database. For each image a 3-D histogram of it's HSV values is computed. At the end of the training stage, all 3D HSV histograms are stored in the same .mat file.
In order to retrieve M (user-defined) query results, the following steps are executed:

The 3D (HSV) histogram of the query image is computed. Then, the number of bins in each direction (i.e., HSV space)is duplicated by means of interpolation.
For each image i in the database:
Load its histogram Hist(i).
Use interpolation for duplicating the number of bins in each direction.
For each 3-D hist bin, compute the distance (D) between the hist of the query image and the i-th database image.
Keep only distances (D2) for which, the respective hist bins of the query image are larger than a predefined threshold T (let L2 the number of these distances).
Use a 2nd threshold: find the distance (D3) values which are smaller than T2, and let L3 be the number of such values.
The similarity measure is defined as: S(i) = L2 * average(D3) / (L3^2).
Sort the similarity vector and prompt the user with the images that have the M smaller S values.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Zip File Content  
HTML Files documentation.html
Other Files
beach.jpg,
beach2.JPG,
bob.JPG,
compute3DHist.asv,
corc.JPG,
getImageHists.m,
glasgow3.jpg,
images2/,
images2/0-chicago_master.jpg,
images2/0-london_master.jpg,
images2/0412beer2.jpg,
images2/0502_tom_waits_b.jpg,
images2/060921Nirvana3.jpg,
images2/061116_brazil_model_vlrg_10a.widec.jpg,
images2/106-subaru-impreza.jpg,
images2/10770MartinGuitarPortrait.jpg,
images2/14321-Bob (1).jpg,
images2/14980546-14980549-slarge.jpg,
images2/15712__nirvana_l.jpg,
images2/18462115.jpg,
images2/18866984_w434_h_q80.jpg,
images2/1moviebody-trainspotting.jpg,
images2/2005_10_03_pearl_jam.jpg,
images2/2008-subaru-impreza-wrx-hatch-front.jpg,
images2/2008-subaru-wrc-concept-car1.jpg,
images2/2039_03_10---Holliday-Wharf-on-the-Birmingham-Canal-Navigation-_web.jpg,
images2/2_ferrari_fiorano.jpg,
images2/300.madonna.041808.jpg,
images2/300493d-alien-magic-matrix-screen-saver-is-reloaded-by-power-of-neo-and-trinity.jpg,
images2/307wrc_front.jpg,
images2/400px-The_Art_of_Walt_Disney_book_cover.jpg,
images2/5473~Poker-Posters.jpg,
images2/612~SpongeBob-SquarePants-Posters.jpg,
images2/6a00d83451c47869e200e54f1dc8668833-800wi.jpg,
images2/6a4bc3e5f1bd4f32932b8cc585e51510.jpg,
images2/764px-NileCrocodile.jpg,
images2/767062.jpg,
images2/_44898336_german_braz_416_getty.jpg,
images2/a_clockwork_orange_04.263124651_std.jpg,
images2/american-crocodile-emerging-water.jpg,
images2/american-flag.jpg,
images2/apple_logo_rainbow_fruit.jpg,
images2/Argentina-Flag.jpg,
images2/argentina_flag.jpg,
images2/as_roma.jpg,
images2/asterix.jpg,
images2/asterix_13.jpg,
images2/asterixf.jpg,
images2/AsterixObelix.jpg,
images2/Athens+Aerial+1+-+Ampelokipi+-+small800x.jpg,
images2/Athens_Piraeus_harbor_from_Hill_of_Philopappus2_tb_n011501.jpg,
images2/attractive_article.jpg,
images2/basketball photo 2.jpg,
images2/Basketball.jpeg,
images2/beer-glass.jpg,
images2/beer.jpg,
images2/beer1.jpg,
images2/beer4.jpg,
images2/berlin (1).jpg,
images2/berlin (10).jpg,
images2/berlin (13).jpg,
images2/berlin (15).jpg,
images2/berlin (16).jpg,
images2/berlin (17).jpg,
images2/berlin (18).jpg,
images2/berlin (19).jpg,
images2/berlin (2).jpg,
images2/berlin (20).jpg,
images2/berlin (21).jpg,
images2/berlin (22).jpg,
images2/berlin (23).jpg,
images2/berlin (24).jpg,
images2/berlin (25).jpg,
images2/berlin (26).jpg,
images2/berlin (27).jpg,
images2/berlin (28).jpg,
images2/berlin (29).jpg,
images2/berlin (30).jpg,
images2/berlin (31).jpg,
images2/berlin (32).jpg,
images2/berlin (33).jpg,
images2/berlin (34).jpg,
images2/berlin (35).jpg,
images2/berlin (38).jpg,
images2/berlin (39).jpg,
images2/berlin (40).jpg,
images2/berlin (43).jpg,
images2/berlin (45).jpg,
images2/berlin (48).jpg,
images2/berlin (5).jpg,
images2/berlin (50).jpg,
images2/berlin (52).jpg,
images2/berlin (53).jpg,
images2/berlin (54).jpg,
images2/berlin (55).jpg,
images2/berlin (56).jpg,
images2/berlin (57).jpg,
images2/berlin (58).jpg,
images2/berlin (59).jpg,
images2/berlin (6).jpg,
images2/berlin (62).jpg,
images2/berlin (63).jpg,
images2/berlin (64).jpg,
images2/berlin (65).jpg,
images2/berlin (66).jpg,
images2/berlin (67).jpg,
images2/berlin (68).jpg,
images2/berlin (69).jpg,
images2/berlin (7).jpg,
images2/berlin (70).jpg,
images2/berlin (9).jpg,
images2/berlin.jpg,
images2/birmingham-big.jpg,
images2/Birmingham-main_Full.jpg,
images2/birmingham.10.17.05.jpg,
images2/brides_1.jpg,
images2/BX6E-02 Girls Basketball.jpg,
images2/Cairns (1).JPG,
images2/Cairns (10).JPG,
images2/Cairns (11).JPG,
images2/Cairns (12).JPG,
images2/Cairns (13).JPG,
images2/Cairns (14).JPG,
images2/Cairns (15).JPG,
images2/Cairns (16).JPG,
images2/Cairns (17).JPG,
images2/Cairns (18).JPG,
images2/Cairns (19).JPG,
images2/Cairns (2).JPG,
images2/Cairns (20).JPG,
images2/Cairns (21).JPG,
images2/Cairns (22).JPG,
images2/Cairns (23).JPG,
images2/Cairns (24).JPG,
images2/Cairns (25).JPG,
images2/Cairns (26).JPG,
images2/Cairns (27).JPG,
images2/Cairns (28).JPG,
images2/Cairns (29).JPG,
images2/Cairns (3).JPG,
images2/Cairns (30).JPG,
images2/Cairns (31).JPG,
images2/Cairns (32).JPG,
images2/Cairns (33).JPG,
images2/Cairns (34).JPG,
images2/Cairns (35).JPG,
images2/Cairns (4).JPG,
images2/Cairns (5).JPG,
images2/Cairns (6).JPG,
images2/Cairns (7).JPG,
images2/Cairns (8).JPG,
images2/Cairns (9).JPG,
images2/Cairns.JPG,
images2/cartoons.jpg,
images2/CastOfFriends2.jpg,
images2/celtic-glasgow-bhoys-badge-4900861.jpg,
images2/celtic_3_1024x768.jpg,
images2/chicago_skyline2.jpg,
images2/Classical_Guitar.jpg,
images2/Classical_Guitar_two_views.jpg,
images2/clockwork-orange2.jpg,
images2/coltrane4_0.jpg,
images2/coltrane_john.jpg,
images2/Crocodile 471006.jpg,
images2/crocodile jawswp.jpg,
images2/Crocodile.jpg,
images2/crocodile2.jpg,
images2/crocodiles.jpg,
images2/daintree (1).JPG,
images2/daintree (10).JPG,
images2/daintree (11).JPG,
images2/daintree (12).JPG,
images2/daintree (13).JPG,
images2/daintree (14).JPG,
images2/daintree (15).JPG,
images2/daintree (16).JPG,
images2/daintree (17).JPG,
images2/daintree (18).JPG,
images2/daintree (19).JPG,
images2/daintree (2).JPG,
images2/daintree (20).JPG,
images2/daintree (21).JPG,
images2/daintree (22).JPG,
images2/daintree (23).JPG,
images2/daintree (24).JPG,
images2/daintree (25).JPG,
images2/daintree (26).JPG,
images2/daintree (27).JPG,
images2/daintree (28).JPG,
images2/daintree (29).JPG,
images2/daintree (3).JPG,
images2/daintree (30).JPG,
images2/daintree (31).JPG,
images2/daintree (32).JPG,
images2/daintree (33).JPG,
images2/daintree (34).JPG,
images2/daintree (35).JPG,
images2/daintree (36).JPG,
images2/daintree (37).JPG,
images2/daintree (38).JPG,
images2/daintree (39).JPG,
images2/daintree (4).JPG,
images2/daintree (40).JPG,
images2/daintree (41).JPG,
images2/daintree (42).JPG,
images2/daintree (43).JPG,
images2/daintree (44).JPG,
images2/daintree (45).JPG,
images2/daintree (46).JPG,
images2/daintree (47).JPG,
images2/daintree (48).JPG,
images2/daintree (49).JPG,
images2/daintree (5).JPG,
images2/daintree (50).JPG,
images2/daintree (51).JPG,
images2/daintree (52).JPG,
images2/daintree (53).JPG,
images2/daintree (54).JPG,
images2/daintree (55).JPG,
images2/daintree (56).JPG,
images2/daintree (57).JPG,
images2/daintree (58).JPG,
images2/daintree (59).JPG,
images2/daintree (6).JPG,
images2/daintree (60).JPG,
images2/daintree (61).JPG,
images2/daintree (62).JPG,
images2/daintree (63).JPG,
images2/daintree (64).JPG,
images2/daintree (65).JPG,
images2/daintree (66).JPG,
images2/daintree (67).JPG,
images2/daintree (68).JPG,
images2/daintree (69).JPG,
images2/daintree (7).JPG,
images2/daintree (70).JPG,
images2/daintree (71).JPG,
images2/daintree (72).JPG,
images2/daintree (73).JPG,
images2/daintree (74).JPG,
images2/daintree (75).JPG,
images2/daintree (76).JPG,
images2/daintree (77).JPG,
images2/daintree (78).JPG,
images2/daintree (79).JPG,
images2/daintree (8).JPG,
images2/daintree (80).JPG,
images2/daintree (81).JPG,
images2/daintree (82).JPG,
images2/daintree (83).JPG,
images2/daintree (84).JPG,
images2/daintree (9).JPG,
images2/daintree.JPG,
images2/Diega-Maradona.jpg,
images2/disney_baby.jpg,
images2/dracula christopher lee.jpg,
images2/dracula1.jpg,
images2/drinkBeer9.jpg,
images2/dubai (1).JPG,
images2/dubai (10).JPG,
images2/dubai (11).JPG,
images2/dubai (2).JPG,
images2/dubai (4).JPG,
images2/dubai (5).JPG,
images2/dubai (6).JPG,
images2/dubai (7).JPG,
images2/dubai (8).JPG,
images2/dubai (9).JPG,
images2/dubai.JPG,
images2/eisenstaedt_alfred_Marilyn Monroe 1953_L.jpg,
images2/elephant.jpg,
images2/Elephant2.jpg,
images2/england.jpg,
images2/England2.jpg,
images2/eric-clapton.jpg,
images2/eric-clapton_3.Jpg,
images2/eric_clapton.jpg,
images2/ermioni (10).JPG,
images2/ermioni (11).JPG,
images2/ermioni (12).JPG,
images2/ermioni (13).JPG,
images2/ermioni (14).JPG,
images2/ermioni (15).JPG,
images2/ermioni (16).JPG,
images2/ermioni (17).JPG,
images2/ermioni (18).JPG,
images2/ermioni (19).JPG,
images2/ermioni (2).JPG,
images2/ermioni (20).JPG,
images2/ermioni (21).JPG,
images2/ermioni (22).JPG,
images2/ermioni (23).JPG,
images2/ermioni (3).JPG,
images2/ermioni (4).JPG,
images2/ermioni (5).JPG,
images2/ermioni (6).JPG,
images2/ermioni (7).JPG,
images2/ermioni (8).JPG,
images2/ermioni (9).JPG,
images2/ermioni.JPG,
images2/f1-2008-spa-xp-1406.jpg,
images2/FamilyGuyParty.jpg,
images2/ferrari-360-modena-stretched-limo.jpg,
images2/Ferrari10.jpg,
images2/ferrari7.jpg,
images2/ferrari_dino.jpg,
images2/fight_club_front.jpg,
images2/flag-of-scotland.jpg,
images2/flower1.jpg,
images2/flower2.jpeg,
images2/flower2.jpg,
images2/flower3.jpg,
images2/flower4.jpg,
images2/flower5.jpg,
images2/flower6.jpg,
images2/flower7.jpg,
images2/football.jpg,
images2/football1.jpg,
images2/formula1_2.jpg,
images2/friends_wideweb__470x391,0.jpg,
images2/fruit-questions-1.jpg,
images2/fruit.jpg,
images2/fruit_banana.jpg,
images2/fruit_festival_home.jpg,
images2/gallery.cityauto.gr.ferrari.new.jpg,
images2/giannena (1).jpg,
images2/giannena (2).jpg,
images2/giannena (3).jpg,
images2/giannena (4).jpg,
images2/giannena (6).jpg,
images2/giannena.jpg,
images2/glasgow (1).JPG,
images2/glasgow (10).JPG,
images2/glasgow (11).JPG,
images2/glasgow (12).JPG,
images2/glasgow (13).JPG,
images2/glasgow (14).JPG,
images2/glasgow (15).JPG,
images2/glasgow (16).JPG,
images2/glasgow (17).JPG,
images2/glasgow (18).JPG,
images2/glasgow (19).JPG,
images2/glasgow (2).JPG,
images2/glasgow (20).JPG,
images2/glasgow (21).JPG,
images2/glasgow (22).JPG,
images2/glasgow (23).JPG,
images2/glasgow (24).JPG,
images2/glasgow (25).JPG,
images2/glasgow (26).JPG,
images2/glasgow (27).JPG,
images2/glasgow (29).JPG,
images2/glasgow (3).JPG,
images2/glasgow (4).JPG,
images2/glasgow (5).JPG,
images2/glasgow (6).JPG,
images2/glasgow (7).JPG,
images2/glasgow (8).JPG,
images2/glasgow (9).JPG,
images2/glasgow.JPG,
images2/Green_frog.jpg,
images2/illinois-chicago.jpg,
images2/Italian Flag.jpg,
images2/Italy Flag-322x215.jpg,
images2/italy-flag.jpg,
images2/jennifer_lopez.jpg,
images2/jennifer_lopez_pearl_necklace.jpg,
images2/john-lennon.jpg,
images2/john_lennon_portrait.jpg,
images2/juanpablomontoya_imola_mclaren-mercedes_2006_1024.jpg,
images2/kimi-raikkonen-scuderia-ferrari-brazil-f1-wallpaper-1600x1200-photo.jpg,
images2/korinthia (1).JPG,
images2/korinthia (11).JPG,
images2/korinthia (12).JPG,
images2/korinthia (13).JPG,
images2/korinthia (14).JPG,
images2/korinthia (15).JPG,
images2/korinthia (16).JPG,
images2/korinthia (17).JPG,
images2/korinthia (18).JPG,
images2/korinthia (19).JPG,
images2/korinthia (2).JPG,
images2/korinthia (20).JPG,
images2/korinthia (21).JPG,
images2/korinthia (22).JPG,
images2/korinthia (23).JPG,
images2/korinthia (24).JPG,
images2/korinthia (25).JPG,
images2/korinthia (26).JPG,
images2/korinthia (27).JPG,
images2/korinthia (28).JPG,
images2/korinthia (29).JPG,
images2/korinthia (3).JPG,
images2/korinthia (30).JPG,
images2/korinthia (31).JPG,
images2/korinthia (33).JPG,
images2/korinthia (34).JPG,
images2/korinthia (35).JPG,
images2/korinthia (36).JPG,
images2/korinthia (37).JPG,
images2/korinthia (38).JPG,
images2/korinthia (39).JPG,
images2/korinthia (4).JPG,
images2/korinthia (40).JPG,
images2/korinthia (41).JPG,
images2/korinthia (42).JPG,
images2/korinthia (43).JPG,
images2/korinthia (44).JPG,
images2/korinthia (45).JPG,
images2/korinthia (46).JPG,
images2/korinthia (47).JPG,
images2/korinthia (48).JPG,
images2/korinthia (49).JPG,
images2/korinthia (5).JPG,
images2/korinthia (50).JPG,
images2/korinthia (51).JPG,
images2/korinthia (52).JPG,
images2/korinthia (53).JPG,
images2/korinthia (54).JPG,
images2/korinthia (55).JPG,
images2/korinthia (56).JPG,
images2/korinthia (57).JPG,
images2/korinthia (58).JPG,
images2/korinthia (6).JPG,
images2/korinthia (7).JPG,
images2/korinthia (8).JPG,
images2/korinthia (9).JPG,
images2/korinthia.JPG,
images2/kythera (1).JPG,
images2/kythera (10).JPG,
images2/kythera (11).JPG,
images2/kythera (12).JPG,
images2/kythera (13).JPG,
images2/kythera (14).JPG,
images2/kythera (15).JPG,
images2/kythera (16).JPG,
images2/kythera (17).JPG,
images2/kythera (18).JPG,
images2/kythera (19).JPG,
images2/kythera (2).JPG,
images2/kythera (21).JPG,
images2/kythera (22).JPG,
images2/kythera (23).JPG,
images2/kythera (24).JPG,
images2/kythera (25).JPG,
images2/kythera (3).JPG,
images2/kythera (4).JPG,
images2/kythera (5).JPG,
images2/kythera (6).JPG,
images2/kythera (7).JPG,
images2/kythera (8).JPG,
images2/kythera (9).JPG,
images2/kythera.JPG,
images2/lefkada (1).jpg,
images2/lefkada (2).jpg,
images2/lefkada (3).jpg,
images2/lefkada (4).jpg,
images2/lefkada (5).jpg,
images2/lefkada (6).jpg,
images2/lefkada (7).jpg,
images2/lefkada.jpg,
images2/lgsp0039+celtic-club-crest-glasgow-celtic-football-club-poster.jpg,
images2/lisarein-southpark.jpg,
images2/London Is Fading.jpg,
images2/london-big_ben.jpg,
images2/London-BigBen.jpg,
images2/london.jpg,
images2/London1.jpg,
images2/london_10.jpg,
images2/madonna-picture-2.jpg,
images2/madonna300.jpg,
images2/MAN United CS.jpg,
images2/map.jpg,
images2/maradona_04_1755_sq_large.jpg,
images2/marilyn-monroe-skirt.jpg,
images2/marilyn_monroe_laughing.jpg,
images2/matrix.jpg,
images2/matrix3.jpg,
images2/mclaren-2.jpg,
images2/mclaren.jpg,
images2/new york oct 11-thumb.jpg,
images2/new-york.jpg,
images2/new_smurf.jpg,
images2/new_york_1.jpg,
images2/nirvana-dark.jpg,
images2/nirvana1.jpg,
images2/nirvana999.jpg,
images2/Nirvana_field.jpg,
images2/Oakwood+Football+Field+-+Oct.+04+003.jpg,
images2/PANATHINAIKOS.JPG,
images2/panathinaikosbadge.jpg,
images2/pao.jpg,
images2/patra (1).jpg,
images2/patra (10).jpg,
images2/patra (11).jpg,
images2/patra (12).jpg,
images2/patra (13).jpg,
images2/patra (14).jpg,
images2/patra (15).jpg,
images2/patra (16).jpg,
images2/patra (17).jpg,
images2/patra (18).jpg,
images2/patra (19).jpg,
images2/patra (2).jpg,
images2/patra (20).jpg,
images2/patra (21).jpg,
images2/patra (22).jpg,
images2/patra (23).jpg,
images2/patra (24).jpg,
images2/patra (25).jpg,
images2/patra (26).jpg,
images2/patra (27).jpg,
images2/patra (28).jpg,
images2/patra (3).jpg,
images2/patra (4).jpg,
images2/patra (5).jpg,
images2/patra (6).jpg,
images2/patra (7).jpg,
images2/patra (8).jpg,
images2/patra (9).jpg,
images2/patra.jpg,
images2/patrick-bob.jpg,
images2/pearl_jam.jpg,
images2/Pink Floyd - Wish You Were Here - 1a.jpg,
images2/pink-floyd-100.jpg,
images2/pink-floyd-division-bell.jpg,
images2/Pink-Floyd.jpg-1220.jpg,
images2/poker_cards.jpg,
images2/portishea2d.jpg,
images2/portishead.jpg,
images2/Portishead627_180608b.jpg,
images2/portishead_b.jpg,
images2/prespes (1).JPG,
images2/prespes (2).JPG,
images2/prespes (3).JPG,
images2/prespes (4).JPG,
images2/prespes (5).JPG,
images2/prespes (6).JPG,
images2/prespes (7).JPG,
images2/prespes (8).JPG,
images2/prespes.JPG,
images2/purple_chicago_skylineresized.jpg,
images2/retmclar.jpg,
images2/rm2106_1.jpg,
images2/roger_waters.jpg,
images2/roger_waters_Greatphoto.jpg,
images2/sco-flag_s.jpg,
images2/scotland (10).JPG,
images2/scotland (11).JPG,
images2/scotland (12).JPG,
images2/scotland (13).JPG,
images2/scotland (14).JPG,
images2/scotland (15).JPG,
images2/scotland (16).JPG,
images2/scotland (17).JPG,
images2/scotland (18).JPG,
images2/scotland (19).JPG,
images2/scotland (2).JPG,
images2/scotland (20).JPG,
images2/scotland (21).JPG,
images2/scotland (22).JPG,
images2/scotland (24).JPG,
images2/scotland (25).JPG,
images2/scotland (26).JPG,
images2/scotland (3).JPG,
images2/scotland (4).JPG,
images2/scotland (5).JPG,
images2/scotland (6).JPG,
images2/scotland (7).JPG,
images2/scotland (8).JPG,
images2/scotland (9).JPG,
images2/scotland.JPG,
images2/sex-pistols.jpg,
images2/simpsons-31.jpg,
images2/simpsons-cast.jpg,
images2/simpsons-FamilyOnTV_72_1157690316.jpg,
images2/simpsons-schip-page-not-a-hack-say-republicans-mayor-quimby.jpg,
images2/simpsons_marge.widec.jpg,
images2/sm2urfs.jpg,
images2/SmurfIceCream.jpg,
images2/Smurfs-tv-05.jpg,
images2/Smurfs-Wallpaper-the-smurfs-251171_1024_768.jpg,
images2/smurfs.jpg,
images2/soccer.jpg,
images2/SonicYouthPhoto2006.jpg,
images2/sonicyouthum4.jpg,
images2/soundgarden-photo-soundgarden-6224966.jpg,
images2/Soundgarden_1997.jpg,
images2/south-park-goes-online.jpg,
images2/south-park-imaginationland.jpg,
images2/southpark.jpg,
images2/southpark460.jpg,
images2/SouthPark_051230112227534_wideweb__300x325.jpg,
images2/space-statioedit.jpg,
images2/space-station-iss.jpg,
images2/space.jpg,
images2/space_image.jpg,
images2/SpongeBob-standup-01.jpg,
images2/subaru_5.jpg,
images2/The Sex Pistols JOHNNY SING.JPG,
images2/the-sex-pistols-gh-iii-1.jpg,
images2/The-Simpsons-tv-fif80.jpg,
images2/TheMatrixWallpaper800.jpg,
images2/TheSimpsonsWallpaper1024.jpg,
images2/Thumbs.db,
images2/tom&jerry1.jpg,
images2/tom-jerry.jpg,
images2/TomJerry.jpg,
images2/TomJerry2_468x342.jpg,
images2/tomwaits1.jpg,
images2/trainspotting.jpg,
images2/trainspotting460.jpg,
images2/uk-flag.jpg,
images2/unhappy smurf.jpg,
images2/V15Z21_Tom&Jerry_Bal.jpg,
images2/xcor_space_630px.jpg,
images2/zoo (1).jpg,
images2/zoo (10).jpg,
images2/zoo (11).jpg,
images2/zoo (12).jpg,
images2/zoo (13).jpg,
images2/zoo (14).jpg,
images2/zoo (15).jpg,
images2/zoo (16).jpg,
images2/zoo (17).jpg,
images2/zoo (18).jpg,
images2/zoo (2).jpg,
images2/zoo (3).jpg,
images2/zoo (4).jpg,
images2/zoo (5).jpg,
images2/zoo (6).jpg,
images2/zoo (7).jpg,
images2/zoo (8).jpg,
images2/zoo (9).jpg,
images2/zoo.jpg,
images2/Zurich (10).jpg,
images2/Zurich (11).jpg,
images2/Zurich (12).jpg,
images2/Zurich (13).jpg,
images2/Zurich (15).jpg,
images2/Zurich (17).jpg,
images2/Zurich (18).jpg,
images2/Zurich (19).jpg,
images2/Zurich (2).jpg,
images2/Zurich (20).jpg,
images2/Zurich (21).jpg,
images2/Zurich (22).jpg,
images2/Zurich (24).jpg,
images2/Zurich (25).jpg,
images2/Zurich (26).jpg,
images2/Zurich (27).jpg,
images2/Zurich (28).jpg,
images2/Zurich (29).jpg,
images2/Zurich (3).jpg,
images2/Zurich (31).jpg,
images2/Zurich (4).jpg,
images2/Zurich (5).jpg,
images2/Zurich (6).jpg,
images2/Zurich (7).jpg,
images2/Zurich (8).jpg,
images2/Zurich (9).jpg,
images2/Zurich.jpg,
madonna.jpg,
model1Hist.mat,
redflower.jpg,
river2.jpg,
sco-flag_s.jpg,
screen1.jpg,
screen2.jpg,
searchImageHist.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (13)
22 Nov 2008 Harsh Sundani

Thanks a lot for the program....It works great!!.....

I am trying to create a image retrival program for medical images and will be using this code for the program. Could you please help me create my own database(with new image histograms) and storing it in a new .mat file...

19 Dec 2008 Amir abbas  
29 Dec 2008 Nicola Franzoso

Great work Theodoros.
About for create a database of new images i have try with this and work. In my sample the images are 17 from 1 to 17.jpg:

savefile = 'mydatabase.mat';

for numimma = 1:17 % 17 images in my sample
    
    imageName = strcat(num2str(numimma), '.jpg');
    
    % compute 3-D image histograms (HSV color space):
    [Hist, RGBQ] = getImageHists(imageName);
    
    isto = {Hist};
    imshow(RGBQ);
    drawnow
    dataisto(numimma) = isto;
    datafile(numimma) = {imageName};
    
end

save (savefile, 'datafile', 'dataisto')

15 Jan 2009 cqupt cqupt

I has solve it!

15 Jan 2009 kartik

since i am new to matlab,and i am trying to learn all the basics as quick as possible,,

i would like to know how exactly the database is created for images say if i have 10 images,where would i write the program for creating the database in matlab,and if images are in folder then how would i link it
explanation given above in one of the comment is not making me understand it properly

can anybody make this thing clear to me
requesting all the pioneers in Digtial image processing
need help in quick time.

15 Jan 2009 kartik

i am trying to build a image retrival system with information provided for each image ,hence actin as an image based search engine
program works great!!!!!!!!!!!!!!!!!

i would like to know about the deccison threshold used in in the program.on what basis the threshold were set ,how threshold values mentioned in the program were calculated,were they on the basis of intensity value or something else .i would like to undrstand the threshold in program

the threshold given are t=0.010 AND t2=0.8
how were these given and how it was calcualted and compared

24 Feb 2009 Theodoros Giannakopoulos

Hi guys, thanx alot for your comments. Sorry for the looong delay, but I hadn't checked the forum for quite a long time. Anyway, I am posting a simple function that computes the color histograms of a whole directory of images. In this way you will be also able to build your training data. You can use this function and then store the returned histograms (along with the filenames) in a mat file.

Matlab code:

function [Hists, files] = getImageHistsDir(DirName)

D = dir(DirName);

count = 0;

for (i=3:length(D))
    if ((strcmpi(D(i).name(end-3:end), '.jpg')==1) | (strcmpi(D(i).name(end-3:end), '.jpeg')==1))
        count = count + 1;
        [Hists{count}] = getImageHists([DirName '\\' D(i).name]);
        files{count} = [DirName '\\' D(i).name];
        fprintf('%.4d File %40s computed...\n',count,files{count})
    end
end

As you can see, you just specify the directory name in which the images are stored. This is actually what Nicola Franzoso has provided, but in a function mode.

20 Apr 2009 Liviu Vladutu

Try the example with the 'Classical_guitar.jpg'. It fails miserably to find the closest (as resemblance) figure, ie 'Classical_Guitar_two_views.jpg'.
Try: warning off;searchImageHist('Classical_Guitar.jpg', 'model1Hist', 11);

22 Apr 2009 mubashar khan

its k.. managed to solve it!! :-D

22 Apr 2009 mubashar khan

i managed to get the images to be computed however i couldnt get the .mat file saved in a way so that when i used the code from the original to run it, it would jus come up with the error about Nfiles. can any 1 help me out with this? thanks

20 May 2009 ampire Ê

thank you for your code! But I think the code above is not very exact.it's code based on you:
function [Hists,files] = getImageHistsDir(DirName)
D = dir(DirName);
count = 0;
 
for (i=3:length(D))
    if ((strcmpi(D(i).name(end-3:end), '.jpg')==1) | (strcmpi(D(i).name(end-3:end), '.jpeg')==1))
        count = count + 1;
        Hists{count}=getImageHists([DirName '\\' D(i).name]);
        files{count}=[DirName '\\' D(i).name];
        fprintf('%.4d File %40s computed...\n',count,files{count});
    end
end
savefile='mydatabase';
save (savefile, 'files', 'Hists')
Making use of it,you can get imagesdir in your images files.thank you!

05 Oct 2009 Raksha  
24 Oct 2009 mansi verma

image retrieval code is not getting downloaded. its showing an error of invalid archieve. please update it and if possible send a copy to
mansiverma65@gmail.com

thank u!!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
image retrieval Theodoros Giannakopoulos 09 Nov 2008 19:28:12
query by example Theodoros Giannakopoulos 09 Nov 2008 19:28:12
image analysis Theodoros Giannakopoulos 09 Nov 2008 19:28:12
image analysis Cristina McIntire 10 Nov 2008 10:34:52
color Cristina McIntire 10 Nov 2008 10:34:55
color Priyenkha S 26 Dec 2008 20:57:21
color Theodoros Giannakopoulos 10 Jan 2009 15:31:10
color HuangJunFeng HuangJunFeng 20 Mar 2009 08:00:17
image analysis HuangJunFeng HuangJunFeng 20 Mar 2009 08:00:22
image retrieval hrbeu pan 12 May 2009 02:48:53
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com