All pastes #977908 Raw Edit

woooo

public text v1 · immutable
·published 2008-04-09 04:53 UTC
rendered paste body
import java.io.File;
import magick.ImageInfo;
import magick.MagickImage;
import java.io.IOException;
/**
*This test class was designed to test the public methods of the Image Matcher *class, version 294 (last version from Milestone 6).  Upon consulting with the *authors of the class, some methods were ommitted from testing due to the *impossibility of testing.
*/
public static void main(String args[]){
	

	public void testMatchImageString1() throws IOException{
		double result = imageMatcher.matchImagesString("/home/f85/bjsaxt/sofar.JPG", "/home/f85/bjsaxt/sofar.JPG", 0.5);

		if(result < 0 || result > 100){
			System.out.println("FAILURE");
		}//end if
	}//end Match Image String 1

	public void testMatchImageString2() throws IOException{
		double threshold = 0.8;
		double result = imageMatcher.matchImagesString("/home/f85/bjsaxt/sofar.JPG", "/home/f85/bjsaxt/sofar.JPG", threshold);

		if(result < 0 || result > 100){
			System.out.println("FAILURE");
		}//end if
	}//end Match Image String 2

	public void testMatrixFile() throws IOException{
		double[][] myResult = imageMatcher.matrixFile("/home/f85/bjsaxt/sofar.JPG");
		for(int i = 0; i < myResult.length; i++){
			for(int j = 0; j < myResult[i].length; j++){
				
			}//end j for
		}//end i for
		
	}//end testMatrix

	public void testFileExtension(){
		
		if(imageMatcher.fileExtension("/home/f85/bjsaxt/sofar.JPG").equals("jpg")){ 
			System.out.println("Success");
			}
	}



}//end testImageMatcher