KAP & UAV Exposure Control Intervalometer Script

  • 957 Replies
  • 59809 Views
*

Offline tokm

  • *
  • 18
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #950 on: 18 / March / 2017, 11:31:10 »
Advertisements
I don't have the kap.log files from previous flights but here are two images from the same flight. I resize them so I could attach to this post.
Now we are getting somewhere.  Assuming the resize operation did not mangle the internal EXIF info, this is quite interesting.  You've picked two sequential shots with dramaticly different exposures.

Here's the info from the EXIF data :

Code: [Select]
IMG_0569.JPG  Tv :  1/1250   Av: f9.0  Sv: 160
IMG_0570.JPG  Tv :  1/1250   Av: f3    Sv: 200

Same shutter speed, slightly higher sensitivity in the second (brighter) image.  Not enough to explain the exposure difference though.

But notice the Av (aperture value) settings :  f9.0  vs f3!! This is a huge change - enough to completely explain the exposure difference.  But note my previous comment - the A4000 does not have an adjustable aperture. The fixed aperture should be reported as somewhere between F3 & F5.9 depending on the zoom position (the effective aperture gets smaller as you zoom in).  If you are shooting at the widest angle, that would be f3.   So that only leaves one thing - the internal switchable neutral density filter.

In the first image - the underexposed one - the image EXIF information indicates that the internal ND filter was used.  In the second, correctly exposed image it was not. Why?

This is where it would be really nice to have the KAP.LOG file.  I'm pretty certain that the script did not try to insert the ND filter in the first shot.  In fact, it would have tried to force the ND filter to stay out.  But the Canon exposure logic appears to have inserted it - ignoring CHDK's override.

All of which leads me to the conclusion that the script command that controls the ND filter might not work on your A4000.

We can test that if you have time.  I've attached a little script that takes two sequential shots - one in "auto" and the other with the ND filter forced to the opposite state from whatever the camera picks for the first shot.   If you point the camera at something really bright (a 60W light bulb from 12" away for example) and shoot in Canon AUTO mode, it should insert the ND filter.  Let's see if a script can override that in the second shot.  Do the resulting images look the same or different?


Edit : is seems that I have been down this road before without a clear resolution : ND filter swinging in even when "ND filter state" is "Out"  A work-around might be to configure the camera so that it does not try to use the ND filter on its own. Not sure what those settings are though.

I will test this Monday and let you know.  Thank you again for all your help.  Keep in mind the exact same thing happened with the A3400 in OneShot mode.  It's 100% hit or miss.  I flew 5 flights that day, the first one was flawless and every image was perfect.  It was roughly the same time of day too, so the brightness shouldn't have changed too much between flights.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #951 on: 18 / March / 2017, 11:57:09 »
Keep in mind the exact same thing happened with the A3400 in OneShot mode. 
I can't find anything in the A3400 or A4000 porting thread indicating that the ND filter override was ever tested.  It's possible neither of them work properly - they were probably created from the same code base.  And they were both done as "blind ports" - meaning the CHDK developer did not have access to the camera during the porting process.  Testing was likely left to CHDK beginners and may not have been too complete.

The USB mode used should not be an issue relative to this problem.

Quote
It's 100% hit or miss.  I flew 5 flights that day, the first one was flawless and every image was perfect.  It was roughly the same time of day too, so the brightness shouldn't have changed too much between flights.
The constant brightness makes me wonder why the camera would decide to activate the ND filter on its own.  It really should have set it in or out and left it there - seems unlikely it would change it. But if the script set_nd_filter( ) function is flakey, it could cause changes each shot.

So it's also possible the script has a bug. But with over 7100 downloads to-date,  I would have expected this to have been mentioned before.  And the script logic for controlling the ND filter is pretty simple.
« Last Edit: 18 / March / 2017, 12:10:48 by waterwingz »
Ported : A1200  SD940  G10  Powershot N  G16*

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #952 on: 18 / March / 2017, 12:31:36 »
I will test this Monday and let you know. 
In addition to the ndtest script, it would be instructive to know if the ND Filter State setting in the CHDK Enhanced Photo Operation menu works properly.

With the camera in Canon AUTO mode,  take three shots of the same subject, changing the setting of that option between shots :  [ Off ]  , [  In ] , [ Out ].  Make sure the Disable Overrides menu option is set to [ No ] and that no other overrides are enabled.

You should see one of the three shots (typically the one corresponding to the [ In ] setting) be much darker than the others.
Ported : A1200  SD940  G10  Powershot N  G16*

*

