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

using Jevois camera as web cam on Host PC for development

0 votes
Is it possible to use the same Jevois camera on Host PC for the development purpose .

i have now completely installed setup  on HOST pc .

but when i run jevois-daemon on host pc with jevois camera connected it complain above /dev/vidoe0 could not connect.

is there any system in jevois so that i becomes simple video streaming camera . and then we use jevois-daemon on Host for development using python.
asked Feb 14 in Programmer Questions by dpat123 (300 points)

1 Answer

0 votes

Yes, you need to edit JEVOIS:/config/videomappings.cfg and uncomment or create a mapping that uses the PassThrough or Convert module. There are samples at the beginning of the file. You want to use as USB out mode the mode that your module running on host will request as camera mode. You may have to disable some other modes in the file with same output format.

So if your host wants 640x480 YUYV then add

YUYV 640 480 30.0 YUYV 640 480 30.0 JeVois PassThrough

More info is here about host vs platform and dumb camera mode: http://jevois.org/doc/Concepts.html

And for mappings http://jevois.org/doc/UserModes.html

answered Feb 14 by JeVois (16,490 points)
i have added YUYV 640 480 30.0 YUYV 640 480 30.0 JeVois PassThrough *
as a default module . do i have to rebuild-host after adding new lines to videomappings.cfg. as it still selects DemoSaliency as default module .

can i also provide --videomapping=PassThrough  !!
Still failing do i need to allocate more buffers . i do not know why it is failing to work

In file /jevois/config/videomappings.cfg:442: WARNING: Two modes have identical output format: YUYV 640x480 @ 30fps
INF Engine::Engine: Loaded 57 vision processing modes.
INF Engine::onParamChange: Using [stdio] hardware (4-pin connector) serial port
INF Engine::onParamChange: No USB serial port used
INF Engine::postInit: Initalizing Python...
INF Engine::postInit: Starting camera device /dev/video0
INF Camera::Camera: [9] V4L2 camera /dev/video0 card JeVois-A33 Smart Camera: JeVois bus usb-0000:00:06.0-2
INF Engine::postInit: Using display for video output
INF Engine::setFormatInternal: OUT: YUYV 640x480 @ 30fps CAM: YUYV 640x480 @ 30fps MOD: JeVois:PassThrough
INF Camera::setFormat: Camera set video format to 640x480 YUYV
INF Engine::setFormatInternal: Instantiating dynamic loader for /jevois/modules/JeVois/PassThrough/PassThrough.so
INF Engine::setFormatInternal: Module [PassThrough] loaded, initialized, and ready.
INF Camera::streamOn: 5 buffers of 614400 bytes allocated
FTL Camera::streamOn: VIDIOC_STREAMON failed [5](Input/output error)
terminate called after throwing an instance of 'std::runtime_error'
  what():  FTL Camera::streamOn: VIDIOC_STREAMON failed [5](Input/output error)
Aborted (core dumped)
Oh, maybe you are editing the wrong file. Since you want to configure your camera to be pass-through, you should edit the videomappings.cfg on the microSD card, and then add that PassThrough mode there. Then connect your camera to your host, and on your host run jevois-daemon --videomapping=XXX where XXX is the mapping that will trigger your module and that will expect 640x480 YUYV as input (camera) resolution.

In summary:

on the microSD, add to JEVOIS:/config/videomappings.cfg:

YUYV 640 480 30.0 YUYV 640 480 30.0 JeVois PassThrough

and on your host ~/jevois/Config/videomappings.cfg:

YUYV 1280 480 30.0 YUYV 640 480 30.0 Me MyModule

and then rebuild-host.sh in ~/jevois/ to transfer this addition to /jevois/config/ on your host (you could also just edit /jevois/config/videomappings.cfg on your host directly, but it will get overwritten next time you run rebuild-host.sh).


camera: grabs 640x480 YUYV and outputs 640x480 YUYV to USB using module PassThrough running in camera

host: grabs 640x480 YUYV and outputs 1280x480 YUYV to screen using module MyModule running on host

of course change the 1280x480 to whatever resolution MyModule will output.

Now that VIDIOC_STREAMON error may be something completely different, like confused USB drivers on your host, maybe you need to reboot your host. Indeed, there is already a mapping with 640x480 output in JeVois (runs the intro movie and demo instead of PassThrough), so what you did, though not what you wanted to achieve, should still have worked instead of giving you that error. The number of buffers is fine.
that for clearing my doubts . i got that . and for the  VIDIOC_STREAMON error i will in to that .
got it working in VirtualBox USB camera must be detected as Webcam i have installed VirtualBox extensions and then detected it as WebCamera now display is working .