Zoom bug. - General Discussion and Assistance - CHDK Forum

Zoom bug.

  • 10 Replies
  • 5286 Views
*

Offline ADamb

  • **
  • 65
  • sx200is
Zoom bug.
« on: 07 / October / 2009, 15:17:41 »
Advertisements
There is a bug if zoom is used from script - focus data is not updated in EXIF.
Consider following script:
Code: (lua) [Select]
--[[
@title ZOOM MIN MAX
]]

function fastshoot()
  press("shoot_half")
  repeat
    sleep(1)
  until get_shooting() == true
  press("shoot_full")
  release("shoot_full")
  release("shoot_half")
  repeat
    sleep(1)
  until get_shooting() ~= true
end

set_zoom(0)
sleep(1000)
--first shoot
fastshoot()
set_zoom(get_zoom_steps()-1)
sleep(1000)
--second shoot
fastshoot()
--195 is prop for sx200is zoom position
set_prop(195,get_zoom_steps()-1)
sleep(1000)
--third shoot
fastshoot()

Second shoot has the same FocalLength  EXIF data as first shoot, despite camera has maximal zoom.
Third shot will have correct FocalLength data.
Solution for this bug is updating of OpticalZoom propcase in lens_set_zoom_point (platform/generic/wrappers.c)
Included patch has PROPCASE_OPTICAL_ZOOM_POSITION added to propset2.h and propset1.h(untested).
Tested on sx200is.
Do other cams have the same problem?
SX200 IS-100C

*

Offline reyalp

  • ******
  • 12875
Re: Zoom bug.
« Reply #1 on: 07 / October / 2009, 20:38:59 »
Generally speaking, it's not expected that exif data will match override values (edit: sometimes it does, sometimes it doesn't). Not that fixing that is a bad thing, if it has no other side effects.
Don't forget what the H stands for.

*

Offline fe50

  • ******
  • 3123
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Zoom bug.
« Reply #2 on: 08 / October / 2009, 01:13:11 »
@ADamb:
Are the informations in the EXIF Makernotes the correct ones ?

*

Offline ADamb

  • **
  • 65
  • sx200is
Re: Zoom bug.
« Reply #3 on: 08 / October / 2009, 01:52:07 »
@fe50
I looked at $Canon:FocalLength (using exiftool command line for dng4ps2 calibration).
Values were OK after patch (5/60mm). Are there more tags for FocalLength?
SX200 IS-100C


*

Offline fe50

  • ******
  • 3123
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Zoom bug.
« Reply #4 on: 08 / October / 2009, 02:36:06 »
@fe50
I looked at $Canon:FocalLength (using exiftool command line for dng4ps2 calibration).
Values were OK after patch (5/60mm). Are there more tags for FocalLength?

FocalLength should be the right one; probably the same value is also in "ShortFocal"...

Is the value in $Canon:FocalLength in an image from an unpatched CHDK correct ?

*

Offline ADamb

  • **
  • 65
  • sx200is
Re: Zoom bug.
« Reply #5 on: 08 / October / 2009, 02:45:24 »
@fe50
It is not correct, if any zoom manipulations (set_zoom_rel, set_zoom) are called from script (Focal value is not updated).
So unpached CHDK will give 5/5mm instead of 5/60mm for minimal/maximal zoom.

Just run the script until "--195 is prop for sx200is zoom position".
« Last Edit: 08 / October / 2009, 02:47:09 by ADamb »
SX200 IS-100C

*

Offline fe50

  • ******
  • 3123
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Zoom bug.
« Reply #6 on: 08 / October / 2009, 03:03:20 »
@fe50
It is not correct, if any zoom manipulations (set_zoom_rel, set_zoom) are called from script (Focal value is not updated).
So unpached CHDK will give 5/5mm instead of 5/60mm for minimal/maximal zoom.

Just run the script until "--195 is prop for sx200is zoom position".

Thx for testing.
I'll test it with my SX10, SD870 & SD400 this evening & report...

*

Offline fe50

  • ******
  • 3123
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Zoom bug.
« Reply #7 on: 10 / October / 2009, 08:10:16 »
@fe50
It is not correct, if any zoom manipulations (set_zoom_rel, set_zoom) are called from script (Focal value is not updated).
So unpached CHDK will give 5/5mm instead of 5/60mm for minimal/maximal zoom.
Just run the script until "--195 is prop for sx200is zoom position".

Thx for testing.
I'll test it with my SX10, SD870 & SD400 this evening & report...

@Adamb:
Sorry for the delay, was busy...

Tested, it's the same on all my cams...
   SX10:  5mm   | 5mm   | 100mm   (Digic IV, prop 195)
   SD870: 4.6mm | 4.6mm | 17.3mm  (Digic III, prop 195)
   SD400: 5.8mm | 5.8mm | 17.4mm  (Digic II, prop 99)


@reyalP
IMO since it's that easy & we have definitively a "wrong" FL value in the MakerNotes, we should fix it !


*

Offline reyalp

  • ******
  • 12875
Re: Zoom bug.
« Reply #8 on: 10 / October / 2009, 21:41:14 »

@reyalP
IMO since it's that easy & we have definitively a "wrong" FL value in the MakerNotes, we should fix it !
Agreed!
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12875
Re: Zoom bug.
« Reply #9 on: 08 / November / 2009, 00:49:56 »
Added, changeset 830. Note that http://chdk.wikia.com/wiki/Propertycase propcase #192 is zoom on SX10. I'm assuming that 195 also works on sx10 ? If not, we have a problem.
Don't forget what the H stands for.

 

Related Topics