Av value changing - General Help and Assistance on using CHDK stable releases - CHDK Forum  

Av value changing

  • 4 Replies
  • 2167 Views
Av value changing
« on: 21 / January / 2019, 02:10:25 »
Advertisements
I hope someone can supply some insight to the following.

I'm changing aperture in the following function call in my script:

Code: [Select]
function bookend()
    if b == 1 then
        set_tv96(960)
        set_av96(640)
        shoot()
        set_tv96(s)
        set_av96(av)
    end
end

What I notice is that the first image taken after the above is different to subsequent images.

For example, I have set F/4 on the camera and record s and av at the start of the script.
I then call bookend() above, wait a few seconds, then take my first image, but I notice it is F/4.5 (ie an av96 value of 416). I then loop, taking more images and without touching the aperture, they are recorded at F/4 (an av96 value of 384, ie it has changed), ie it is not F/4.5 as with the first image.

As I say, any insight gratefully received.

Cheers

Garry

Re: Av value changing
« Reply #1 on: 21 / January / 2019, 09:41:18 »
I have a couple of questions.

First of all, I assume you are looking at the f-stop values stored in the image EXIF info?  Do you actually see an exposure difference in your images when you ruin the test?

Secondly, did you try using set_av96_direct( ) instead of set_av96( )?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Av value changing
« Reply #2 on: 21 / January / 2019, 11:59:40 »
@waterwingz

The use of set_av96_direct 'fixed' the problem.
What's happening with set_av96?
After all, I don't change the exposure settings between images.
Thanks for pointing me in the right direct.
Cheers
Garry

Re: Av value changing
« Reply #3 on: 21 / January / 2019, 13:38:30 »
@waterwingz
What's happening with set_av96?
After all, I don't change the exposure settings between images.
There are two things happening to cause what you see. 

First of all, set_av( ) rounds off the passed APEX96 to the nearest valid f-stop value as defined by the person who ported your camera model. If that person only picked even values instead of 1/3 or 1/2 f-stop increments then any value between f4 and f5.6 gets rounded down to f4.   Fixing that requires expanding the appropriate table in the source code and recompiling.

Secondly, I think there is a timing offset between when you set the f-stop value to be used and when it is actually applied.  So the rounding off happens when the shot is taken, not when you set the aperture value.
« Last Edit: 21 / January / 2019, 13:40:02 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Av value changing
« Reply #4 on: 21 / January / 2019, 13:42:50 »
@waterwingz


Once again: thanks for the insight.


I've refactored my code.


Thanks.


Garry

 

Related Topics