User Tools

Site Tools


example_exposurebracketing

Example: Capture exposure series

This script captures three images with different exposure compensation. The images can then be used for example for exposure fusion (HDR).

var cameraName = "Ricoh Theta m15";

// Connect to camera if not connected
if (GetCameraState("ConnectionState", cameraName) != "connected")
{
    SetCameraFunction("connectToCamera", cameraName);
}

// Get exposure compensation values
var expCompList = GetCameraSettingValues("ExposureCompensation", cameraName);
//LogText("Possible exposure compensation values: " + expCompList);

// Capture three pictures with different exposure compensation
SetCameraSetting("ExposureCompensation", expCompList[0], cameraName);
SetCameraFunction("startRecording", cameraName);

// The Theta needs approximately 5 seconds after capturing a photo to settle down.
WaitMilliseconds(5000);
SetCameraSetting("ExposureCompensation", expCompList[Math.floor(expCompList.length/2)], cameraName);
SetCameraFunction("startRecording", cameraName);

WaitMilliseconds(5000);
SetCameraSetting("ExposureCompensation", expCompList[expCompList.length-1], cameraName);
SetCameraFunction("startRecording", cameraName);

LogText("Finished!");
example_exposurebracketing.txt · Last modified: 2016/09/06 08:44 by act