Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Raspistill parameter Question

Sun Jan 21, 2018 4:31 pm

Hi,

I am trying to turn off the AWB for my camera, using the raspistill command.

I have tried all possibilities of brackets, off, etc.

eg.

raspistill -o -awb off cam.jpg

What it the correct syntax for the command?

thanks

CJ

User avatar
B.Goode
Posts: 9577
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Raspistill parameter Question

Sun Jan 21, 2018 5:05 pm

Raspberry Pi Foundation documentation is here: https://www.raspberrypi.org/documentati ... /camera.md

I think each option needs to be paired with its setting.

So I would try:

Code: Select all

raspistill --output cam.jpg --awb off
(But I don't have a camera connected to check: that's just based on reading the docs... )

ethanol100
Posts: 589
Joined: Wed Oct 02, 2013 12:28 pm

Re: Raspistill parameter Question

Sun Jan 21, 2018 5:38 pm

You need to specify the awb gains if you want to use -awb off:

Code: Select all

raspistill -awb off -awbg 1.1,2.1 -o image.jpg
You can take a picture with raspistill and look at the jpeg to get which values for the gains the camera would chose for the white balance:

Code: Select all

raspistill -o  test.jpg
strings test.jpg | grep gain
this will return for example:

Code: Select all

ev=-1 mlux=-1 exp=62979 ag=542 focus=255 gain_r=0.777 gain_b=1.218  ...
in this case -awbg 0.777,1.218 would be a good starting value.

Candyjet
Posts: 56
Joined: Sun Jan 10, 2016 3:45 pm

Re: Raspistill parameter Question

Sun Jan 21, 2018 8:20 pm

Thanks for the replies.

I am now not sure where to go from here.

I am trying to use a NoIR camera and IR light as a motion sensing camera. I have the camera and light all set up and the program running. IR photos are working fine.

The program takes pictures and compares the results. If a number of pixels have changed, it is interpreted as motion, and a copy of the photo is stored.

The problem I have is that the hue of the photos appears to keep changing. This is interpreted as changes in pixels, and therefore motion, when in fact no motion has occurred.

I therefore thought that using the awb command would solve the problem.

Am I on the right track, or barking up the wrong tree completely?

Thanks,

CJ

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25423
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspistill parameter Question

Mon Jan 22, 2018 10:25 am

You could try just using the luminance channel of a YUV image (ie Y). Luminance is less likely to change like this.

IIRC, motion detection usually uses just the Y channel. For example, in H264 encoding, it uses the Y channel to work out similar blocks.

See raspistillyuv for details.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

Return to “Camera board”