Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Invoke and stream output video from a module using python code

0 votes
Is there a way that a particular module can be invoked using python by sending messages to the camera?? If yes, is there a way to see the live video streaming output of the module using python without using any video viewing software. Also is there a way to get a snap shot to from darknet yolo module when a person is detected by the network??
asked May 16 in Programmer Questions by tomellickal (170 points)

1 Answer

0 votes
Yes, you need to open a webcam in your python code, selecting the resolution and frame rate that correspond to your module. You can for example use the VideoCapture class of OpenCV. Note that setting the frame rate does not always work, depending on your operating system, etc. For example, MacOS gets totally confused among several video modes with same resolution but different frame rates. In such case, you can just comment out all entries in videomappings.cfg except the one you want to use, so that JeVois tells the host computer it only supports one resolution, then the computer will select that one.

To get a snap shot, try PyDetectionDNN, you can insert your own code to save some detected objects to microSD in there.
answered May 29 by JeVois (42,420 points)
Thank you for your answer. I initially tried out giving commands to camera (using peter Quin's project- https://hackaday.io/project/163391-front-door-cam)to pick up a particular resolution corresponding to a module on start up using serial commands from python but it seems not working

It worked for me after commenting out all the other modules  that I don't want for my requirement from the videomappings.cfg file. This prevented me to switch in between the modules using resolution selection but was not my requirement. I am using windows for my project. I used the VideoCapture class of OpenCV to stream in the camera input.
...