Module camera

Basic camera operations and properties

Info:

  • Copyright: 2014
  • License: GPL
  • Author: Magic Lantern Team

Functions

shoot ([wait=64[, should_af=true]]) Take a picture
bulb (duration) Take a picture in bulb mode
reboot () Restart the camera

Fields

shutter Gets a shutter object that represents the camera's current shutter speed
aperture Gets an aperture object that represents the lens' aperture
iso Gets an iso object that represents camera's ISO
ec Gets an ec object that represents exposure compensation
flash_ec Gets an ec object that represents flash exposure compensation
kelvin Get/Set kelvin white balance
mode Get the current camera mode, possible values defined in constants.MODE Note: for cameras without a dedicated video mode, it will return MODE.MOVIE whenever your camera is configured to record videos.
metering_mode Get the current metering mode
drive_mode Get the current drive mode
model Get the model name of the camera
model_short Get the shortened model name of the camera (e.g.
firmware Get the Canon firmware version string
temperature Get the temperature from the efic chip in raw units
state Get the current Canon GUI state of the camera (PLAY, QR, LV, etc)

Class shutter

shutter.raw Get/Set shutter speed in Canon raw units
shutter.apex Get/Set shutter speed in APEX units (floating point)
shutter.ms Get/Set shutter speed in milliseconds
shutter.value Get/Set shutter speed in seconds (floating point)
shutter:__tostring () Pretty prints the current shutter speed as a string

Class aperture

aperture.raw Get/Set aperture in Canon raw units
aperture.apex Get/Set aperture in APEX units (floating point)
aperture.value Get/Set aperture as f-number (floating point)
aperture.min Get/Set minimum (wide open) aperture value (aperture object)
aperture.max Get/Set maximum (closed) aperture value (aperture object)
aperture.raw Get minimum (wide open) aperture in Canon raw units
aperture.apex Get minimum (wide open) aperture in APEX units (floating point)
aperture.value Get minimum (wide open) aperture as f-number (floating point)
aperture.raw Get maximum (closed) aperture in Canon raw units
aperture.apex Get maximum (closed) aperture in APEX units (floating point)
aperture.value Get maximum (closed) aperture as f-number (floating point)
aperture:__tostring () Pretty prints the current aperture as a string

Class iso

iso.raw Get/Set ISO in Canon raw units
iso.apex Get/Set ISO in APEX units (floating point)
iso.value Get/Set ISO
iso:__tostring () Pretty prints the current ISO as a string

Class ec

ec.raw Get/Set exposure compensation in Canon raw units
ec.value Get/Set exposure compensation in EV or APEX
ec:__tostring () Pretty prints the exposure compensation as a string


Functions

shoot ([wait=64[, should_af=true]])
Take a picture

Parameters:

  • wait int how long to wait for camera to be ready to take a picture (default 64)
  • should_af bool whether or not to use auto focus (default true)
bulb (duration)
Take a picture in bulb mode

Parameters:

  • duration int bulb duration in seconds
reboot ()
Restart the camera

Fields

shutter
Gets a shutter object that represents the camera's current shutter speed
aperture
Gets an aperture object that represents the lens' aperture
iso
Gets an iso object that represents camera's ISO
ec
Gets an ec object that represents exposure compensation
flash_ec
Gets an ec object that represents flash exposure compensation
  • flash_ec ec
kelvin
Get/Set kelvin white balance
  • kelvin int
mode
Get the current camera mode, possible values defined in constants.MODE Note: for cameras without a dedicated video mode, it will return MODE.MOVIE whenever your camera is configured to record videos.
  • mode int
metering_mode
Get the current metering mode
  • metering_mode int readonly
drive_mode
Get the current drive mode
  • drive_mode int readonly
model
Get the model name of the camera
model_short
Get the shortened model name of the camera (e.g. 5D3)
firmware
Get the Canon firmware version string
temperature
Get the temperature from the efic chip in raw units
  • temperature int readonly
state
Get the current Canon GUI state of the camera (PLAY, QR, LV, etc)
  • state int readonly

Class shutter

Represents the camera's shutter speed setting
shutter.raw
Get/Set shutter speed in Canon raw units
  • raw int
shutter.apex
Get/Set shutter speed in APEX units (floating point)
  • apex number
shutter.ms
Get/Set shutter speed in milliseconds
  • ms int
shutter.value
Get/Set shutter speed in seconds (floating point)
  • value number
shutter:__tostring ()
Pretty prints the current shutter speed as a string

Returns:

    string

Class aperture

Represents the lens's aperture
aperture.raw
Get/Set aperture in Canon raw units
  • raw int
aperture.apex
Get/Set aperture in APEX units (floating point)
  • apex number
aperture.value
Get/Set aperture as f-number (floating point)
  • value number
aperture.min
Get/Set minimum (wide open) aperture value (aperture object)
aperture.max
Get/Set maximum (closed) aperture value (aperture object)
aperture.raw
Get minimum (wide open) aperture in Canon raw units
  • raw int
aperture.apex
Get minimum (wide open) aperture in APEX units (floating point)
  • apex number
aperture.value
Get minimum (wide open) aperture as f-number (floating point)
  • value number
aperture.raw
Get maximum (closed) aperture in Canon raw units
  • raw int
aperture.apex
Get maximum (closed) aperture in APEX units (floating point)
  • apex number
aperture.value
Get maximum (closed) aperture as f-number (floating point)
  • value number
aperture:__tostring ()
Pretty prints the current aperture as a string

Returns:

    string

Class iso

Represents the camera ISO
iso.raw
Get/Set ISO in Canon raw units
  • raw int
iso.apex
Get/Set ISO in APEX units (floating point)
  • apex number
iso.value
Get/Set ISO
  • value int
iso:__tostring ()
Pretty prints the current ISO as a string

Returns:

    string

Class ec

Represents the exposure compensation
ec.raw
Get/Set exposure compensation in Canon raw units
  • raw int
ec.value
Get/Set exposure compensation in EV or APEX
  • value number
ec:__tostring ()
Pretty prints the exposure compensation as a string

Returns:

    string
generated by LDoc 1.4.3 Last updated 2016-04-23 15:53:20