Reverse dark/bright shot order in continuous bracketing - General Discussion and Assistance - CHDK Forum

Reverse dark/bright shot order in continuous bracketing

  • 6 Replies
  • 5109 Views
Reverse dark/bright shot order in continuous bracketing
« on: 13 / December / 2012, 23:30:17 »
Advertisements
Is there any way  to reverse the dark/bright shot order in continuous bracketing.  CHDK does [normal, bright, dark].  Most other cameras seem to be doing [normal, dark, bright] and I have gotten used to that order when using the files in the HDR software.  Not a big deal, but if there is some customizable option it will be nice.  Thanks.


Re: Reverse dark/bright shot order in continuous bracketing
« Reply #1 on: 14 / December / 2012, 00:05:33 »
I assume you are using the simple example HDR script included with the CHDK install file ?  ( hdr.bas or hdr.lua )

If so, then here you go,  normal, dark and then light.  Replace the text in the existing scripts with this.

uBASIC version   : hdr.bas
Code: [Select]
@title High Dynamic Range
print "1) normal"
 shoot
 set_aflock 1
 get_av96 p
 get_sv96 s
 get_tv96 t
print "2) dark"
 set_tv96_direct t+192
 set_sv96 s
 set_av96 p
 shoot
print "2) bright"
 set_tv96_direct t-192
 set_sv96 s
 set_av96 p
 shoot
 set_aflock 0
print "...done"

Lua version : hdr.lua
Code: [Select]
--[[
@title High Dynamic Range
--]]
print("1) normal")
  shoot()
  set_aflock(1)
  p=get_av96()
  s=get_sv96()
  t=get_tv96()
print("2) dark")
  set_tv96_direct(t+192)
  set_sv96(s)
  set_av96(p)
  shoot()
print("3) bright")
  set_tv96_direct(t-192)
  set_sv96(s)
  set_av96(p)
  shoot()
set_aflock(0)
print("...done")
« Last Edit: 14 / December / 2012, 00:07:27 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: Reverse dark/bright shot order in continuous bracketing
« Reply #2 on: 14 / December / 2012, 02:00:11 »
I think he's talking about the CHDK enhanced photo operations menu option "Bracketing in continuous mode." It works without a script running.

You'd need to change the code in shooting.c that does bracketing and re-compile CHDK. Have you done that before?

I think the statements to change would be:
    is_odd=(bracketing.shoot_counter&1);

If you changed it to:
    is_odd=(bracketing.shoot_counter&1^1);
it would switch odd and even, and might do the trick. It would sure confuse anyone looking at the code!

There are several identical statements like this in shooting.c for each type of bracketing. I'm not certain it would work, but it would be worth a try.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Reverse dark/bright shot order in continuous bracketing
« Reply #3 on: 14 / December / 2012, 13:01:40 »
Yes, I was not talking about the scripts.  Tweaking the .c files and recompiling seems to a bit beyond my skill level.  I will see if I can take a shot at it.  Does the src not come with the standard CHDK download that I have on my SD card?
« Last Edit: 14 / December / 2012, 13:04:13 by pannayar »


*

Offline lapser

  • *****
  • 1093
Re: Reverse dark/bright shot order in continuous bracketing
« Reply #4 on: 14 / December / 2012, 15:02:55 »
Yes, I was not talking about the scripts.  Tweaking the .c files and recompiling seems to a bit beyond my skill level.  I will see if I can take a shot at it.  Does the src not come with the standard CHDK download that I have on my SD card?
What camera and firmware revision do you have? I want to test it for myself to see if it works, and I'll post a file for you if it does. I'm still learning, so if you really want to get into C programming CHDK, start with the developer links on the WIKI and see if someone more experienced here can help when you have problems.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Reverse dark/bright shot order in continuous bracketing
« Reply #5 on: 14 / December / 2012, 15:47:46 »
There are currently three option under the 'Bracketing Type' menu item:
    '+' takes shots at 0,+1,+2 exposures
    '+/-' takes shots at 0,+1,-1 exposures
    '-' takes shots at 0,-1,-2 exposures

Personally I think having -1,0,+1 would be of more use; but adding 0,-1,+1 would probably be useful as well.

(The +1, -1, etc values are not absolute, they are multiplied by the other bracketing override step values).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline lapser

  • *****
  • 1093
Re: Reverse dark/bright shot order in continuous bracketing
« Reply #6 on: 14 / December / 2012, 16:34:56 »
There are currently three option under the 'Bracketing Type' menu item:
    '+' takes shots at 0,+1,+2 exposures
    '+/-' takes shots at 0,+1,-1 exposures
    '-' takes shots at 0,-1,-2 exposures

Personally I think having -1,0,+1 would be of more use; but adding 0,-1,+1 would probably be useful as well.

(The +1, -1, etc values are not absolute, they are multiplied by the other bracketing override step values).

Phil.
Great explanation, as usual. My odd even switch idea was just another of my odd ideas that didn't work. But this did:

(shooting.c 1.2 line 1353)
Code: [Select]
    if (((!is_odd) && (conf.bracket_type==0)) || (conf.bracket_type==1))
        value=bracketing.tv96+bracketing.dtv96; //switched - to +
    else value=bracketing.tv96-bracketing.dtv96; //switched + to -
This could be done for sv & av bracketing as well. It looks like it also switches the '-' option to '+', and vice versa. Confusing eh?

I didn't notice the extra options. It would be easy to switch +- to -+, but not easy to add another option. It would probably be best if CHDK followed whatever convention cameras with built in bracketing use. Is there one?
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal