Using set_zoom causes pincushion distortion on S100 - Script Writing - CHDK Forum  

Using set_zoom causes pincushion distortion on S100

  • 14 Replies
  • 7015 Views
Using set_zoom causes pincushion distortion on S100
« on: 29 / September / 2015, 16:16:17 »
Advertisements
I'm having a problem with the set_zoom command on a PowerShot S100. When I use the set_zoom command, the resulting image has severe pincushion distortion. This only happens when I use the set_zoom command from a CHDK script. If I set the zoom manually and then take a photo with the shoot command there is no distortion. If CHDK is not in ALT mode, there is no distortion.

I've updated the S100's firmware, and I've tried setting different zoom speeds with set_zoom_speed, but it hasn't helped.

I used set_zoom without a problem on my previous cameras, an SD400 and an SD1100, but the S100 is giving me fits!

Any suggestions would be appreciated. Thank you!

*

Online reyalp

  • ******
  • 14080
Re: Using set_zoom causes pincushion distortion on S100
« Reply #1 on: 29 / September / 2015, 16:39:43 »
Unfortunately this is a known problem with many recent cameras, the method CHDK uses to set the zoom doesn't update the values used by Canon's distortion correction code. What Canon firmware does your s100 have? There is an alternate zoom method we can use which may help.

Another alternative is to use repeated click() key press calls to set the zoom. However, this is slow, and it can be difficult to get a precise zoom level.
Don't forget what the H stands for.

Re: Using set_zoom causes pincushion distortion on S100
« Reply #2 on: 30 / September / 2015, 12:24:01 »
Thank you for the explanation. The firmware version on my S100 is 1.02A, and I have CHDK version 1.3.0-4218 installed.

*

Online reyalp

  • ******
  • 14080
Re: Using set_zoom causes pincushion distortion on S100
« Reply #3 on: 30 / September / 2015, 22:31:10 »
Here's a test build with CAM_USE_ALT_PT_MoveOpticalZoomAt defined. This may help, but may still give different results from setting the zoom using the camera buttons.
Don't forget what the H stands for.


Re: Using set_zoom causes pincushion distortion on S100
« Reply #4 on: 07 / October / 2015, 15:29:06 »
The test build appears to eliminate the distortion when I use set_zoom. Thank you!

Re: Using set_zoom causes pincushion distortion on S100
« Reply #5 on: 19 / October / 2015, 16:31:20 »
Upon further review, I would add this caveat: The test build works if the S100 is in full auto mode. When I try to use set_zoom in Program AE or aperture priority modes, the camera freezes up and shuts down.

*

Online reyalp

  • ******
  • 14080
Re: Using set_zoom causes pincushion distortion on S100
« Reply #6 on: 01 / November / 2015, 18:36:33 »
Upon further review, I would add this caveat: The test build works if the S100 is in full auto mode. When I try to use set_zoom in Program AE or aperture priority modes, the camera freezes up and shuts down.
Thanks for the report. Can you confirm that the regular autobuild does not crash with the same settings?

A romlog from the crash that may provide useful information. See http://chdk.wikia.com/wiki/Debugging#Camera_crash_logs_.28romlog.29

Also, check whether you have continuous AF or Server AF enabled in the canon menus.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Using set_zoom causes pincushion distortion on S100
« Reply #7 on: 02 / November / 2015, 14:37:08 »
I think CAM_NEED_SET_ZOOM_DELAY needs to be more than 1 (it also defines the delay in milliseconds).


Re: Using set_zoom causes pincushion distortion on S100
« Reply #8 on: 08 / November / 2015, 12:02:25 »
Quote
Also, check whether you have continuous AF or Server AF enabled in the canon menus.

After reading this suggestion, I checked the Servo AF menu setting and found that it was turned off. When I turned Servo AF on, I was able to use the set_zoom command in all of the camera modes without any problems!


*

Online reyalp

  • ******
  • 14080
Re: Using set_zoom causes pincushion distortion on S100
« Reply #9 on: 08 / November / 2015, 15:24:26 »
Quote
Also, check whether you have continuous AF or Server AF enabled in the canon menus.

After reading this suggestion, I checked the Servo AF menu setting and found that it was turned off. When I turned Servo AF on, I was able to use the set_zoom command in all of the camera modes without any problems!
Thanks. I suspect you will find this means that the camera doesn't re-focus correctly after you use set_zoom. Normally, after you use set_zoom CHDK will attempt to re-focus, but CHDK focus functions are known to have problems with servo AF, so the re-focus won't be attempted when it's on.

Per srsa's post above, here's a build with CAM_NEED_SET_ZOOM_DELAY set to 150. Please test this with Servo AF (and continuous AF, it it's available on your camera) turned off.
Don't forget what the H stands for.

 

Related Topics