bugfix for camera mat 0

This commit is contained in:
ori agranat
2019-09-15 00:46:26 +03:00
parent d6850f73b1
commit 440d68a1f1
2 changed files with 14 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ public class VisionProcess {
Imgproc.cvtColor(image,hsv,Imgproc.COLOR_BGR2HSV,3);
new Scalar(hue.get(0),saturation.get(0),value.get(0));
Mat threshold = new Mat();
Core.inRange(threshold,new Scalar(hue.get(0),saturation.get(0),value.get(0)),new Scalar(hue.get(1),saturation.get(1),value.get(1)),threshold);
Core.inRange(hsv,new Scalar(hue.get(0),saturation.get(0),value.get(0)),new Scalar(hue.get(1),saturation.get(1),value.get(1)),threshold);
if (IsErode){
Imgproc.erode(threshold,threshold, Kernel);
}