compile UI, only use 4 corners for target, increase simplification kp

This commit is contained in:
Matt
2020-02-22 11:08:08 -08:00
parent 5ac9569082
commit ad8c0f0105
93 changed files with 115 additions and 119 deletions

View File

@@ -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" +

View File

@@ -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);

View File

@@ -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
// RamerDouglasPeucker 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();