Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers.

Stream at lower resolution than acqusition?

0 votes
I program in Python. What I would like to do is acquire an image at 640x480. Process it for ArUco detection and pose.  Then I would like to stream the image out USB, but at a lower resolution of 320x240.

Even when I use the OpenCV "resize" command, I get an error message that JeVois can't send an image with a different size than it acquired it.

So, is there a way to do this?
asked Apr 29 in Programmer Questions by Billbo911 (520 points)

1 Answer

+1 vote
 
Best answer

Maybe your video mapping is wrong? You would need something like

YUYV 320 240 30.0 YUYV 640 480 30.0 JeVois MyPythonModule

which will output 320x240 video over USB while capturing 640x480 from the camera sensor.

then you would just resize your image to 320x240 and do an outframe.sendCvBGR(). Beware that OpenCV uses rows, columns (i.e., height, width) in some functions but width, height in others (like cv::Size), so maybe check the docs of the opencv resizing function to make sure width and height are not swapped.

If the problem persists, please post your mapping definition and python code and we can assist you further.

answered May 1 by JeVois (20,780 points)
selected May 3 by Billbo911
Thank you!! The issue was as simple as I had swapped the resolution in the video mapping file. I had "MJPG 640 480 24.0 YUYV 320 240 24.0 ......." I just swapped to "MJPG 320 240 24.0 YUYV 640 480 24.0...." and it worked as expected with the OpenCV Resize function.
...