Traditional Culture Encyclopedia - Photography major - Open the camera with opencv of qt interface under linux. When the camera is turned on, the black screen cannot display real video. What should I do at this time?

Open the camera with opencv of qt interface under linux. When the camera is turned on, the black screen cannot display real video. What should I do at this time?

Is there something wrong with the program, such as checking (! Frame) is broken; It takes time to initialize the camera, and you can't get the frame at first, which leads to an error in exiting the loop or processing the video. It is also possible that the version of opencv does not support compilers, so try to switch to an older version with a large population, such as opencv2.4.9.