added rounding for contour area

This commit is contained in:
ori
2019-09-20 09:24:20 -07:00
parent 61f21e6b1b
commit f5c6a92a92

View File

@@ -54,7 +54,7 @@ public class VisionProcess {
for (MatOfPoint Contour : InputContours){
try{
var contourArea = Imgproc.contourArea(Contour);
double targetArea = (contourArea / CamVals.ImageArea) * 100;
double targetArea = FastMath.round((contourArea / CamVals.ImageArea) * 100);
if (targetArea <= area.get(0) || targetArea >= area.get(1)){
continue;
}