Image Search - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Image Search

Description:

Image Search. Implementation Results. Ken Schmidt. Some Implementation Problems ... Which DB values to search. Retrieve images whose mean or moment values are ... – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 11
Provided by: Ken662
Category:
Tags: image | search

less

Transcript and Presenter's Notes

Title: Image Search


1
Image Search
  • Implementation Results
  • Ken Schmidt

2
Some Implementation Problems
  • The server changed the path to the SQL tag
    library
  • lt_at_ taglib uri"/jccrsrc/misc/jakarta-taglib/dbtag
    s.jar" prefix"sql" gt
  • vs
  • lt_at_ taglib uri"http//jakarta.apache.org/taglibs/
    dbtags" prefix"sql" gt

3
More Implementation Problems
  • File format to upload image is MultipartRequest
    Stream, format needed for PixelGrabber is Toolkit
    Image, no conversion available
  • Path problems implementing pixelGrabber
  • //load the just stored file as an Image object
  • Toolkit toolkit Toolkit.getDefaultToolkit()
  • Image img toolkit.getImage ( new java.net.URL
  • ( "http//www.mycgiserver.com/kenwschmidt/search
    /" outfile ) )
  • //wait for entire image to be loaded before
    proceeding
  • MediaTracker mediaTracker new MediaTracker (
    new Frame ( ) )
  • mediaTracker.addImage ( img, 0 )
  • mediaTracker.waitForID ( 0 )
  • // out.println ("ltpgtwidth of Image
    "img.getWidth(null)
  • // "lt/pgtltpgtheight of Image "img.getHeight(nu
    ll) "lt/pgt")
  • //put the Image pixels in the pixels array
  • PixelGrabber pg new PixelGrabber(img, 0, 0,
    width, height, pixels, 0, width)
  • try
  • pg.grabPixels()

4
Calculating Pixel Values for DB
  • Run through pixel array twice, once to obtain the
    mean
  • Second time to calculate moments
  • redSum2 Math.pow ( ( red - redMean ), 2 )
  • greenSum2 Math.pow ( ( green- greenMean ), 2
    )
  • blueSum2 Math.pow ( ( blue-blueMean ), 2 )
  • redSum3 Math.pow ( ( red - redMean ), 3 )
  • greenSum3 Math.pow ( ( green- greenMean ), 3
    )
  • blueSum3 Math.pow ( ( blue- blueMean ), 3 )
  • redSum4 Math.pow ( ( red - redMean ), 4 )
  • greenSum4 Math.pow ( ( green- greenMean ), 4
    )
  • blueSum4 Math.pow ( ( blue- blueMean ), 4 )
  • Then enter all values into DB

5
Now to Search the DB
  • Three steps
  • View all Items in the DB, Select one to match
  • Enter search criteria
  • Percent deviation from mean and moment values
  • Which DB values to search
  • Retrieve images whose mean or moment values are
    within the limits
  • Calculate the upper and lower limits of each
    value (1 ? ( deviation /100 ) )
  • Select images within the limits
  • select from search where OVERALLMEAN BETWEEN
    ltoverallMeanDowngt AND ltoverallMeanUpgt

6
Some ResultsWhich Search Methods Worked?
CM-Color Mean GM-Grayscale Mean C2-Color Second
Moment G2-Grayscale Second Moment
7
More ResultsWhich Search Methods Worked?
8
More ResultsWhich Search Methods Worked?
9
More ResultsWhich Search Methods Worked?
10
Conclusions
  • In each case, taking pixels grouped by color
    seemed to produce better results than taking all
    colors together
  • The third moment did not work well, because it
    can produce both positive and negative values and
    I only allowed a deviation maximum of 100 of the
    value of the search image
  • The Cambridge Lab used color and texture without
    image segmentation in combination, I used them
    separately so that I could see which method
    produced the best results.
Write a Comment
User Comments (0)
About PowerShow.com