Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

How can i send video frames out the serial port

0 votes
Has there been any progress in supporting video out the serial port?
asked Oct 29, 2019 in Hardware Questions by Laputa (160 points)

1 Answer

0 votes
I think you can do that very easily in python: create a new python module in JeVois Inventor. Then in the process() function get your camera frame as OpenCV BGR numpy array. Then loop over the pixels, convert the BGR values to string representation, and issue a bunch of jevois.sendSerial(string). You should come up with your own strategy to delimit the frames, for example, send the whole frame as one very long string of BGR values converted to hex (2 bytes per B,G,R value), followed by a single \n at the end.

Just beware that the serial port is very slow compared to video frame rates...

Say 320x240 video resolution, times 3 for BGR, times 2 for encoding to ASCII hex = 460k bytes

at 115,200 bauds over the hardware serial port (i.e., about 10 kbytes/s) that will take about 45 seconds for 1 frame.
answered Oct 31, 2019 by JeVois (46,580 points)
...