How to access Evm (measured Ev) ?? - Script Writing - CHDK Forum

How to access Evm (measured Ev) ??

  • 10 Replies
  • 5078 Views
How to access Evm (measured Ev) ??
« on: 24 / March / 2012, 19:10:01 »
Advertisements
I would like to know how I can access the measured Ev.  This can be displayed under the OSD Parameters --> Miscellaneous Values --> Show Measured Ev.  I want to be able to access this parameter within a script.

I try to do my own research, but I've spent literally hours with Google, and I can't find anything.  For example, when I search "EVM" on this forum, I get zero hits.

I am trying to reduce flicker in timelapse sequences. To do that, I would use Evm to calculate and set Tv as an average over the past 30 frames.  That way, Tv could change very slowly, instead of abruptly.

Or in other words, I want to make a bramper in software.

I figure if Evm is available to CHDK to display, it must be available for calculations.  Does anyone know how?  I'm using uBasic.

Thanks!

tommykay

Re: How to access Evm (measured Ev) ??
« Reply #1 on: 24 / March / 2012, 19:20:27 »
Maybe I'm unclear on how the CHDK forum search works.  When I search for "bramper" I also get zero hits, but google shows there are messages here with that term.

*

Offline reyalp

  • ******
  • 14125
Re: How to access Evm (measured Ev) ??
« Reply #2 on: 24 / March / 2012, 19:22:31 »
You can generally get this kind of value from a propertycase, http://chdk.wikia.com/wiki/PropertyCase

In ubasic, you need to know the specific number for your camera, which depends on the "propset". In lua, you can refer to known propertycases by name, using the propcase module.

Per the description in the menu, the "measured Ev" is Bv+Sv. Propcases for both of these (and the rest of the APEX equation) are known.

The propcases are in APEX*96 values. http://dougkerr.net/Pumpkin/#APEX has a good description of how to work with APEX.

Using the APEX equation, you can calculate the correct value and send them to set_*96 functions. For Tv, you should generally use set_tv96_direct

Note that both scripting languages only have integer math, so you will want to work directly in the *96 values.
Don't forget what the H stands for.

Re: How to access Evm (measured Ev) ??
« Reply #3 on: 24 / March / 2012, 19:28:58 »
Maybe I'm unclear on how the CHDK forum search works.  When I search for "bramper" I also get zero hits, but google shows there are messages here with that term.
I can't prove it but it seems to work best when you are on the "home page" - not zoomed into a specific thread.   Doesn't make sense,  but searching this forum can be really annoying.    I've recently starting using the advanced search function a lot - lets me specify only recent posts so that I don't need to see stuff from 2007 that no longer applies.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: How to access Evm (measured Ev) ??
« Reply #4 on: 24 / March / 2012, 23:40:51 »
You can generally get this kind of value from a propertycase, http://chdk.wikia.com/wiki/PropertyCase

Wow, that was a super-useful and detailed answer.  Thanks!

I will get to work on my bramper script.

Cheers,

tommykay

Re: How to access Evm (measured Ev) ??
« Reply #5 on: 24 / March / 2012, 23:52:32 »
I can't prove it but it seems to work best when you are on the "home page"[/quote]

Thanks for responding.  I tried searching from the home page, and the results still don't match a Google advanced search.  That's the search where you specify the site.

Ah, well.


*

Offline reyalp

  • ******
  • 14125
Re: How to access Evm (measured Ev) ??
« Reply #6 on: 24 / March / 2012, 23:59:33 »
A few more things that may be useful
- Many propcases (like Bv) only update on half shoot. The propcase viewer (found in the debug menu) can be useful for understanding the details.
- Shooting related override functions (set_tv96 etc) generally expect to be called *before* half shoot. This means that if you want to get the Bv, do some calculation, and then set the Tv, the most straightforward way to do it is probably to press halfshoot, release, set overrides, and then shoot.
- The wiki may not mention all the propcases that are actually known. You can also check the propset.h files in http://trac.assembla.com/chdk/browser/trunk/include (or propset.lua in CHDK/LUALIB/GEN in the CHDK download, these are generated from the .h files)
Don't forget what the H stands for.

Re: How to access Evm (measured Ev) ??
« Reply #7 on: 25 / March / 2012, 04:40:52 »
Thanks for the additional information.  One thing may be a showstopper for my bramper script: I need to set the length of the long exposure to arbitrary lengths.  Say, 45.3 seconds or 1243.5 seconds.  I recently read when the camera won't respond unless the exposure is one of the common pre-sets: 2, 4, 8, 16, 32, 64 seconds are okay, but 63 seconds won't do anything.

Am I wrong about this?

Is there another way around this limitation?

Thanks in advance.....

TK ::) ::)

*

Offline reyalp

  • ******
  • 14125
Re: How to access Evm (measured Ev) ??
« Reply #8 on: 25 / March / 2012, 04:54:08 »
Thanks for the additional information.  One thing may be a showstopper for my bramper script: I need to set the length of the long exposure to arbitrary lengths.  Say, 45.3 seconds or 1243.5 seconds.  I recently read when the camera won't respond unless the exposure is one of the common pre-sets: 2, 4, 8, 16, 32, 64 seconds are okay, but 63 seconds won't do anything.
It does not have to be on a standard canon firmware value if you use set_tv96_direct.

The maximum exposure depends on the camera. All CHDK cameras should go up to at least 64 seconds. If the extended Tv feature is implemented in CHDK, it can go up to 2048 seconds, although some cameras may fail before this limit is reached.

In general, you are likely to get better results stacking shorter exposures rather than going to these extremes.

The canon firmware will take a dark frame by default if the exposure is longer than about 3 seconds. This means each shot will take double the expected exposure time. You can force this off in CHDK, but then you'll get even more noise unless you do dark frame subtraction later yourself.

Note if you are working in low light, the Bv value will become unreliable at some point. In this case, you can use the shot_histogram function. It gives you histogram values the raw buffer of the previous shot. If you search the forum, you should find some information about using this for night timelapses.
Don't forget what the H stands for.

Re: How to access Evm (measured Ev) ??
« Reply #9 on: 25 / March / 2012, 09:59:27 »
It does not have to be on a standard canon firmware value if you use set_tv96_direct.

Thank you, Reyalp!  I must say, I spent so much time researching this on my own because the general quality of discussions on the web has dropped to nearly zero.  I never expected to get a useful answer.

So thank you for proving me wrong.  Your detailed answers have given me all the key points I needed.

I'm really grateful.

TK

 

Related Topics


SimplePortal © 2008-2014, SimplePortal