Units

Started by garry23, February 12, 2018, 06:42:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garry23

I hope some kind soul can educate me.

I looking at menu set/get and trying to work out the units in and out.

For example, in ETTR min shutter the min is 16 and the max is 152.

160 equates to 1/8000.

But what's the conversion, ie these aren't APEX units.

Other menus seem to use 1/8 APEX units.

I'm a bit lost as I wish to set things myself, ie from a script, so I need to understand the units.

a1ex

menu.get will get either the string (as displayed in menu), or the internal unit used on that menu (as integer).

Here, ETTR uses Canon encoding for shutter speed (lens.h, 8 units = 1 EV, 16 = 30", 160 = 1/8000).

Conversion formulas can be found in the same file. Would be nice to have them available to Lua (for example, to create a "shutter" object not tied to the current shutter speed, but that would accept setting the shutter in any units (APEX, ms etc) and read it back in some different unit.

I'm not very fluent with Lua's object-oriented syntax, so here I'd welcome some advice from a more knowledgeable person.

garry23

@a1ex

Thanks.

Knowing that will help me a lot.

Cheers

Garry

garry23

@a1ex

Great your insight really helped and I'm on track to get my hand held script intelligent to focal length, ie informing ETTR.

One last question (to night ;-)), is there a way in Lua to (generically) detect a crop vs FF camera?

Cheers

Garry

a1ex

In the core code, we've got CONFIG_FULLFRAME, but it's used in very few places:

- Sensor crop factor (1.0/1.6 in lens.c, 1.00/1.62 in raw.c, raw_capture_info)
- default CoC value for DOF info (29/19)
- LUT files for fisheye correction (for the Samyang 8mm lens)
- a few other minor tweaks

Can you suggest some API to expose sensor info? The best I could think of would be the raw_capture_info (aka RAWC) currently used in MLV; it includes sensor attributes (resolution, crop factor) and video mode attributes (currently only pixel binning/skipping info implemented).

garry23

@a1ex

Sorry, I don't think I can throw much more light on where in the ML code to go for camera crop info.

But the raw_capture_info seems to do it, assuming I read it OK.

Cheers

Garry