About
  1. | API Documentation
  2. | Gui
  3. | GuiCamera

GuiCamera

Defined in <projects/gui/GuiCamera.h>

This is the abstract interface for all camera objects. Any new camera plugin has to follow this interface.

class GuiCamera;

Member Fields

Field Type Notes
staticMetaObject const QMetaObject

MISSING

Member Functions

(constructor)
CamIdx

Returns the index of the camera in the list of cameras. This is unique to each camera.

CheckForWaitingImage

Checks to see if there is an image waiting in the image buffer. Returns false on timeout.

CleanUpFileWrites

Helper function to make sure any writes to files or streams are cleaned up correctly.

Close

Closes the camera.

Count

Return the number of images captured.

DecrementGrabThreads

While capturing images there are lots of threads running to take those images from the image buffer and save them (GrabAndSaveImageTask). Whenever a thread associated with this camera finishes its work, it calls this function to decrease the count of the number of threads accessing this object.

DropCount

Returns the number of images dropped in the last capture.

FirmwareLevel

Return a string with the firmware level of the firware currently running on the camera.

GrabThreadDone

Function called by GrabAndSaveImageTask when it has finished its work. It checks to see if all the threads are done processing, and if so, cleans up file writes and then signals that the camera is done capturing.

Height

Returns the height of the images the camera is currently configured to capture.

Hz

Returns the frame rate of the camera.

ImageOutputDir

Given the base directory, return the path for the image output directory that works with the project structure.

ImageTimestepFileName

Given the directory, returns the path for the file containing information about the timesteps of each image from the capture. This is mainly for debug/logging purposes.

IncreaseCount

Increase the counter for the current image index value. Each image grabbed should have a unique number that represents where it should be placed in the sequence of images captured. If the user wants to capture 3000 images, then the images will have indexes from 0-2999 inclusive, and this function keeps track of that. When running in a multi-threaded environment this function needs the correct guards to ensure atomicity.

IncreaseDropCount

Increase the number of dropped images by one.

IncrementGrabThreads

While capturing images there are lots of threads running to take those images from the image buffer and save them (GrabAndSaveImageTask). Whenever a thread associated with this camera starts its work, it calls this function to increase the count of the number of threads accessing this object.

InitFileWrites

Initialize the files and streams needed for output and debug.

IsConnected

Is the camera connected. This is checking if the camera has been associated with a device in the kernel.

IsHardwareTriggered

Is the camera currently set up to be triggered by a hardware trigger ( i.e. a TTL pulse )?

IsOpen

Is the camera connected and open? When a camera is open it is in a state that settings can be set and retrieved on it.

IsReadyForTrigger

If the hardware trigger is set for the camera, has the camera prepared itself to recieve the trigger and is it currently waiting on said trigger?

MakeConnect

Have the camera connect. This usually involves registering the camera with a camera device, but is obviously dependent on the camera.

MaxBuffer

What is the maximum size of the image buffer used to hold images. If the image buffer is too small and the camera is taking images fast enough, there will be images that are dropped.

Name

Return the name of the camera. This is usually just the model name with the serial number or something else uniquely identifiable included.

Open

Open the camera device for use. This is usually the first step of two to allow software to use a camera. First the camera device is opened, and then the camera device is connected.

OutputImages

Configure the camera so that a data capture is saved as individual files and not a single video.

OutputVideo

Configure the camera so that it saves a data capture as a video and not as individual files.

RecordCount

How many images were successfully captured during the recording operation?

RetrievalTimeout

How long should the system wait before returning a failure when the image buffer is empty?

RetrieveWaitingImage

Retrieve an image that is currently in the image buffer. Or, if not currently there, will be there in less than the value for the Retrieval Timeout.

SetupHardwareTrigger

Set the camera to use a hardware trigger. This obviously requires the use of an external device for signalling to the cameras with a TTL pulse that they should capture.

SetupSoftwareTrigger

Have the camera use a software trigger. This means that if the frame rate of the cameras is sufficiently high, the timesteps of the images wil not line up.

SignalError

Signal that an error has been received.

SignalFinished

Signal that the camera is finished capturing images.

SignalGrabDone

Signal that a grab of an image from the image buffer was done and pass along the image that was grabbed.

SignalGrabbing

Signal that the camera has starting putting images in the image buffer. This is a signal to the GrabAndSaveImageTask that images are available to be dealt with.

SignalImageDropped

Signal that images were dropped while trying to collect them from the image buffer.

SignalImageSaved

Signal that an image has been successfully saved.

SignalRefreshCameras

Signal for all cameras to refresh their settings becausean event may have changed something important. A good example is hotplugging cameras.

StartGrabbingPreview

Instruct the camera to start grabbing images, but these images can be lossy as we are going to use them for a preview and not a strict image collection. If your camera has the ability to grab from the top of the image buffer and discard the rest, this is where that functionality should be used as we don’t care about dropped images since the human eye only see ~30 frames a second anyways.

StartGrabbingRecord

Start grabbing images that will be used for a capture. This tries not to drop any images.

StopGrabbing

Ask the camera to stop capturing images into the image buffer.

UpdateConfig

Update the configuration of the camera using an already saved GenApi configuration file.

Width

Return the width of the images that the currently configured camera can capture.

WriteImageInfoToLog

Log information about the image.

metaObject

QT auto-generated function. Don’t directly call.

operator=

No details given

qt_check_for_QOBJECT_macro

QT auto-generated function. Don’t directly call.

qt_metacall

QT auto-generated function. Don’t directly call.

qt_metacast

QT auto-generated function. Don’t directly call.

tr

QT auto-generated function. Don’t directly call.

trUtf8

QT auto-generated function. Don’t directly call.

SnakeStrike — An program for high-speed multi-camera data collection and triangulation.

Page owner(s): gwjensen  Last updated: 2020-09-28 07:40:17 +0000