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.

python version of Je Vois ?

+1 vote
Hello,

I have played with python version of Open CV; from my point of view it is as fast and easier to work with than with C. Do you forecast a python version of Je Vois in the future ?
asked May 3, 2017 in Misc Questions by stilgar (360 points)

2 Answers

0 votes
I'm curious about this myself. It should be possible to write a Module that embeds and calls the Python interpreter in the process() functions. I'll see if I have any luck doing it.

First step will be to get python building as part of jevois-sdk and rebuild opencv with support for it.
answered May 3, 2017 by pelrun (2,330 points)
+1 vote
Definitely on our todo list.

We will likely use boost.python for the bindings

We need to think a bit more about how to make this as flexible as possible, especially given the videomapping business and the need for a USB camera to announce its supported video modes when it is first connected to the host computer. Ideally, there should be only one C++ wrapper module that gets the input and output frames and then just forwards them to some process() function written in python. To avoid having to make a new wrapper for each new python module, we will likely proceed as follows:

- create a fake Vendor name, e.g., JeVoisPython. Then add the convention that when vendor is JeVoisPython, then the C++-to-python wrapper module should be loaded, and the Module name in the videomapping should then be interpreted as a python module name to be loaded into the wrapper.

- because the InputFrame and OutputFrame access wrappers are very important under tight timing (so we only request a frame when we absolutely need it, and we recycle it as soon as we are done with it), we will likely wrap those. Then we will wrap our conversion functions from RawImage (which is obtained out of InputFrame and OutputFrame) to OpenCV. Then users implement their image processing using Python bindings to OpenCV.

@pelrun - yes, compiling OpenCV with python is a first step, but I would not worry too much about the SDK for now, if we can get it working in host mode, we can help you with porting that to platform mode.
answered May 4, 2017 by JeVois (46,580 points)
Actually getting python/python-opencv/numpy up and running on the platform was pretty straightforward (buildroot just needs the correct options). I'm actually mostly using it as motivation to sort out the remaining issues with the platform build. :)
...