bug fixed object mapper and changed hsv pipe to bgr

This commit is contained in:
ori agranat
2019-11-27 22:19:21 +02:00
parent 6b5bd75dbe
commit b683abad20
2 changed files with 2 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ public class VisionProcess {
private NetworkTableEntry ntAreaEntry;
private NetworkTableEntry ntTimeStampEntry;
private NetworkTableEntry ntValidEntry;
private ObjectMapper objectMapper;
private ObjectMapper objectMapper = new ObjectMapper();
VisionProcess(CameraCapture cameraCapture, String name) {
this.cameraCapture = cameraCapture;

View File

@@ -32,7 +32,7 @@ public class HsvPipe implements Pipe<Mat, Mat> {
input.copyTo(processBuffer);
try {
Imgproc.cvtColor(processBuffer, processBuffer, Imgproc.COLOR_RGB2HSV, 3);
Imgproc.cvtColor(processBuffer, processBuffer, Imgproc.COLOR_BGR2HSV, 3);
Core.inRange(processBuffer, hsvLower, hsvUpper, processBuffer);
} catch (CvException e) {
System.err.println("(HsvPipe) Exception thrown by OpenCV: \n" + e.getMessage());