Review and selective save
This page is for discussion purposes only. Anticipated release in software version 2.2.1.
The simplest camera operation is continuously filling the pretrigger buffer with video frames while waiting for a trigger event. Once triggered, the camera fills the post trigger buffer and automatically saves the captured frames to a file. When multi-shot is enabled, the camera repeats the pretrigger fill, trigger, post trigger fill process until all buffers are filled, then automatically saves each buffer one by one. In either case, once the camera is configured, the user control is simply to create a trigger event. With multi-shot, an additional user control is to request the captured buffers be saved without having to fill all the multi-shot buffers. This mode of operation is called auto-save.
Another camera mode of operation is review. The user can capture one or more videos, then review each a video setting the starting and ending frame for selective saving a region of the video. Once the user is done reviewing and saving selected regions of the captured videos, the user can again run the camera to restart the pretrigger fill, trigger, post trigger fill process. In the review mode of operation, the camera allows videos to be reviewed after all multi-shot buffers are filled instead of automatically saving all captured frames for all captured videos. In a similar way, with multi-shot enabled, an additional user control is to allow the captured buffers be reviewed without having to fill all the multi-shot buffers.
Examples of when review mode can be useful include:
- Immediate viewing: In some cases you might not want to save the frames at all. Instead, you may want to view the video frames as soon as possible then take action based on what was observed. Example of this include adjusting camera settings before taking the real high speed video, using high speed videography to improve your golf swing or verify a piece of equipment being manufactured is operational.
- Selecting a region of capture video to save: When reviewing a captured video, you can pick the starting and ending frames to save so your high speed video files only contain the portion of the capture video that is of interest.
- Imaging processing: The edgertronic high speed camera can be viewed as a video source (really a source of image frames), allowing the imaging processing software to receive, via the camera's network connection, a series of video frames.
Web user interface
The captured video review feature can be enabled or disabled using the camera's web U.I. When disabled, the camera automatically saves captured videos when the configured number of multishot buffers are filled. When review is enabled, the camera does not automatically save videos. Instead, after one or more videos have been captured to multishot buffers, a review bar is shown below the video window. The review bar has two markers, one for setting the starting frame and the other to set the last frame. As long as you have are dragging one of the markers, the frame associated with that marker position is displayed.
You can also select which captured video to review by setting the multishot buffer value.
Once you have set the starting frame and end frame markers, you can save the selected region by pressing the save icon. The filename of the video, and associated metadata file, is modified to include the start and end frame number. This allows you to save different segments of a the same captured video buffer to different files. An example would be a captured video buffer containing two lightning strikes. You might save the first lightning strike to one file and save the second lightning strike to another files.
When you are done reviewing the videos, you can discard all captured video frames and capture more videos by clicking on the run icon.
Imaging processing software
Imaging processing software, like ImageJ, support extension module plug-ins. CAMAPI supports the review_frame(buffer_number, start_frame, end_frame) method which allows an ImageJ extension module to be created which can control the captured frame being processed by the camera.
CAMAPI video review support
Review and selective save are supported by the camera by means of the REVIEW state in the camera's state machine, as shown to the right.
Enabling review mode
When invoking the run() CAMAPI method, include the requested_review key set to true in the requested settings dictionary. The camera will not autosave when review is enabled, instead the camera will go into the REVIEW state when all configured multishot buffers have been filled or when the review_frame() CAMPAI method is invoked.
Controlling frames being reviewed
When the camera is in the REVIEW state, the review_frame() CAMAPI method allows the camera to be configured to read out captured video frames at a specified rate, from the specified start frame to the specified end frame. The review() method also allow you to control if you want the camera to continuously loop, sending the selected region of frames over and over. If you want to lock step control the camera so you get exactly one frame per review() invocation, set the start and end frame to the same value and the frame rate to zero.
Saving reviewed video
When you ready to save a captured video and the camera is in the REVIEW state, use the selective_save() CAMAPI method. When the save is complete, the camera will return to the REVIEW state.
Capturing new video when review is complete
When you no longer need the captured video frames and want to capture new video, invoke the run() CAMAPI method.
- The metadata file contains items that refer to the video captured to the buffer. This includes the camera settings, and the capture information capture buffer number, frame count, pre-trigger frames, trigger time, and trigger delay. Be aware that a selective save may mean the file doesn't contain the trigger frame.
- For selective save, two additional metadata values indicate which region of the captured video buffer was saved in the file. These two fields are first saved frame and last saved frame.
- To allow different regions of the same captured video buffer to be saved to files, videos saved using selective save will include the frist and last saved frame in the filename in the form:
- The start frame number and end frame number are index based on the trigger frame being frame 0. This means the start and end frames will be negative numbers if the frames of interest occurred before the trigger event.
- Using selective save, the user can save the same captured video twice; once with overlays on and again with overlays off.