#include <camera.h>
Any Video4Linux compatible device can be used with this class. It can handle 8 - 24 bit, greyscale or RGB images at any resolution supported by the camera. This class is for camera control only, and it does not contain image processing routines.
Definition at line 79 of file camera.h.
Public Member Functions | |
| Camera () | |
| Constructor. | |
| ~Camera () | |
| Deconstructor. | |
| int | init () |
| Camera initialization. | |
| camParams | getCamParams () |
| Get camera parameters. | |
| int | setCamParams (camParams params) |
| Set camera properties. | |
| picParams | getPicParams () |
| Get camera image properties. | |
| int | setPicParams (picParams params) |
| Set camera image properties. | |
| int | capture (struct Frame *f) |
| Captures a frame to a buffer. | |
| void | stop () |
| Shutdown camera. | |
Public Attributes | |
| char * | dev |
| Video device file. | |
|
|
Constructor. Initializes class variables. Definition at line 6 of file camera.cpp. References dev, and camParams::extended. |
|
|
Deconstructor. Called when class instance is destroyed. Ensures that camera was properly shut down. Definition at line 13 of file camera.cpp. References stop(). |
|
|
Captures a frame to a buffer. This method captures a frame from the camera to a specified buffer. The formatting is taken care of automatically. At this point other methods can be used to save this image to a file, display it on screen, etc.
Definition at line 285 of file camera.cpp. References Frame::buffer, camParams::colorType, Frame::convertToRGB(), Frame::height, and Frame::width. Referenced by Tracker::track(). |
|
|
Get camera parameters. This method simply copies the private class variables that contain the camera's parameters. These are collected when the init() method is called to initialize the device. It is NOT possible to write a new camParams struct back to the camera.
Definition at line 82 of file camera.cpp. References camParams::colorType, camParams::depth, camParams::extended, camParams::framerate, camParams::height, camParams::led, camParams::maxHeight, camParams::maxWidth, camParams::minHeight, camParams::minWidth, camParams::name, camParams::width, camParams::x, and camParams::y. Referenced by Tracker::init(). |
|
|
Get camera image properties. This method returns the current image settings for the camera. It includes things like color, brightness, etc. that can be adjusted in real time by the user. This method must be called to load in the values of a picParams struct before calling setPicParams().
Definition at line 152 of file camera.cpp. References picParams::brightness, picParams::color, picParams::contrast, picParams::depth, camParams::extended, picParams::gain, picParams::hue, picParams::noise_reduction, picParams::palette, picParams::quality, picParams::wb, and picParams::whiteness. Referenced by Tracker::init(). |
|
|
Camera initialization. Connects to specified camera device and attempts to poll it for its capabilities.
Definition at line 18 of file camera.cpp. References dev, camParams::extended, camParams::framerate, and camParams::probe. Referenced by Tracker::init(). |
|
|
Set camera properties. This method is used to send new camera properties to the camera device. This is usually done after calling getCamParams(), reading the parameters, and modifying them as necessary.
Definition at line 191 of file camera.cpp. References camParams::colorType, camParams::depth, camParams::extended, camParams::framerate, camParams::height, camParams::led, camParams::width, camParams::x, and camParams::y. Referenced by Tracker::init(). |
|
|
Set camera image properties. This method is used to send new image properties to the camera device. This is usually done after calling getPicParams(), reading the parameters, and modifying them as necessary.
Definition at line 245 of file camera.cpp. References picParams::brightness, picParams::color, picParams::contrast, picParams::depth, camParams::extended, picParams::gain, picParams::hue, picParams::noise_reduction, picParams::palette, picParams::quality, picParams::wb, and picParams::whiteness. |
|
|
Shutdown camera. Closes the device file and make sure camera is properly shut down. Definition at line 297 of file camera.cpp. References camParams::name. Referenced by ~Camera(). |
1.4.2