Simulate exposure bracketing with sensorCompute
Exposure bracketing acquires a series of exposures. You can simulate exposure bracketing by setting the exposure time to be a vector of numbers. The calculation is illustrated here. You can then visualize all of the different exposures in the sensor window, which has a slider that lets you scan through the different exposures.
The code first illustrates working with scene, oi, sensor directly. Then it shows the same calculation using a camera object.
See also: sensorCompute, cameraCreate, cameraWindow
Copyright Imageval, LLC, 2013
% This could be cameraCreate, but for teaching being explicit about the % objects seems better. scene = sceneCreate; scene = sceneSet(scene,'fov',4); oi = oiCreate; oi = oiCompute(scene,oi); sensor = sensorCreate;
T1 = [0.02 0.04 0.08 0.16 0.32]; % Times sensor = sensorSet(sensor,'Exp Time',T1); nExposures = length(T1); % Compute all the exposure durations exposurePlane = floor(nExposures/2) + 1; sensor = sensorSet(sensor,'exposure plane',exposurePlane); sensor = sensorCompute(sensor,oi); ieAddObject(sensor); % Notice on the lower right the Bracket, and how there is a slider on the % lower left that is labeled 'Exposure'. Adjust the slider on the lower % left of the window to show a different exposure duration. sensorWindow;
sensor = sensorSet(sensor,'exposure plane',1); vcReplaceObject(sensor); sensorWindow;
sensor = sensorSet(sensor,'exposure plane',5); vcReplaceObject(sensor); sensorWindow;
camera = cameraCreate; camera = cameraSet(camera,'sensor exp time',T1); camera = cameraCompute(camera,scene); cameraWindow(camera,'sensor');
Camera from default oi,sensor and ip Interpolating display SPD for consistency with new wave. Warning: Resizing sensor to match scene FOV (4.0)