Using YaDOF on A650

  • 9 Replies
  • 1180 Views
Using YaDOF on A650
« on: 10 / March / 2016, 10:37:37 »
Advertisements
I have this running, but have issues, need therapy.
http://chdk.wikia.com/wiki/UBASIC/Scripts:_yet_another_DOF_stacker

I can't make sense of it. I have too many "not sure"s.
I'm using an A650 not an A710 so ...?

When I run the script, it gets to
-set M/Av
-set focus
-set MF
-zoom_out for nearest
-zoom_in for inf


but as soon as I touch Zoom_out, zoom-in, or menu the script carries on, does the 5 second countdown and and starts taking.

Shouldn't it keep going round the Do loop until the user tells it to carry on?


And generally, does it matter what other CHDK features are enabled or not? Should overrides be on or off?



Re: Using YaDOF on A650
« Reply #1 on: 10 / March / 2016, 23:35:31 »
I'll take a look tomorrow.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Using YaDOF on A650
« Reply #2 on: 11 / March / 2016, 10:23:16 »
Thanks - curious as to what's (not) going on there. Could it be a setting I had?

But I've found one I like better, TimeFocus.bas.
It's better documented, closer to what I want, and......works!

Hmm, I shall need to alter the aperture mid stack, though.

Re: Using YaDOF on A650
« Reply #3 on: 11 / March / 2016, 12:49:45 »
Thanks - curious as to what's (not) going on there. Could it be a setting I had?
Okay, I took a look at the code.  And wished I had not done so.  Cannot "unsee".

What you noticed :
Quote
but as soon as I touch Zoom_out, zoom-in, or menu the script carries on, does the 5 second countdown and and starts taking.
is exactly what the code is written to do.  Which makes no sense if the zoom lever was intended to be used to set near and far focus setpoints as stated.

So I looked a bit closer at the code and decided it could be a text book example of why the "goto" statement in the BASIC language is so reviled.  As such, I'm not going to spend any more time looking at it.  Glad you found something you like better.
« Last Edit: 11 / March / 2016, 12:51:19 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Using YaDOF on A650
« Reply #4 on: 11 / March / 2016, 15:39:55 »
Thanks much. I was thinking, "what the hell am I missing". :'(

So that's 2 out of two scripts which , um, don't work. Though they've been sitting there for years.
Timefocus looks OK. Though I shall have to alter the aperture mid stack.
I need DOF to be more than 1mm.
Is there any reason why I shouldn't do that, after distance is xx mm, and still use Av to alter the shutter speed to compensate?

(Reason having run the numbers...
 - the image is diffraction limited at any aperture smaller than f/2.8, so I want to use f/2.8.
I've found on a couple of other Powershots that wide open is sharpest. Chromatic aberration etc, tba.
Being out of focus is worse though, so I need to start off at 4/5 or something to give me 1mm dof.)


I'll try a pic of some exciting graph paper...


Re: Using YaDOF on A650
« Reply #5 on: 11 / March / 2016, 18:52:16 »
Works.
63 shots, f/4. Inch graph paper. Reduced to 50%  size.
Jpeg artefacts quite strong.

Re: Using YaDOF on A650
« Reply #6 on: 11 / March / 2016, 19:13:56 »
Works.  63 shots, f/4. Inch graph paper. Reduced to 50%  size. Jpeg artefacts quite strong.
Nice!  Did  you modify the script?

Incidentally,  what are you using to post process those 63 shots?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Using YaDOF on A650
« Reply #7 on: 11 / March / 2016, 22:15:01 »
No mods yet. The stack starts at whatever focus is set. I may add an option to specify a distance.
There's obviously some CA there which might improve on stopping down, or raw processing. On many subjects it wouldn't show though.

I used Zerene stacker. Helicon is OK (costs more for a decent version) CombineZp is usually OK.
Photoshop is about the worst. Occasionally it's OK!

