You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package gab.opencv;
|
|
|
|
import java.util.Comparator;
|
|
|
|
public class ContourComparator implements Comparator<Contour> {
|
|
public int compare(Contour c1, Contour c2) {
|
|
if(c1.area() == c2.area()){
|
|
return 0;
|
|
}
|
|
else if (c1.area() > c2.area()) {
|
|
return -1;
|
|
} else{
|
|
return 1;
|
|
}
|
|
}
|
|
} |