mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
compile UI, only use 4 corners for target, increase simplification kp
This commit is contained in:
@@ -17,8 +17,8 @@ public class Helpers {
|
||||
"\n" +
|
||||
"[Service]\n" +
|
||||
"ExecStart=/usr/bin/java -jar %s \n" +
|
||||
"StandardOutput=file:/var/log/something.out.txt\n" +
|
||||
"StandardError=file:/var/log/something.err.txt\n" +
|
||||
"StandardOutput=file:/var/log/chameleon.out.txt\n" +
|
||||
"StandardError=file:/var/log/chameleon.err.txt\n" +
|
||||
"Type=simple\n" +
|
||||
"WorkingDirectory=/usr/local/bin\n" +
|
||||
"\n" +
|
||||
|
||||
@@ -77,6 +77,7 @@ public class USBCameraCapture implements CameraCapture {
|
||||
// TODO: Why multiply by 1000 here?
|
||||
Mat tempMat = new Mat();
|
||||
deltaTime = cvSink.grabFrame(tempMat) * 1000L;
|
||||
// tempMat = Imgcodecs.imread("C:\\Users\\imadu\\Documents\\GitHub\\chameleon-vision\\chameleon-server\\testimages\\2020\\image.png");
|
||||
tempMat.copyTo(imageBuffer);
|
||||
tempMat.release();
|
||||
return Pair.of(imageBuffer, deltaTime);
|
||||
|
||||
@@ -168,13 +168,13 @@ public class SolvePNPPipe implements Pipe<Pair<List<StandardCVPipeline.TrackedTa
|
||||
// Can be tuned to allow/disallow hulls
|
||||
// Approx is the number of vertices
|
||||
// Ramer–Douglas–Peucker algorithm
|
||||
Imgproc.approxPolyDP(target.rawContour, polyOutput, 0.01 * peri, true);
|
||||
Imgproc.approxPolyDP(target.rawContour, polyOutput, 0.04 * peri, true);
|
||||
|
||||
var area = Imgproc.moments(polyOutput);
|
||||
|
||||
if (area.get_m00() < 200) {
|
||||
return null;
|
||||
}
|
||||
// if (area.get_m00() < 200) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
var polyList = polyOutput.toList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user