The LCD flexy has just started playing up :( . I'm hoping that if I don't unfold the screen it'll be ok. No spares around. A650 is good for the screen folding, close focus, auxilliary lens tube, and proper AA batteries. Wider angle would be nice for in-your face stuff.
I have an S100, good for its 24mm equiv f/2 lens but close focus is ??5cm, and no tube mounting - and tiny battery. Next along is the G series I guess.


Re: Using YaDOF on A650
« Reply #8 on: 12 / March / 2016, 00:57:28 »
Quote
and tiny battery.  Next along is the G series I guess
You can get past the battery issue with an external A/C supply.  Figure on $25 for something shipped from China,  $90 for the genuine Canon version.  The Chinese clone versions have worked pretty well for me.

You can also get used Powershots on eBay in this price range.  "A" series anyway - the G's tend to hold their value more.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Using Timefocus on A650
« Reply #9 on: 26 / April / 2016, 20:57:49 »
Getting old. I put the thing down for a few weeks then I've fogotten how it works...

It seems to have "gone wrong"!
In Timefocus you set the minimum focus distance and the range over which you want it to step the focus.

It was working, but now, though it appears on the screen to be stepping through, it's getting it wrong.

Say you want to start at 10mm and go to 30mm
It steps through, showing 1mm increments, but actually takes the picture at some other focus dictance like infinity, then it comes back to 11 or 12 or 13...
It's got out of phase somehow.
Can anyone see why it should alter the focussed distance apart from incrementing it?

To other annoyances
1) how do I move  the SN etc focus distance info from being all over the central spot ? I know I red about that somewhere but I've forgotten.

and
2)whenever I go to a new pic, I find the focus is at infinity so I have to bring it right down again.
I think it's meant to go back  to the minimum end, but it doesn't do that.
and

3) Can I try making the flash work? Any reason why it shouldn't?
I want to trigger external flash, wil have to use a slave I think.


Here it is. I'm not using the exposure altering facility at the moment.
Thanks

 rem Save as timefocus.bas
 rem uBASIC script by Eric Sandbo (kidtree) for CHDK, May 23, 2012
 rem combines exposure bracketing and focus stacking
 rem written for and tested on  Powershot S3 IS.
 rem Check use of variable M get_capture_mode for camera model compatibility.
 @title SHUTTER & FOCUS STACKING
 @param e Exposure steps
 @default e 3
 @param s Exposure step size (1/3rd)
 @default s 4
 print "Max. focus distance is 65.535m"
 @param m Focus depth, meters
 @default m 1
 @param c centimeters
 @default c 0
 @param l millimeters
 @default l 0
 @param f focus depth, feet
 @default f 0
 @param i inches
 @default i 0
 if e < 1 then let e = 1
 if e > 9 then let e = 9
 if s < 2 then let s = 2
 if s > 9 then let s = 9
 rem D is total depth in mm
 let D = (1000*m) + (10*c) + l + (305 * f) + (25 * i)
 rem N is manually-focused distance; F is far distance
 if D < 0 then let D = 0
 rem Save closest focus for later restoration.
 N = get_focus
 rem calculate Farthest focus to shoot
 F = N + D
 if F > 65535 then let F = 65535
 rem read mode dial setting.  Must be set to Av (4) or M (5)
 M = get_capture_mode
 sleep 20
 if not ((M = 4) or (M = 5)) then goto "wrong_mode"
 print "Manual focus on"
 print "closest point."
 print "Preview off?"
 print "Is remote enabled?"
 press "shoot_half"
 sleep 1800
 release "shoot_half"
 rem set focus variable to closest distance
 X = N
 rem get Center shutter speed from meter (Av mode) or user setting (Manual)
 if M = 4 then let C = get_tv96 else let C = get_user_tv96
 rem set to Lowest light bracket shot
 let L = (C + ((e-1)*(s*16)))
 if (D = 0) then gosub "one_shot" else gosub "focus_loop"
 goto "restore"
 
 :focus_loop
     do
         set_focus X
         sleep 100
         H = get_dof
         sleep 50
         if (H = 0) then H = 1
         gosub "report"
         gosub "exp_bracket"
         rem  H is -1 means DOF reaches to infinity, and we've finished.
         if (H = -1) then goto "restore"
         X = X + H
     until X >= F
     set_focus F
     H = get_dof
     sleep 50
     set_focus (F-(H/3))
     sleep 100
     gosub "report"
     gosub "exp_bracket"
     return     
 :report
     cls
     print "Focus =", X; "mm"
     print "DOF =", H
     print "Far =", F
     sleep 1500
     return
 :one_shot
     gosub "exp_bracket"
     return
 :exp_bracket
     for S = 0 to (e-1)
         let T = (L - (S*(s*32)))
         set_tv96_direct T
         sleep 50
         rem print "Shot", (S+1)
         rem sleep 1500
         click "shoot_full"
         do
             A = get_shooting
             sleep 30
         until (A = 1)
         do
             A = get_shooting
             sleep 30
         until (A = 0)
     next S
     return   
 :wrong_mode
     print "set dial to"
     print "Av or M"
     goto "restore"
 :restore
     set_tv96 C
     set_focus N
     print "Ending now."
     end

 

Related Topics