It's impossible. Here is a list of all codes:
CV_CAP_PROP_POS_MSEC - position in milliseconds from the file beginning CV_CAP_PROP_POS_FRAMES - position in frames (only for video files) CV_CAP_PROP_POS_AVI_RATIO - position in relative units (0 - start of the file, 1 - end of the file) CV_CAP_PROP_FRAME_WIDTH - width of frames in the video stream (only for cameras) CV_CAP_PROP_FRAME_HEIGHT - height of frames in the video stream (only for cameras) CV_CAP_PROP_FPS - frame rate (only for cameras) CV_CAP_PROP_FOURCC - 4-character code of codec (only for cameras).
Or (if possible, using some utilities), you can configure the camera to display only grayscale images.
To convert a color image to grayscale, you must call cvtColor with the code CV_BGR2GRAY . It does not take much time.
ArtemStorozhuk
source share