Closed oceanle-me closed 2 years ago
@oceanle-me,
You have two options here.
If you capture your video with cv::VideoCapture cap(0);
you can set the required size with
cv::cap.set(cv::CAP_PROP_FRAME_WIDTH, www);
cv::cap.set(cv::CAP_PROP_FRAME_HEIGHT, hhh);
Please select a valid resolution. Not something like 2345x456. see OpenCV
Second option is using GStreamer. It has almost no latency. For an example see the section YoloX + GStreamer camera
it works for me. My previous mistake was setting a wrong value resolution. Thank you a lot. I'm also using GStreamer, it's really smooth
I'm running this example, but it has a problem. When capturing camera V2, the input frames are CROPPED automatically into 640x480. This is really terrible, I want the full angle of the camrera, and rescale to 300x300 before put into the SSDv1 model. I read the videoio.hpp but had no idea. Please, help me to figure out directions to resolve it. Thank you so much.