mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
added rounding for contour area
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user