I want to stream video over USB to my computer so that I can process the images in real time with OpenCV.
If I connect the OpenMV H7 to the IDE and stream JPEG images with the frame buffer off, I get the following frame rates:
→ VGA: 47.6 FPS
→ HD: 28.6 FPS
→ WQXGA2: 7.5 FPS
However, if I use the usb_vcp.py code to stream JPEG images, I get the following frame rates:
→ VGA: 11.7 FPS
→ HD: 4.7 FPS
→ WQXGA2: 0.8 FPS
(Please note I got the above frame rates by just modifying the sample code and adding timing. I did not do any processing or displaying, so that can’t be the reason for the slower frame rate).
I notice a similar drop in frame rates when using the rpc.py sample code. Why is this happening? The OpenMV streams to the IDE over USB, so why is it so much slower when I try to read the images outside of the IDE? How do read the OpenMV’s images at the higher frames rates outside of the IDE? Again, I’d like to do this so that I can process the images in real time with OpenCV.
Also, the usb_vcp.py code is written to stream JPEG images. How do I stream RGB565 images? It’s clearly possible since I can stream RGB565 images to the IDE when the OpenMV is connected over USB.