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.

Mint 18.1 - can't get it to work with the camera

0 votes
So the Jevois-Daemon finds my built in webcam and runs off of it. I've run through the various listmappings and they all seem to work fine, with my webcam... But i want the jevois camera to do the work...

So I've disabled the built in webcam that kept coming up by default (/dev/video0) by unbinding.
Plugged in the Jevois cam with a USB3 and USB2 port on the laptop.
ls command showed it the system recogized it as the new /dev/video0 and the the uvcvideo module was in use.

run the jevois-daemon and get this output...

ERR Log::warnAndIgnoreException: Ignoring std::exception [FTL VideoBuffers::dqbuf: VIDIOC_DQBUF failed [19](No such device)]
FTL VideoBuffers::dqbuf: VIDIOC_DQBUF failed [19](No such device)

Downloading the latest ubuntu for the laptop to give it a try in that environment...

For what it is worth I've tried all of the power scenarios I can think of but I still get something I haven't seen here yet. With and without usb2. 3. and external 2amp power supply. all results are the same.
after each one of the different scenarios the usb ports won't recognize the mouse until after a restart.

Initial power on - all green.
few seconds - green with an orange flash
few seconds later - solid green and solid orange simultaneous - and that is it.
Full fan power from start every time.

I've tried different SD cards too. same results.

I'm stuck and putting a ubuntu partition onto the laptop is my last resort.
asked Mar 28, 2017 in Misc Questions by adam (150 points)

3 Answers

0 votes

The lights indicate a correct boot sequence. This sound like a device name mapping issue.

You can verify it quickly with ffmpeg. Replace X with the device suffex (>>ls /dev/ ):

>> ffplay /dev/videoX -pixel_format yuyv422 -video_size 640x300
I get this issue when working with two cameras. But it's resolved with a restart in my case. 
If that's the case and you want persistent name mapping, you can set udev rules. This will create a symbolic name /dev/video0 that matches the hardware. You will need to edit (or comment out and restart udev) if you want to use another cam.
>>sudo gedit /etc/udev/rules.d/10-Jevois.rules
Add:
SUBSYSTEM=="video4linux", ATTRS{idVendor}=="1d6b", GROUP="users", MODE="0666", SYMLINK+="video0"
then 
>> sudo systemctl restart udev.service
But first verify SUBSYSTEM and ATTRS{idVendor} by >> udevadm info -q all -a /dev/videoX
Alternatively (I haven't tested to verify), you can modify the source code in /jevois/include/jevois/core/engine.H then recompile for host. 
Modify (for generic hardware, line #51 in my ver.)
#define JEVOIS_CAMERA_DEFAULT "/dev/video0"


With guvcview you can use the (-d) flag to name the device path implicitly.
Hope this helps. 
answered Mar 28, 2017 by alsaibie (740 points)
0 votes

If I am understanding correctly, it seems that you are trying to run jevois-daemon twice?

- when you run in desktop mode, you run jevois-daemon compiled for host and then usually use a standard webcam. jevois-daemon implements the various machine vision algorithms. When you run in desktop mode, those run on your desktop.

- now if you want the JeVois camera to do the work, you just plug it in, and jevois-daemon will start on it as soon as it boots. So you should not have to run jevois-daemon again on your host. You would just run guvcview or similar video viewer.

The JeVois camera is very picky and will reject attempts to grab video in a format that is not an exact match for those listed in the videomappings.cfg on its SD card. This is by design, so that, if you select an incorrect mode, you do not end up with the camera using a near match and then you think that you are running some algo while actually it is running another one. This would explain why the jevois-daemon you run on your host is not able to grab frames, maybe it is requesting a video mode from the JeVois camera which the camera does not provide as a valid output mode.

So if you indeed do want to chain two jevois-daemon, one running on the camera and then one running on host, the input (camera) mode selected for the one running on the desktop must be an exact match for a valid output (USB) mode of the one running on the camera.

With the default videomappings.txt, the camera will support 320x240@60 YUYV input from sensor to 320x240@60 YUYV output to USB and this will use the SaveVideo module. So if you run, for example, 640x300@60 YUYV (DemoSaliency) on your host, that would request 320x240@60 YUYV from the camera, and hence the SaveVideo module will be selected on the camera.

To try that pipeline, first run jevois-daemon on your host (with your other webcam) and type

listmappings

 then note the mapping number for DemoSaliency at 640x300@60 YUYV USB output.

Now connect your JeVois camera (if you do not disable your other one, JeVois will show up as /dev/video1, that is no problem), and, on your host, try

jevois-daemon --cameradev=/dev/video1 --videomapping=XX

where XX is the number you noted from listmappings. This is how you would chain two jevois-daemon processes, one on the camera and then another on the host. In summary, for this example:

jevois camera: grabs 320x240@60 YUYV and outputs 320x240@60 YUYV to USB (SaveVideo module runs on JeVois camera)

desktop: grabs 320x240@60 YUYV from your JeVois camera over USB, and outputs 640x300@60 YUYV which goes to a display window (DemoSaliency module runs on your desktop)

answered Mar 28, 2017 by JeVois (46,580 points)
0 votes
Hi, were you able to make it work, I've exactly the same problem.

Thanks
answered May 1, 2018 by aranzuglia (160 points)
...