1 / 10

Image Search

Image Search. Implementation Results Ken Schmidt. Some Implementation Problems. The server changed the path to the SQL tag library <%@ taglib uri="/jccrsrc/misc/jakarta-taglib/dbtags.jar" prefix="sql" %> vs <%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" prefix="sql" %>.

Download Presentation

Image Search

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Image Search Implementation Results Ken Schmidt

  2. Some Implementation Problems • The server changed the path to the SQL tag library <%@ taglib uri="/jccrsrc/misc/jakarta-taglib/dbtags.jar" prefix="sql" %> vs <%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" prefix="sql" %>

  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 ("<p>width of Image ="+img.getWidth(null) // + "</p><p>height of Image ="+img.getHeight(null) + "</p>"); //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 <%=overallMeanDown%> AND <%=overallMeanUp%>

  6. CM-Color Mean GM-Grayscale Mean C2-Color Second Moment G2-Grayscale Second Moment Some ResultsWhich Search Methods Worked?

  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.

More Related