Offline tokm

  • *
  • 18
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #953 on: 20 / March / 2017, 08:57:27 »
I don't have the kap.log files from previous flights but here are two images from the same flight. I resize them so I could attach to this post.
Now we are getting somewhere.  Assuming the resize operation did not mangle the internal EXIF info, this is quite interesting.  You've picked two sequential shots with dramaticly different exposures.

Here's the info from the EXIF data :

Code: [Select]
IMG_0569.JPG  Tv :  1/1250   Av: f9.0  Sv: 160
IMG_0570.JPG  Tv :  1/1250   Av: f3    Sv: 200

Same shutter speed, slightly higher sensitivity in the second (brighter) image.  Not enough to explain the exposure difference though.

But notice the Av (aperture value) settings :  f9.0  vs f3!! This is a huge change - enough to completely explain the exposure difference.  But note my previous comment - the A4000 does not have an adjustable aperture. The fixed aperture should be reported as somewhere between F3 & F5.9 depending on the zoom position (the effective aperture gets smaller as you zoom in).  If you are shooting at the widest angle, that would be f3.   So that only leaves one thing - the internal switchable neutral density filter.

In the first image - the underexposed one - the image EXIF information indicates that the internal ND filter was used.  In the second, correctly exposed image it was not. Why?

This is where it would be really nice to have the KAP.LOG file.  I'm pretty certain that the script did not try to insert the ND filter in the first shot.  In fact, it would have tried to force the ND filter to stay out.  But the Canon exposure logic appears to have inserted it - ignoring CHDK's override.

All of which leads me to the conclusion that the script command that controls the ND filter might not work on your A4000.

We can test that if you have time.  I've attached a little script that takes two sequential shots - one in "auto" and the other with the ND filter forced to the opposite state from whatever the camera picks for the first shot.   If you point the camera at something really bright (a 60W light bulb from 12" away for example) and shoot in Canon AUTO mode, it should insert the ND filter.  Let's see if a script can override that in the second shot.  Do the resulting images look the same or different?

Edit 1 : is seems that I have been down this road before without a clear resolution : ND filter swinging in even when "ND filter state" is "Out"  A work-around might be to configure the camera so that it does not try to use the ND filter on its own. Not sure what those settings are though.

Edit 2 : it looks like nafraf did the A4000 port blind.  I don't see anything in the porting thread that indicates the ND filter override was actually tested.

Here are the results of the ndtest.lua.  I made sure that Disable Overrides was set to No. I'll post the log, then the two images.


*

Offline tokm

  • *
  • 18
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #954 on: 20 / March / 2017, 08:59:01 »
Here are the images

*

Offline tokm

  • *
  • 18
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #955 on: 20 / March / 2017, 14:36:03 »

When you set the script to [ Pixhawk ] mode, it expects at 3 mSec pulse from the pixhawk to start shooting and another 3 mSec pulse for each additional shot.  According to the test script logs from either camera,  your setup is generating 100 mSec pulses. 

The KAP.LOG file for your A3400 also shows it receiving only 100 mSec pulses - which is why it does not start shooting.


Good news on the USB Control setting for pixhawk.  The default setting in Mission Planner for CAM_DURATION is 1 (in 10ths of a second).  I changed this setting to .3 to send the 3 millisecond pulse and now both cameras trigger correctly using USB Control = Pixhawk.

KAP & UAV Exposure Control Intervalometer Script
« Reply #956 on: 20 / March / 2017, 22:23:44 »
I changed this setting to .3 to send the 3 millisecond pulse and now both cameras trigger correctly using USB Control = Pixhawk.
That makes sense. 

But there is still a potential issue with the ND filter. 

The images you posted suggest that it is working - or at least that it can force the filter in. Your mobile phone lamp isn't really bright enough to force the filter in.  A 60w build from 12" away would be a better subject.

Try setting the ISO high with the Canon menu and see if you can get the script's first shot to have the filter inserted? That should produce an over exposed second shot, showing that the filter can also be forced out?
« Last Edit: 20 / March / 2017, 22:26:12 by waterwingz »
Ported : A1200  SD940  G10  Powershot N  G16*

*

Offline tokm

  • *
  • 18
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #957 on: 21 / March / 2017, 06:40:22 »
I changed this setting to .3 to send the 3 millisecond pulse and now both cameras trigger correctly using USB Control = Pixhawk.
That makes sense. 

But there is still a potential issue with the ND filter. 

The images you posted suggest that it is working - or at least that it can force the filter in. Your mobile phone lamp isn't really bright enough to force the filter in.  A 60w build from 12" away would be a better subject.

Try setting the ISO high with the Canon menu and see if you can get the script's first shot to have the filter inserted? That should produce an over exposed second shot, showing that the filter can also be forced out?

Ok I will retest with a brighter object.  I probably won't be able to test today but I will test and post the results ASAP.


 

Related Topics