Module camera

Basic camera operations and properties

Functions

shoot([should_af=false]) Take a picture.
burst(num_pictures) Take N pictures in burst mode.
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.
metering_mode Get the current metering mode (see PROP_METERING_MODE in property.h).
drive_mode Get the current drive mode (see PROP_DRIVE in property.h).
model Get the model name of the camera (e.g. "Canon EOS 60D").
model_short Get the shortened model name of the camera (e.g. "5D3").
firmware Get the Canon firmware version string (e.g. "1.2.3").
temperature Get the temperature from the EFIC chip in raw units.
gui Gets a gui object that controls Canon GUI state (PLAY, MENU, QR, various dialogs)

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 minimum (wide open) aperture value (aperture object).
aperture.max Get maximum (closed) aperture value (aperture object).
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 (e.g. 100, 200).
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 (both are identical here).
ec:__tostring() Pretty prints the exposure compensation as a string.

Class gui

gui.menu Get/Set whether Canon menu is active or not
gui.play Get/Set whether the camera is in PLAY mode (image or video review)
gui.play_photo Get whether the camera is in PLAY mode with a still photo selected
gui.play_movie Get whether the camera is in PLAY mode with a H.264 movie selected
gui.qr Get whether the camera is in QR mode (QuickReview, the image review mode used right after taking a picture)
gui.idle Get whether the camera is "idle" (i.e.


Functions

shoot([should_af=false])
Take a picture.

Parameters:

  • should_af bool whether or not to use autofocus. (default false)
burst(num_pictures)
Take N pictures in burst mode.

Note: your camera must be already in some continuous drive mode, otherwise the speed will be slow.

Parameters:

  • num_pictures int how many pictures to take.
bulb(duration)
Take a picture in bulb mode.

Parameters:

  • duration float 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 (see PROP_METERING_MODE in property.h).

TODO: add constants and setter.

  • metering_mode int readonly
drive_mode
Get the current drive mode (see PROP_DRIVE in property.h).

TODO: add constants and setter.

  • drive_mode int readonly
model
Get the model name of the camera (e.g. "Canon EOS 60D").
model_short
Get the shortened model name of the camera (e.g. "5D3").
firmware
Get the Canon firmware version string (e.g. "1.2.3").
temperature
Get the temperature from the EFIC chip in raw units.

TODO: Celsius.

  • temperature int readonly
gui
Gets a gui object that controls Canon GUI state (PLAY, MENU, QR, various dialogs)

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 minimum (wide open) aperture value (aperture object).
aperture.max
Get maximum (closed) aperture value (aperture object).
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 (e.g. 100, 200).
  • 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 (both are identical here).
  • value number
ec:__tostring()
Pretty prints the exposure compensation as a string.

Returns:

    string

Class gui

Canon GUI controls (PLAY, MENU, QR and so on)
gui.menu
Get/Set whether Canon menu is active or not
  • menu bool
gui.play
Get/Set whether the camera is in PLAY mode (image or video review)
  • play bool
gui.play_photo
Get whether the camera is in PLAY mode with a still photo selected
  • play_photo bool
gui.play_movie
Get whether the camera is in PLAY mode with a H.264 movie selected
  • play_movie bool
gui.qr
Get whether the camera is in QR mode (QuickReview, the image review mode used right after taking a picture)
  • qr bool
gui.idle
Get whether the camera is "idle" (i.e. in standby, with no other dialogs active)
  • idle bool
generated by LDoc 1.4.3 Last updated 2017-11-05 19:49:59