Read FocalLength with Cameras without motorized zoom

all about scripts with SDM e.g requests for specific script, post own scripts for a certain function
WBL
Posts: 21
Joined: Tue May 24, 2016 10:58 am

Read FocalLength with Cameras without motorized zoom

Postby WBL » Wed Aug 02, 2017 8:31 am

For camera model which do mot have a motorized zoom setting the zoom on a stereoscopic rig for both cameras to the same focal length is a mess since you do not know the exact focal length on each camera.

Here is a script which works on M10 - unfortunately it does not work on M3 by now - which reads and displays continously (even when changing the zoom manually) the focal length as equal to 36mm film:

Code: Select all

@title show_EFL
 rem written by Werner Bloos 24.Jul 2017
 rem this script displays focal length as EFL (equal to 36mm film) values
 rem this script is used for cameras which have only manual zoom e.g M10
 rem to display zoom values in order to set both lenses to same values
scroll_console 0
sdm_console_line_length 38
console_position 30 20
a = get_config_value 168 999
 rem save header state
set_config_value 168 2
 rem disable header
b = get_config_value 13 999
 rem save battery status
c = get_config_value 11 999
 rem save battery percentage status
set_config_value 13 0
set_config_value 11 0
 rem disabling display of battery icon and percentage
disable_big_zoom
 rem disables big zoom since we display zoom value as EFL in this script
line 2 "~3    FL = " d " mm "
line 8 "external switch exits script"
do
  d = get_efl
  line 2 "~3  FL = " d " mm "
  e = get_usb_power 
until e > 10       
line 8 "!exiting script..."           
sleep_for_seconds 2
set_config_value 13 b
set_config_value 11 c
 rem restoring display of battery icon and percentage   
set_config_value 168 a
 rem restore header state
sleep_for_seconds 2
exit_alt             


and here same script in German:

Code: Select all

@title zeige Zoomwert
 rem geschrieben von Werner Bloos 24.Jul 2017
 rem Dieses Skript zeigt die Brennweite (bezogen auf Kleinbildformat) an
 rem Dieses Skript wird bei Kameras verwendet die nur manuelle Zoomobjektive haben z.B EOS M10
 rem um bei Stereogespannen die gleichen Zoomwerte einstellen zu können
scroll_console 0
sdm_console_line_length 38
console_position 30 20
a = get_config_value 168 999
 rem save header state
set_config_value 168 2
 rem disable header
b = get_config_value 13 999
 rem save battery status
c = get_config_value 11 999
 rem save battery percentage status
set_config_value 13 0
set_config_value 11 0
 rem disabling display of battery icon and percentage
disable_big_zoom
 rem disables big zoom since we display zoom value as EFL in this script
line 2 "~3    BW = " d " mm "
line 8 "Externer Auslöser beendet Skript"
do
  d = get_efl
  line 2 "~3  BW = " d " mm "
  e = get_usb_power 
until e > 10       
line 8 "!beende Skript..."           
sleep_for_seconds 2
set_config_value 13 b
set_config_value 11 c
 rem restoring display of battery icon and percentage   
set_config_value 168 a
 rem restore header state
sleep_for_seconds 2
exit_alt             


here some screenshots how it looks like (used a EOS M10 with a EF-M adapter and a 55-250 Canon lens which is 88-400m EFL):

EFL_Skript_01.jpg
EFL_Skript_01.jpg (84.19 KiB) Viewed 32 times


EFL_Skript_02.jpg
EFL_Skript_02.jpg (91.65 KiB) Viewed 32 times


Note: this script does not make sense to be run it on cameras which do NOT have manual zoom lens - nevertheless the script works too, but displays only the recent focal length without the possibility to change it.

If used on a stereo rig this script displays the focal length according to the information given by the lens - this may not be 100% equal in a stereo or multi camera rig and may have differences up to +/- 1mm.

greetings
Werner

Return to “SCRIPTS”

Who is online

Users browsing this forum: No registered users and 1 guest