Skip to content

Commit 8213c5d

Browse files
committedAug 10, 2010
Removed the testing main method from HoughTransformer
1 parent 5dcddea commit 8213c5d

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed
 

‎HoughTransformer.java

+6-18
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,20 @@ public Category process(RenderedImage img){
5454
I'm referring to this site: http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm
5555
for this. */
5656
HoughTransform hough = new HoughTransform(img.getWidth(),
57-
img.getHeight(), .70);
57+
img.getHeight(), houghTolerance);
5858

5959
LocatedCircle circle = hough.getLargestCircle(imgData,
6060
img.getWidth(), img.getHeight());
61-
61+
62+
//REMOVE THESE AFTER TESTING
6263
System.out.println(circle.getRadius());
6364
System.out.println("Location: ("+circle.getX() +"," +circle.getY()+")");
6465
System.out.println("Confidence: " + circle.getConfidence());
65-
/**
66+
67+
/*
6668
* Check that the circle we're looking for is near the center.
6769
* If it is not, then the hough transform probably found
68-
* a larger object than the one in question and failed.
70+
* a different object than the one in question and failed.
6971
*/
7072
double circX = circle.getX(), circY = circle.getY();
7173
double confidence = circle.getConfidence();
@@ -84,18 +86,4 @@ else if(confidence == 0)
8486
return Category.ELLIPTICAL;
8587
}
8688

87-
88-
public static void main(String args[]){
89-
if(args.length < 1)
90-
System.exit(1);
91-
92-
//The last parameter is a placeholder for now
93-
HoughTransformer trans = new HoughTransformer(100, .70, 100.0);
94-
95-
try{
96-
trans.process(ImageIO.read(new File(args[0])));
97-
}catch(IOException e){
98-
System.out.println(e.getMessage());
99-
}
100-
}
10189
}

0 commit comments

Comments
 (0)
Please sign in to comment.