Powershot SX150 IS Porting Thread - page 27 - General Discussion and Assistance - CHDK Forum

Powershot SX150 IS Porting Thread

  • 279 Replies
  • 126046 Views
*

Offline reyalp

  • ******
  • 14125
Re: Powershot SX150 IS Porting Thread
« Reply #260 on: 08 / February / 2015, 18:39:31 »
Advertisements
Thanks, I've checked these changes in.
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #261 on: 16 / June / 2015, 14:32:37 »
Using sx150is-100a-1.4.0-r4153-full (and chdkptp-r658-win32).

Apparently this camera cannot autofocus at subject distance less than 1 metre (with any significant zoom).

With camera at full zoom (zoom step 127), pointed at a wallpapered flat surface 60cm distance and half-press, get_shooting returns true, chdkptp GUI console:

Code: [Select]
> lua post_levent_to_ui('PressSwOne')
> = return get_shooting()
6:return:true

AF frame (imagine yellow please) and ! shown in screenshot attached.

?

(Conditions: Aperture Priority mode, AF-Point Zoom = On, Servo AF = Off, Continuous AF = Off)
« Last Edit: 16 / June / 2015, 14:43:05 by andrew.stephens.754365 »

*

Offline srsa_4c

  • ******
  • 4451
Re: Powershot SX150 IS Porting Thread
« Reply #262 on: 16 / June / 2015, 15:16:47 »
Using sx150is-100a-1.4.0-r4153-full (and chdkptp-r658-win32).

Apparently this camera cannot autofocus at subject distance less than 1 metre (with any significant zoom).

With camera at full zoom (zoom step 127), pointed at a wallpapered flat surface 60cm distance and half-press, get_shooting returns true, chdkptp GUI console:

Code: [Select]
> lua post_levent_to_ui('PressSwOne')
> = return get_shooting()
6:return:true

AF frame (imagine yellow please) and ! shown in screenshot attached.

?

(Conditions: Aperture Priority mode, AF-Point Zoom = On, Servo AF = Off, Continuous AF = Off)
You may want to take a look at the "Lens Functions" section on this page: http://chdk.wikia.com/wiki/CHDK_Scripting_Cross_Reference_Page

*

Offline reyalp

  • ******
  • 14125
Re: Powershot SX150 IS Porting Thread
« Reply #263 on: 16 / June / 2015, 15:23:20 »
Apparently this camera cannot autofocus at subject distance less than 1 metre (with any significant zoom).
It is normal for the minimum focus distance to depend on zoom, and be further at greater zoom distances.

On SX160 MF at wide goes down to ~1 cm from the lens. At max zoom, it is 60 cm. These values are displayed in the Canon UI, and are physical limits of the lens design.
Quote
With camera at full zoom (zoom step 127), pointed at a wallpapered flat surface 60cm distance and half-press, get_shooting returns true, chdkptp GUI console:
Err... so? get_shooting() just returns a particular propcase. It doesn't guarantee the canon firmware was able to focus on something useful.
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #264 on: 16 / June / 2015, 16:09:21 »
Err... so? get_shooting() just returns a particular propcase. It doesn't guarantee the canon firmware was able to focus on something useful.
I normally try to use available information and interpret as simply as possible:

http://chdk.wikia.com/wiki/Script_commands#get_shooting

"get_shooting - Lua : return boolean true if half_press active and focus+exposure is set , false otherwise"

My logic was that, since focus is definitely false (as per Canon display), then chdk get_shooting() should also be false (since exposure set would then be irrelevant).   

The challenge was identified while using multicam.lua:

Code: [Select]
function cmds.preshoot()
press('shoot_half')
local status=wait_timeout(get_shooting,true,10,mc.preshoot_timeout)
if not status then
release('shoot_half')
end
return status,msg

==>

-- wait, sleeping <wait> ms until <func> returns <value> or timeout hit
function wait_timeout(func,value,wait,timeout,msg)
if not msg then
msg = 'timeout'
end
while func() ~= value do
sleep(wait)
timeout = timeout - wait

if wait <= 0 then
write_status(false,msg)
return false
end
end
write_status(true)
return true
end
end

When focus was not achieved I had expected "release('shoot_half')" to result.

In simple terms, what's the purpose of the subsequent multicam.lua "press('shoot_full')" if focus has not been guaranteed?

PS:
should
Code: [Select]
if wait <= 0 thenin code snippet not be:
Code: [Select]
if timeout <= 0 then?
« Last Edit: 16 / June / 2015, 16:22:40 by andrew.stephens.754365 »

*

Offline reyalp

  • ******
  • 14125
Re: Powershot SX150 IS Porting Thread
« Reply #265 on: 16 / June / 2015, 16:27:42 »
http://chdk.wikia.com/wiki/Script_commands#get_shooting

"get_shooting - Lua : return boolean true if half_press active and focus+exposure is set , false otherwise"

My logic was that, since focus is definitely false (as per Canon display), then chdk get_shooting() should also be false (since exposure set would then be irrelevant).   
Well, that's not what it does. It's a Canon propcase. There is no exact specified behavior (outside of Canon engineering), only observed behavior. In general, the observed behavior is that it indicates the AF and AE process have finished, but it does not indicate that AF found something to focus on.

Quote
When focus was not achieved I had expected "release('shoot_half')" to result.

In simple terms, what's the purpose of the following multicam.lua "press('shoot_full')" if focus has not been guaranteed?
Nothing is guaranteed ;)  The wait is there to allow the Canon shooting process to go through it's normal focus/AE process. If you press shoot_full before get_shooting goes true, you go through an alternate path in the Canon code which has even less chance of getting a good shot.

Quote

should
Code: [Select]
if wait <= 0 thenin code snippet not be:
Code: [Select]
if timeout <= 0 then?
That does look a like a bug. Thanks.
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #266 on: 16 / June / 2015, 16:41:32 »
...is that it indicates the AF and AE process have finished, but it does not indicate that AF found something to focus on.

Another piece of my puzzle slots into place. Thanks.

*

Offline reyalp

  • ******
  • 14125
Re: Powershot SX150 IS Porting Thread
« Reply #267 on: 03 / July / 2015, 16:41:25 »
...is that it indicates the AF and AE process have finished, but it does not indicate that AF found something to focus on.

Another piece of my puzzle slots into place. Thanks.
Just to follow up on this, get_focus_state() (= FOCUS_STATE propcase) should indicate if AF was successful. http://chdk.wikia.com/wiki/PropertyCase has some notes.
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #268 on: 03 / July / 2015, 17:21:47 »
Excellent.

I'll check it out when I get some time.

Thanks.

Re: Powershot SX150 IS Porting Thread
« Reply #269 on: 30 / September / 2015, 15:09:23 »
Guys,

I finally permanently broke my SX120 after 6 years of CHDK and just got a replacement SX150 and did get the CHDK build off of the mighty-hoernsche.de site to work fine - I don't see the "rear curtain flash sync" option - is there a reason it isn't on the SX150 yet or is there a script that will add that function?


 

Related Topics


SimplePortal © 2008-2014, SimplePortal