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.

Grey mode in AMCap on Windows 10 causes error

+1 vote
Just unboxed the Turnkey JeVois package with pre-loaded SD card (sent May 5th-ish) and started to play.

Selecting Grey (Y800) mode in AMCap on Windows 10 causes error "The parameter is incorrect (87)" Any suggestions?

Camera works otherwise (In YUY2 mode), though very dark image. (Removed lens sticker. Increasing brightness control helps a little, but increasing gain doesn't help, in fact it seems brighter whilst I move gain slider but changes back to dim when I let go of slider)

I guess I'll try some other webcam viewers and see if that helps.

Nice device. Keen to see optic flow (for which I need grey mode...)

asked May 15, 2017 in User questions by Tcornall (700 points)

3 Answers

0 votes
Never mind, I suspect the solution is "Don't use Windows 10" .....

I'll move over to Linux for further investigation and try  guvcview.

Any other suggestions welcome!
answered May 15, 2017 by Tcornall (700 points)
+1 vote

This is a known issue with Windows and the greyscale modes.

And because this morning I had a sudden urgent need to capture a video of me flipping the bird using the edge detect module (my friend with an openmv board made one and I simply *had* to respond in kind) and I couldn't be bothered switching over to my linux machine, I went and solved it.

To get the greyscale capture modes working under windows:

  1. Download http://www.gdcl.co.uk/YUVxfm.zip
  2. Extract it to c:\windows\system32
  3. Open a command prompt window with administrator privileges
  4. Enter "regsvr32 c:\windows\system32\YUVxfm.dll" in the command window.

That'll install a directshow filter which supports the Y800 modes. 

answered May 16, 2017 by pelrun (2,330 points)
Thank you very much, pelrun. I added these instructions to the Windows AMCap docs, with credit. Now show your friend the EdgeDetectionX4 or the DemoCPUGPU ;-)
Brilliant, Thanks, I'll do that!
I eventually got guvcview to work under Ubuntu, though that wasn't as straightforward as I thought it would be either. i.e. I expected it to work out of the box once I'd installed Ubuntu, but it kept crashing when I chose YUYV or Gray, until I poked around a bit and suddenly it worked. Still dunno what the issue was... but I got to see the optic flow so that's great.
Hi Pelrun and jeVois:
I tried this fix for AMCap grayscale and found initially that regsvr32 wouldn't register the YUVxfm.dll when it was in c:\windows\sytem32.  
My PC is a 64-bit machine so figuring that I maybe had a 64-32 bit issue I went looking and found this answer at https://support.microsoft.com/en-nz/help/249873/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages  (look for the section "Method 2: Use the 32-bit version of Regsvr32 to register a 32-bit DLL on a 64-bit version of Windows")
Essentially, put the YUVxfm.dll from out of the YUVxfm.zip into c:\windows\syswow64 and use the version of regsvr32 in syswow64 to register it.

c:\windows\SysWoW64\regsvr32 c:\windows\SysWoW64\YUVxfm.dll

This now works and I can see grayscale goodness on my Windows 10 box. Thanks for all the help!
I'm running 64-bit as well and had no issues registering the filter, except when I tried to do it with a non-elevated command prompt. It's a bit naff doing this manually, though. A proper solution would be to write a batch file or an inf file that handles it correctly.
I've worked out now that the best viewer for me is ffplay (as suggested by JeVois doco) which seems more reliable and robust than qv4l2 or guvcview on Lubuntu and/or AMCap on Win. Somehow, using the CLI is more satisfactory than the GUI based viewers, especially on a small screen, and it's easier to set the res and other params in a script than bother with tabs and buttons and things. Funny, that.
+1 vote
For the dark video and poor low-light performance issue, please download and flash the latest microSD disk image from http://jevois.org/start

We have widened the allowed range of autogain in the kernel camera driver and it helps a lot in our testing.

The microSD image that ships with the turnkey kits was flashed a while ago and does not yet have this feature.
answered May 17, 2017 by JeVois (46,580 points)
I installed the 1.0d version SD card image, and to be honest, the low light performance is still pretty poor. (In fact, I wasn't convinced for a while that the reflash had worked because I couldn't notice any difference in performance)
When I managed to turn the gain up to about 200 (see my other comments about difficulties with autoexp stopping gain setting) it manages to be bright enough, but with considerable vertical graininess. This is in a comfortably well-lit room using compact fluorescent, nothing extreme. Other, low-cost webcams and things with small cameras cope quite well here. I wonder if I am still doing something wrong.
It may be a limitation with the particular sensor used. I've also seen the vertical lines, which I initially thought was a problem with my unit until I also saw them in images in the documentation. It doesn't seem to happen in every resolution, though. Since to me it looks like alternating red/green pixel-wide bands, I wonder if the debayering isn't working properly?
Good point about the Bayering. I thought it was just amplified noise. I'll check out the different resolutions.  Thanks.
as noted in another thread, also remember that many demos on JeVois run at 60 frames/s, so that severly limits the amount of time for exposure. Other webcams typically slow down the frame rate in low light. So one thing to try is to use slower frame rates by editing the videomappings.cfg for the algorithm you want to run, maybe try 15fps and see how well that works (use 15fps for both the USB and the Camera fps in the video mapping).
OK, I had wondered about that. I did think that maybe a too-high frame rate would cause dim image. I did try changing framerate thru the webcam viewers but if they even let me change the frame rate it was controlled by the mappings anyway.
Thanks for the suggestion.
I did try this, simply by selecting an existing configuration  that had 15 fps and yes, it is significantly brighter than the same configuration with 60 fps.