I am receiving an error when running my program, I think specifically about color manipulation in the OpenCV library.
I\'m trying to build a program that takes a vid
As error message said, the image given in input to the color conversion function has an invalid number of channels.
The point is that you are acquiring frames as single 8bit channel
Camera.set(cv::CAP_PROP_FORMAT, CV_8UC1)
and then you try to convert this frame in grayscale
cv::cvtColor(image, gray, cv::COLOR_BGR2GRAY)
You have 2 easy options to solve this issue:
Take a look to this link for OpenCV color manipulation
You want to do color manipulation but your image has the type CV_8U1. It has to be at least a three channel image like CV_8UC3 or CV_32F. Try a different CV_Type
Camera.set(cv::CAP_PROP_FORMAT, CV_32F);