I’ve posted about vision help before on here and what people were able to give me helped a ton. I’m extremely new to vision, fairly new to FIRST, and somewhat experienced with Java, so I’m obviously not the most experienced, but I’d love to figure this out. I have my pipeline and a command that should grab the frame from the camera, run it through the pipeline, and then calculate/set motor speeds. I’m getting this error, however
OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /var/lib/jenkins/workspace/OpenCV-roborio/modules/imgproc/src/color.cpp, line 8000
Exception in thread "Thread-0" CvException [org.opencv.core.CvException: cv::Exception: /var/lib/jenkins/workspace/OpenCV-roborio/modules/imgproc/src/color.cpp:8000: error: (-215) scn == 3 || scn == 4 in function cvtColor
]
at org.opencv.imgproc.Imgproc.cvtColor_1(Native Method)
at org.opencv.imgproc.Imgproc.cvtColor(Unknown Source)
at org.usfirst.frc.team4750.robot.Robot.lambda$robotInit$0(Robot.java:58)
at org.usfirst.frc.team4750.robot.Robot$$Lambda$2/17398621.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
and I can’t figure out how to fix it. I did some research and have concluded it’s not receiving a frame, but I don’t know why. Any help would be much appreciated. The code is at https://github.com/ngregrichardson/R2Vision if you don’t mind taking a look. Thanks!