Averaging them does tent to blr the result. I did that with my old camera. This 
one has it's own sensor, which is good. However, the last few images at dusk 
are pretty pror quality. I tried to count the number of discrete colours in the 
image

NumColours=`identify -verbose /var/www/html/weather/images/current.jpg | grep 
Colors: | awk '{print $2}'`

but it's not really any use. Identify does give you a min/max/ave/std dev on 
each channel, which may help?

Steve


On Tue, 10 Oct 2006 19:57:16 +1300
Craig FALCONER <[EMAIL PROTECTED]> wrote:

> Just keep the last 10 images or something... Not really a big deal.
> 
> -----Original Message-----
> From: Andrew Errington [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, 10 October 2006 2:51 p.m.
> To: [email protected]
> Subject: OT: Light-level in an image
> 
> 
> Hi,
> 
> Can anyone comment knowledgably on determining the light level in a JPG 
> image snapped by a webcam?
> 
> I have the simple requirement of taking hourly snapshots from my webcam in 
> the back garden and posting them on my webpage.  At the moment I have a 
> cron job, which I tweak during the year to adjust when it takes a picture 
> (i.e from 8 to 5 in winter to 5 till 10 in summer), but really it should be 
> automated.  I could rig up a light sensor, and the PC could query it before 
> taking a webcam image, but really, the webcam itself is a light sensor 
> (duh!).
> 
> I am thinking of the imagemagick 'identify' command, and maybe extracting 
> the mean value of the red, green and blue channels and comparing them to a 
> hard limit.  Does this idea have merit, or is there a better tool?
> 
> I could also just look at the file size: at night the images are mostly 
> black, which compresses to a very small file size.
> 
> Comments are welcome,
> 
> Thanks,
> 
> Andrew
> 
> 

Reply via email to