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.

Jevois colors just aren't right.

0 votes
I'm trying to use the Jevois camera.  There are things I love about it, and it could be quite useful, but it just isn't working for me due to poor color reproduction.  I can't seem to find settings that generate proper colors.  I'm using Jevois inventor, and it always seems to start out horribly dark.  Anything not in bright light can't be seen.  If I increase the gain or fiddle with the white balance, I can see a bit more of the picture, but the colors get washed out.

If I manage to find some adequate settings in Jevois Inventor, I go over to use Grip  (a great program that was developed primarily for use in FIRST Robotics) and the colors are completely different, but still not accurate, when I stream the data in Grip.  

In particular, I'm trying to see yellow things and select them, but in the images, they always seemnearly  black or white, depending on the gain, so I can't pick the right settings for an HSV filter.

I don't have this problem on any other USB camera.  Yellow looks yellow on all the other cameras.  The pictures look like pictures, not too dark and not too light.  I'm kind of stuck here.  I really would like to use this camera, but I'm on a First Robotics team, and the build season is slipping away.

(Can I upload example photos?  I don't see a way to do that.  The image tag seems to demand a link, as opposed to an uploaded file.)
asked Jan 26, 2019 in Misc Questions by Meadmaker (170 points)

1 Answer

0 votes

Have a look here to start: http://jevois.org/doc/UserLighting.html

So the main difference between jevois and regular webcams (or phone cams, etc) is that JeVois maintains its frame rate while other cameras will reduce frame rate so that they can achieve better exposure under a broad range of lighting conditions. By setting camera parameter 'presetwb' to 'shade' you will get the standard behavior (setcam presetwb shade).

Then I would first play with the inventor and switch exposure, gain, and white balance to manual. You can then tune the exposure, gain, and red and blue balances. Once you have good settings in the inventor, you can dump them into the params.cfg file of your module by pressing the button labeled "C" in the Config editor in JeVois Inventor. Just beware that you may need to re-order the lines, so that you first set autoexposure to 1 (1 means manual), then auto gain to 0, then autowb to 0, and finally your manual exposure, gain, redial, bluebell values.

answered Jan 29, 2019 by JeVois (46,580 points)
Some improvement......but...…..

I'll do some more experiments and see if I can get my settings to save correctly.  My yellows have turned white again in Grip.  I got what I wanted in Inventor.
I've been looking this over, and I have come up with an approach.  My jevois camera isn't in front of me right now, so I can't deal with it right at the moment.  I think, though, that the problem is all about selecting a script to run.  For reasons that elude me, setting which script to run is dependent on which video mode is selected.  Fine, except that I can't start Inventor with a specific video mode, and I certainly can't start Grip with a specific video mode.  Those are the only two programming packages I'm ever going to use with a jevois.  I would also like to write Java code executing on a RoboRio using the FRC Wpilib Java libraries....and I can't select a video mode there, either.

So, I'll edit my videomappings.cfg file, like it talks about in "Getting Started Caveats", so that there is only one video mapping, which means only one script, right?  I'll see that when I edit it, I guess.

What I don't know is what will happen to the settings I've put in my config file at that point.  Right now, I've set them, but when I start Inventor (or Grip), it starts running DemoSaliency, and the settings in the config file seem to get overridden by...….well, I'm not sure what by, but whatever they are, they aren't what's in the config file.

That config file seems to really only do anything in headless mode.  I'm hoping that what is actually going on is that when it changes modes due to being connected to a computer host (Inventor or Grip) those changes are just being overwritten, but that won't happen if I only have one mapping in my videomappings.cfg file.  


So, what I want to happen is to run the script I've selected, with the camera settings I've selected and saved to the config file, and have it display those images in Inventor or Grip.  (For those playing along at home, Grip is basically a very nice visual interface elements that wraps OpenCV calls.  You can select a camera, but you can't set the camera properties so, based on something inside the jevois camera, the camera decides to run the DemoSaliency program.  I'm hoping I can stop that by removing everything except my chose script from the videomappings.cfg file.)  


If it all works, I'll see yellow things in Grip, or when I start Inventor.  Right now, they're white.
Things worked as expected.  Unless I took every line out of the config file except for the one for the module I wanted, it started DemoSaliency.  However, that's ok.  That means I have a way of starting the script I want, whether streaming or headess.  That problem is solved.

But the camera parameters are still messed up, even though I put the camera paramters I wanted into the initscript.cfg file, as instructed.  When I start up the camera, it starts the right script, with the wrong camera parameters.
oh, try to put your camera params in your module's params.cfg as opposed to in the global initscript.cfg. When a new module is invoked which changes the sensor format it resets some of the settings. By putting yours in params.cfg they will be applied after your module is loaded and the resolution has been set.
Thanks.  It seemed to work by putting it in script.cfg.  Is params better, or the same?
same for your purposes. params.cfg is parsed before the module is initialized, while script.cfg is run after module initialization. Python modules do nothing as initialization code so no difference except for the different formats (params.cfg is restricted to param=value syntax).
...