AxisCamera Class Reference
#include <AxisCamera.h>


Public Member Functions | |
| virtual | ~AxisCamera () |
| bool | IsFreshImage () |
| SEM_ID | GetNewImageSem () |
| int | GetImage (Image *imaqImage) |
| int | GetImage (ColorImage *image) |
| HSLImage * | GetImage () |
| int | CopyJPEG (char **destImage, int &destImageSize, int &destImageBufferSize) |
Static Public Member Functions | |
| static AxisCamera & | GetInstance (const char *cameraIP=NULL) |
| static void | DeleteInstance () |
Detailed Description
AxisCamera class. This class handles everything about the Axis 206 FRC Camera. It starts up 2 tasks each using a different connection to the camera:
- image reading task that reads images repeatedly from the camera
- parameter handler task in the base class that monitors for changes to parameters and updates the camera
Definition at line 34 of file AxisCamera.h.
Constructor & Destructor Documentation
| AxisCamera::~AxisCamera | ( | ) | [virtual] |
Destructor
Definition at line 46 of file AxisCamera.cpp.
Member Function Documentation
| int AxisCamera::CopyJPEG | ( | char ** | destImage, | |
| int & | destImageSize, | |||
| int & | destImageBufferSize | |||
| ) |
Copy an image into an existing buffer. This copies an image into an existing buffer rather than creating a new image in memory. That way a new image is only allocated when the image being copied is larger than the destination. This method is called by the PCVideoServer class.
- Parameters:
-
imageData The destination image. numBytes The size of the destination image.
- Returns:
- 0 if failed (no source image or no memory), 1 if success.
Definition at line 167 of file AxisCamera.cpp.
| void AxisCamera::DeleteInstance | ( | ) | [static] |
Called by Java to delete the camera... how thoughtful
Definition at line 85 of file AxisCamera.cpp.
| HSLImage * AxisCamera::GetImage | ( | ) |
Instantiate a new image object and fill it with the latest image from the camera.
The returned pointer is owned by the caller and is their responsibility to delete.
- Returns:
- a pointer to an HSLImage object
Definition at line 149 of file AxisCamera.cpp.
| int AxisCamera::GetImage | ( | Image * | imaqImage | ) |
Get an image from the camera and store it in the provided image.
- Parameters:
-
image The imaq image to store the result in. This must be an HSL or RGB image This function is called by Java.
- Returns:
- 1 upon success, zero on a failure
Definition at line 121 of file AxisCamera.cpp.
| int AxisCamera::GetImage | ( | ColorImage * | image | ) |
Get an image from the camera and store it in the provided image.
- Parameters:
-
image The image to store the result in. This must be an HSL or RGB image
- Returns:
- 1 upon success, zero on a failure
Definition at line 138 of file AxisCamera.cpp.
| AxisCamera & AxisCamera::GetInstance | ( | const char * | cameraIP = NULL |
) | [static] |
Get a pointer to the AxisCamera object, if the object does not exist, create it To use the camera on port 2 of a cRIO-FRC, pass "192.168.0.90" to the first GetInstance call.
- Returns:
- reference to AxisCamera object
Definition at line 70 of file AxisCamera.cpp.
| SEM_ID AxisCamera::GetNewImageSem | ( | ) |
Get the semaphore to be used to synchronize image access with camera acquisition
Call semTake on the returned semaphore to block until a new image is acquired.
The semaphore is owned by the AxisCamera class and will be deleted when the class is destroyed.
- Returns:
- A semaphore to notify when new image is received
Definition at line 108 of file AxisCamera.cpp.
| bool AxisCamera::IsFreshImage | ( | ) |
Return true if the latest image from the camera has not been retrieved by calling GetImage() yet.
- Returns:
- true if the image has not been retrieved yet.
Definition at line 95 of file AxisCamera.cpp.
The documentation for this class was generated from the following files:
Generated on Thu Jan 12 2012 22:35:27 for WPILibC++ by
1.7.1