CameraController

Version 1.3.9.1 (15 KB) by Serge
Controller for supported DSLR cameras via digiCamControl application
2.1K Downloads
Updated Fri, 24 Jan 2020 16:30:13 +0000

Controller v1.3.9 for tethered DSLR cameras using digiCamControl app.
C = CameraController -create class
C = CameraController(dcc) -digiCamControl location
C = CameraController(dcc,debug) -set debug level
dcc: digiCamControl's webserver IP or CMD remote utility folder.
If empty this class tests the default webserver, 'localhost:5513', then
default app install locations, 'C:\Program Files (x86)\digiCamControl'.
debug: 0=silent, 1=minimal (default), 2=print requests, 3=print replies

Description:
-This class uses digiCamControl (windows only app) to control supported
cameras: set ISO, exposure, focus, aperture(fnumber), white balance,
stream liveview, capture photos & video, configure file download, etc.
-digiCamControl is a multi purpose, free, open source, Windows only
application that can control a host of supported cameras.

Setup:
1.Install latest version of digiCamControl from:
https://sourceforge.net/projects/digicamcontrol/files/latest/download
2.Enable webserver: File > Settings > Webserver > Enable "Use web server,
& "Allow interaction via webserver", use port "5513" > !RESTART APP!
3.Connect one or more cameras using USB cable (or WiFi if supported?).
4.For full control of a Canon DSLR set body and lens to manual.
5.Use digiCamControl app to ensure camera is working.

Remarks:
-This class communicates with camera(s) via digiCamControl's included
webserver(recommended) or CMD Utility.
-The webserver is much faster and allows camera(s) to be controlled from
any Windows/Linux computer on the network or via the internet.
-Visit http://digiCamControl.com for documentation, forums and to donate.
-Method in this class are Capitalised and have additional descriptions.
-When this class is created it does a one-off retrieval of allowed camera
options. Reinitialise this class when swapping cameras.

Limitations:
-This class can only stream liveview (low-rez, noisy, ~15Hz) from
supported cameras. However digiCamControl does support "Open Broadcaster
Software" (OBS) and "XSplit", see Streaming and Search the Forums for info.
-Non-alphanumeric characters found in some Nikon camera properties are
being removed. These properties can be read but cannot be set.
eg "-", "." in "center-weighted_area" "active_d-lighting" "long_exp._nr"
-See digiCamControl Knwon Bugs: http://digicamcontrol.com/phpbb/viewforum.php?f=4
-Focus method does not know how long it needs to wait after a focus change
is requested, see Focus method help to set custom delays.
-LiveView can only be 'streamed' when using the webserver.

Camera Settings:
-Some settings will not have affect if camera is not in Manual mode (M).
-To control focus ensure lens is set to Manual Focus (MF):
-Focus step size & speed can be modified in: File>Settings>Live view
-Note: Lenses use servo motors which have no discrete physical 'steps'. To
achieve a specific focus reproducibly try to go to the lens's physical
limit, in either direction, and apply the same 'steps' from there.

Image Capture:
-To reduce capture latency from 0.3-0.6 sec to ~0.05s ensure webserver is
enabled, File>Settings>Webserver>Enable>RESTART APP
-To measure delay and variance try imaging the computer's own clock by
calling the Clock method provided with this class, C.Clock, however
I do not know how to measure monitor display latency and variance.
-Cmd('CaptureAll') will trigger all connected cameras but there will be a
lag of 0.005-0.020 sec between consecutive cameras.
-To record video turn on live preview using Cmd('LiveViewWnd_Show') and
user Cmd('StartRecord') and Cmd('StopRecord').

Image Download:
-Download is affected by Transfer mode (in app) and session settings.
-Transfer mode is set via the main app to: PC & Camera | Camera only, if
set to Camera only some session settings will be ignored. Set it to PC
& Camera and use session setting "deletefileaftertransfer" if needed.
-session setting "filenametemplate" works only if "useoriginalfilename" is
disabled, and it is applied to downloaded files only, not camera files.
It supports many useful [tags], eg: [Date yyyy-MM-dd], [Time hh-mm-ss],
[Date yyyy-MM-dd-hh-mm-ss], [Exif.Photo.ExposureTime],
[Exif.Photo.FNumber], [Exif.Photo.ISOSpeedRatings], etc
(for a full list go to: Session>Edit Current Session>File Name Template)
-"filenametemplate" can be set when calling the Capture method and applies
to all connected cameras. To distinguish cameras use [Camera Name] or
[Camera Counter 4 digit] tags in the template.
-"folder" does not support [tags], instead use "" in "filenametemplate".
-Manual download of files from the camera can only be done via the app.

Example:
C = CameraController; %initialise
C.session.folder = 'C:\DSLR'; %download folder
C.session.filenametemplate = '[Camera Name][Date yyyy-MM-dd-hh-mm-ss]';
C.camera.isonumber = 3200; %camera settings
C.camera.fnumber = 5.6;
C.camera.shutterspeed = 1/200;
C.Capture %capture
C.lastfile %last filename

Serge 2018-2024
GitHub: https://github.com/serg3y/MatLab-digiCamControl
Email: s3rg3y@hotmail.com
Note: I am not a developer of digiCamControl app, only this wrapper.

Cite As

Serge (2024). CameraController (https://github.com/serg3y/MatLab-digiCamControl), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with R2012a and later releases
Platform Compatibility
Windows macOS Linux
Communities

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.3.9.1

Added README

1.3.9

Added README.md
See release notes for this release on GitHub: https://github.com/serg3y/MatLab-digiCamControl/releases/tag/v1.3.9

1.3.6

Bug fixes

1.3.3

-fixed multiple camera support
-improved multiple camera example

1.3.2

-webserver IP can include a port number (default: 'localhost:5513')
-capture "lag" now a property rather then input to Capture method
-fixed error with duplicate fields on Nikon
-debug property no longer hidden

1.3.1.2

comments

1.3.1.1

Just comments changes

1.3.1.0

bunch of small changes and fixes
Now source is on GitHub.
forgot the file

1.3.0.0

-Support a remote http server
-Better error handling
-Allow commas in filenames
-Minor changes and better help

1.2.1.0

Fixed issue with Capture method ignoring file and time input.
Updated description and focus stacking example.

1.2.0.0

Added Webserver support.
Many other small changes.

1.1.1.0

Improved support for Nikon, by allowing field "active_d-lighting" as "active_d_lighting"

1.1.0.0

forgot to update code
-update to digiCamControl 2.0.46.0
-setting fnumber should work properly now
-many minor changes

1.0.3.0

A bit of everything, mostly help.
spelling

1.0.2.0

Improved the "Capture" method.
A little bit of everything

1.0.1.0

Fixed Do method
Updated description
Changed Do method, other minor changes

1.0.0.0

update title
Requirements modified

update description
Added a hack to run Do commands by assigning to the Do property

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.