CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD - page 57 - Creative Uses of CHDK - CHDK Forum

CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD

  • 704 Replies
  • 156034 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #560 on: 17 / August / 2013, 12:41:42 »
Advertisements
@srsa_4c

Ignoring the OSD ISO printout for the moment, here's what I've been able to glean so far, and it does look a bit interesting.  When I do the Create, your function does work in that I can set new values for VGA gain in the range of 200 to 1023, and see the view change from dark to very bright live.  However, doing the Create suppresses the ISO override offered by reyalp_shoot.  That means once I've enabled your operation, I am destined to shoot at the currently set VGA value from my last call to SetCdsGainValue, no matter what ISO value I give to reyalp_shoot.  Basically, the idea is to be able to view at one VGA gain value but shoot at another.

This is on the right track, I can feel it.  Is there a way to "disconnect" the two operations, sort of what offered by my kludgy sequence of SET menu calls ?
« Last Edit: 17 / August / 2013, 12:43:41 by SticK »

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #561 on: 17 / August / 2013, 13:07:32 »
However, doing the Create suppresses the ISO override offered by reyalp_shoot.  That means once I've enabled your operation, I am destined to shoot at the currently set VGA value from my last call to SetCdsGainValue, no matter what ISO value I give to reyalp_shoot.
This doesn't feel like the "right track" - I have no idea how to undo its effect. Since reyalp's method can also influence both live view and shooting, I'd go on experimenting with that (setting ISO sounds better than setting "PGA CDS gain").
BTW, what is reyalp_shoot ?

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #562 on: 17 / August / 2013, 14:17:14 »
BTW, what is reyalp_shoot ?
It's the "shoot" function in the CHDKPTP lua library.  It's what reyalp developed at the very binning of the project.  A call from on of my lua functions looks like this:
Code: [Select]
cli:execute('shoot -tv='..tv..' -av='..av..' -sv='..sv..'')edit: It's unlike the SHOOT button in CHDKPTP that shoots with the current Canon settings on the OSD.  This function overrides those settings, allows a clean script interface, but best of all, sports a very fast override w/o having to mess with the Canon settings Tv Av and Sv by pushing simulated menu buttons.
« Last Edit: 17 / August / 2013, 14:24:17 by SticK »

*

Offline reyalp

  • ******
  • 14033
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #563 on: 17 / August / 2013, 14:34:51 »
BTW, what is reyalp_shoot ?
It's the "shoot" function in the CHDKPTP lua library.  It's what reyalp developed at the very binning of the project.  A call from on of my lua functions looks like this:
Code: [Select]
cli:execute('shoot -tv='..tv..' -av='..av..' -sv='..sv..'')edit: It's unlike the SHOOT button in CHDKPTP that shoots with the current Canon settings on the OSD.  This function overrides those settings, allows a clean script interface, but best of all, sports a very fast override w/o having to mess with the Canon settings Tv Av and Sv by pushing simulated menu buttons.
FWIW, it would be fairly easy to make an option like -sv that sets ISO_MODE instead of using SV override. This should work provided
1) You only use ISO values that are available in the Canon UI (some specific steps in between might work, but they would have to be verified experimentally)
2) The shooting mode you are using supports manual ISO, i.e. not Auto or some of the special scene modes that don't let you adjust ISO

Since this seems like a generally useful feature, I'll look into adding it to the shoot code.

If you want to change the live view ISO using this setting, you would just have to set the prop case and then half shoot briefly.
« Last Edit: 17 / August / 2013, 15:40:29 by reyalp »
Don't forget what the H stands for.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #564 on: 17 / August / 2013, 15:14:17 »
FWIW, it would be fairly easy to make an option like -sv that sets ISO_MODE instead of using SV override.
Would this solution address my dilemma?  Fundamentally, would I be able to view say at a high ISO like ISO 1600 in the OSD icon, and then shoot using your shoot function that would override the ISO eg shoot -Tv=1/8, -sv=200, and return the liveview to ISO 1600 bright after the shot?

Quote
This should work provided
1) You only use ISO values that are available in the Canon UI (some specific steps in between might work, but they would have to be verified experimentally)
Yes, standard ISO values are perfectly fine.  They are discrete values in one-third Evs that translate internally non-linearly into the 200 to 1023 VGA range.

Quote
2) The shooting mode you are using supports manual ISO, i.e. not Auto or some of the special scene modes that don't let you adjust ISO
Yes, that would be perfect ... the S90_101a is meant to shoot exclusively in the M Mode.

Quote
Since this seems like a generally useful feature, I'll look into adding it to the shoot common.
I'm very interested.

Quote
If you want to change the live view ISO using this setting, you would just have to set the prop case and then half shoot briefly.
Half-shoot has a caveat, because it interferes with another external function that I'll describe once we're all done and the CHDK solution for the S90_101a can be considered final.  We're very close.
« Last Edit: 17 / August / 2013, 15:23:16 by SticK »

*

Offline reyalp

  • ******
  • 14033
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #565 on: 17 / August / 2013, 15:45:10 »
FWIW, it would be fairly easy to make an option like -sv that sets ISO_MODE instead of using SV override.
Would this solution address my dilemma?  Fundamentally, would I be able to view say at a high ISO like ISO 1600 in the OSD icon, and then shoot using your shoot function that would override the ISO eg shoot -Tv=1/8, -sv=200, and return the liveview to ISO 1600 bright after the shot?
Only if you can live with a brief half-shoot after the actual shot to make the 1600 value take effect, or someone can find another way to make the camera update. There might be some levent that does it.

