Curious about correcting exposure times for time-series imagesets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Curious about correcting exposure times for time-series imagesets

Kinata
Hi...
I have several series of time-lapse photos of transport of fluorescent dye
in leaves, 120 pics/series.
Wanting to measure increase of dye in a leaf overall by counting the number
of pixels containing
beyond a certain threshold of that dye color.

We've been driving a Canon A40 camera with remote-control software that let
us set everything
but exposure time. Didn't think that there would be much variation in this,
but it turned out that
exposure times ranged from 1 sec (darkroom, UV light) to about 1/20sec. This
has pretty much
leveled the dye data overall, unfortunately.

I've written batch processing code for extracting EXIF data from each JPEG
image for the exposure
time. Questions:

1) Assuming that the best approach would be to decrease the image brightness
inverse-proportionally
to exposure time, is there a "sanctioned" algorithm for doing this? If we
could do this over again, I
would include a reference card (white, 50% gray, black) in each pic  for
equalizing levels. Instead,
thinking that I'll use a rectangular region in the image that should be
invariant across each series,
and equalize with that even though it's not grayscale.

2) It doesn't seem that equalizing histograms would be viable, as the images
get brighter as the
dye migrates through each leaf.

2) Is there a better way to do this? Dare I hope that someone has done a
plug-in for this?

Regards,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: Curious about correcting exposure times for time-series imagesets

Gluender-3
Chris,

besides your core question and because you are using a consumer camera:

        Did you compensate for this camera's gamma?

Before you do any scientific image analysis or processing, make sure
that the image data doesn't suffer from any nonlinear transduction
process.

>Hi...
>I have several series of time-lapse photos of transport of
>fluorescent dye in leaves, 120 pics/series.
>Wanting to measure increase of dye in a leaf overall by counting the
>number of pixels containing
>beyond a certain threshold of that dye color.
>
>We've been driving a Canon A40 camera with remote-control software
>that let us set everything
>but exposure time. Didn't think that there would be much variation
>in this, but it turned out that
>exposure times ranged from 1 sec (darkroom, UV light) to about
>1/20sec. This has pretty much
>leveled the dye data overall, unfortunately.
>
>I've written batch processing code for extracting EXIF data from
>each JPEG image for the exposure
>time. Questions:
>
>1) Assuming that the best approach would be to decrease the image
>brightness inverse-proportionally
>to exposure time, is there a "sanctioned" algorithm for doing this?
>If we could do this over again, I
>would include a reference card (white, 50% gray, black) in each pic
>for equalizing levels. Instead,
>thinking that I'll use a rectangular region in the image that should
>be invariant across each series,
>and equalize with that even though it's not grayscale.
>
>2) It doesn't seem that equalizing histograms would be viable, as
>the images get brighter as the
>dye migrates through each leaf.
>
>2) Is there a better way to do this? Dare I hope that someone has
>done a plug-in for this?
>
>Regards,
>Chris

Best
--

                   Herbie

          ------------------------
          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Curious about correcting exposure times for time-series imagesets

Michael Schmid
Hi Chris,

apart form the nonlinearity problem (which is really important!):

Most Canon cameras have a long exposure mode (night mode, typically 1  
second to 15 seconds) where you can set the exposure manually. In  
this mode, the camera also takes a dark frame and subtracts it from  
the image. It might work without overexposure if you choose a low ISO  
value.

For the shorter exposure times, it might help to make test exposures  
of two light sources, one with variable brightness to force the  
camera change the exposure, and in the same image one light source of  
fixed brightness. Then you will see how it scales with exposure time  
(this will also tell you something about nonlinearity).

Michael
________________________________________________________________

On 16 Feb 2010, at 11:12, Gluender wrote:

> Chris,
>
> besides your core question and because you are using a consumer  
> camera:
>
> Did you compensate for this camera's gamma?
>
> Before you do any scientific image analysis or processing, make  
> sure that the image data doesn't suffer from any nonlinear  
> transduction process.
>
>> Hi...
>> I have several series of time-lapse photos of transport of  
>> fluorescent dye in leaves, 120 pics/series.
>> Wanting to measure increase of dye in a leaf overall by counting  
>> the number of pixels containing
>> beyond a certain threshold of that dye color.
>>
>> We've been driving a Canon A40 camera with remote-control software  
>> that let us set everything
>> but exposure time. Didn't think that there would be much variation  
>> in this, but it turned out that
>> exposure times ranged from 1 sec (darkroom, UV light) to about  
>> 1/20sec. This has pretty much
>> leveled the dye data overall, unfortunately.
>>
>> I've written batch processing code for extracting EXIF data from  
>> each JPEG image for the exposure
>> time. Questions:
>>
>> 1) Assuming that the best approach would be to decrease the image  
>> brightness inverse-proportionally
>> to exposure time, is there a "sanctioned" algorithm for doing  
>> this? If we could do this over again, I
>> would include a reference card (white, 50% gray, black) in each  
>> pic for equalizing levels. Instead,
>> thinking that I'll use a rectangular region in the image that  
>> should be invariant across each series,
>> and equalize with that even though it's not grayscale.
>>
>> 2) It doesn't seem that equalizing histograms would be viable, as  
>> the images get brighter as the
>> dye migrates through each leaf.
>>
>> 2) Is there a better way to do this? Dare I hope that someone has  
>> done a plug-in for this?
>>
>> Regards,
>> Chris
>
> Best
> --
>
>                   Herbie
>
>          ------------------------
>          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Curious about correcting exposure times for time-series imagesets

Kinata
Thanks Michael and Herbie for your help. Much to learn about
in this very interesting field.

I'm helping my son with a 6th grade science project, so extreme accuracy
isn't important. He's investigating the effect of electric fields on
nutrient
transport in plants as represented by the rate of absorption of fluorescent
dye in sample leaves. We're only interested in the relative differences
between
having a positive field gradient, reversing it, and having no field.

I was helping him with automating a _very_ basic image analysis procedure,
so that we could arrive at a curve of the area of the leaf containing dye
(without
regard to the quantity of dye at a particular pixel) versus time. We had the
Canon
software which gave us incomplete control over imaging parameters. (There's
a cool package called the Canon Hack Development Kit, described at
chdk.wikia.com, but alas, our Canon isn't supported.) After we saw that
the exposure times were quite variable, I played with various arbitrary
algorithms for scaling image brightness proportionally, and soon realized
that I didn't have much foundation for assuming anything about a
mathematical
function that associates exposure time and image brightness. This left only
an empirical approach using a reference card containing grayscale levels.

In case you're curious, you can view a time-lapse video of a series at
www.youtube.com/watch?v=lCA-icUim6M

Best regards,
Chris