Please help!! We have been working on vision processing code recently using the generated grip pipeline code and have been running into an error. The error that occurs while trying to process the image is:
ERROR 1 ERROR Unhandled exception: CvException [org.opencv.core.CvException: cv::Exception: /var/lib/jenkins/workspace/OpenCV-roborio/modules/imgproc/src/color.cpp:7943: error: (-215) scn == 3 || scn == 4 in function cvtColor
] at [org.opencv.imgproc.Imgproc.cvtColor_1(Native Method), org.opencv.imgproc.Imgproc.cvtColor(Unknown Source), org.usfirst.frc.team386.robot.GripPipeline.rgbThreshold(GripPipeline.java:131), org.usfirst.frc.team386.robot.GripPipeline.process(GripPipeline.java:57), org.usfirst.frc.team386.robot.Robot.teleopPeriodic(Robot.java:29), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:130), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:247)] edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:249)
Information that may be helpful:
We are using an USB camera.
We are coding in eclipse.
Any help is useful, thank you so much!