Quote
Half-shoot has a caveat, because it interferes with another external function that I'll describe once we're all done and the CHDK solution for the S90_101a can be considered final.
Uh, ok :-[
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #566 on: 17 / August / 2013, 16:14:43 »
Only if you can live with a brief half-shoot after the actual shot to make the 1600 value take effect, or someone can find another way to make the camera update.
The half-shoot generates a spurious trigger into a new external hardware MCU that I've implemented over the last several weeks.  However, I am very willing to try your solution even with a half-shoot to test out.  If it turns out there is no way to circumvent it, I might be able to accommodate my state machine to handle the half-shoot .. I don't know yet until I've tried it and rather not if avoidable.  If I have to, I would have to apply your solution consistently, and it would have to behave consistently.  I am afraid though, if it works with shooting, it may not work with CWB on my MCU ... they might be mutually exclusive.

Quote
There might be some levent that does it.
That would be *great* if possible.  Then without a half-shoot, my new MCU solution can handle both shooting and CWB cleanly and transparently, as it does presently.
« Last Edit: 17 / August / 2013, 16:34:18 by SticK »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #567 on: 17 / August / 2013, 17:04:43 »
@reyalp

I tried your set_prop() solution suggestion in the sequence described in your last post, and here's what I'm getting ....  It seems to behave like srsa's solution: yes I can revert back to the previous liveview brightness, but then shoot(Tv Av Sv) ignores my Sv override and shoots at setting of the last set_prop().

I hope this helps.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #568 on: 18 / August / 2013, 09:58:18 »
A NOTE on INTERACTION BETWEEN Tv and ISO

@reyalp

A thought came to mind that may help explore a solution ... In M mode (as usual here), I note (at the fixed f/2 Av of the S90_101a) that I can set the full range of liveview brightness with Tv set to 0.5 sec (or longer) on the Canon OSD.  If the setting is shorter that 1/2 second, then Tv contributes to the alteration of liveview brightness.  In other words, faster than 0.5 s Canon tries to compensate for high scene brightness, but longer than 0.5 s, it can't increase the gain anymore than at 0.5 s.  Hence Tv interaction with ISO setting appears to truncate at 0.5s.  So this could be the Tv liveview setting I will be using in my instrument.  Please test it out to validate.  Hope this helps.

edit: Another way of saying this is I get maximum CCD sensitivity in liveview when I set Canon Tv=0.5s and ISO to 3200.  Setting Tv longer doesn't make any difference, but setting Tv shorter darkens liveview.
« Last Edit: 18 / August / 2013, 10:22:56 by SticK »

*

Offline reyalp

  • ******
  • 14033
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #569 on: 18 / August / 2013, 14:42:46 »
A NOTE on INTERACTION BETWEEN Tv and ISO

@reyalp

A thought came to mind that may help explore a solution ... In M mode (as usual here), I note (at the fixed f/2 Av of the S90_101a) that I can set the full range of liveview brightness with Tv set to 0.5 sec (or longer) on the Canon OSD.  If the setting is shorter that 1/2 second, then Tv contributes to the alteration of liveview brightness.  In other words, faster than 0.5 s Canon tries to compensate for high scene brightness, but longer than 0.5 s, it can't increase the gain anymore than at 0.5 s.  Hence Tv interaction with ISO setting appears to truncate at 0.5s.  So this could be the Tv liveview setting I will be using in my instrument.  Please test it out to validate.  Hope this helps.
I'm not totally sure I understand this, but I would expect the limits have to do with the specific conditions.

On my A540, the live view gets noticeably brighter up to 5 seconds at ISO 80, but stops around 1 sec for ISO 400

M mode should try to make the live view representative of what you would actually see with the selected exposure settings, but obviously there are limits to how much it can crank up the gain and exposure time when capturing the actual live view image.

On updating the OSD from the ISO change:
I don't see any way to update it directly from CHDK after setting ISO_MODE. Based on looking the camera log, I'm pretty sure there is not an levent for this.

On a540, it does appear to update if I change the Tv or Av value in the Canon UI. Since your camera doesn't actual have an adjustable aperture any more (? I think) perhaps telling it you changed the Av is a way to get it to re-evaluate?

=post_levent_to_ui('PressAvExpButton') will jump the canon control to the Av setting, but I don't see an obvious way to jump back to Tv, though once you know which one you are on, you should be able to use left/right.

I added an isomode option to shoot in chdkptp r398. This simply sets the ISO_MODE for the shot, it won't directly help you with the "live view" ISO.

Quote
I tried your set_prop() solution suggestion in the sequence described in your last post, and here's what I'm getting ....  It seems to behave like srsa's solution: yes I can revert back to the previous liveview brightness, but then shoot(Tv Av Sv) ignores my Sv override and shoots at setting of the last set_prop().
Don't really understand what you mean. Setting ISO_MODE outside of the shooting process won't make overrides not work. If you post the actual code you used, we might be able to help.
Don't forget what the H stands for.

 

Related Topics