Generated from libcamera.summary with ROBODoc v3.2.2 on Mon Sep 11 15:48:20 2000
TABLE OF CONTENTS
- libcamera/0_module
- libcamera/Camera::capture
- libcamera/Camera::close
- libcamera/Camera::framerateOn
- libcamera/Camera::get
- libcamera/Camera::getFileDescriptor
- libcamera/Camera::getFramerate
- libcamera/Camera::getTime
- libcamera/Camera::getTimestamp
- libcamera/Camera::initialize
- libcamera/Camera::newCamera
- libcamera/Camera_capture
- libcamera/Camera_close
- libcamera/Camera_delete
- libcamera/Camera_framerateOn
- libcamera/Camera_get
- libcamera/Camera_getFileDescriptor
- libcamera/Camera_getFramerate
- libcamera/Camera_getTime
- libcamera/Camera_getTimestamp
- libcamera/Camera_init
- libcamera/Camera_initialize
- libcamera/Camera_newCamera
- libcamera/DummyCamera::loadImage
- libcamera/DummyCamera::swapRgbToBgr
DESCRIPTION
Superclass for all camera drivers. Subsclasses need to implement
the following methods:
destructor (and make sure to call Camera::close() in it)
initialize() - to test if it can capture pictures
close() - to clean up after initialize
capture() - and call gotFrame() when a frame was successfully
captured.
getTime() - with as good resolution as possible.
The factory method should also be updated to use the new camera
driver.
EXAMPLE
Camera *camera = Camera::newCamera(width, height, pix_rgb24);
if (NULL == camera)
fatal_error();
camera->framerateOn(true);
...
while (!done)
{
Picture *snapshot = camera->capture();
double *fps = camera->getFramerate();
...
}
...
delete camera;
SYNOPSIS
Picture *Camera::capture(void)
DESCRIPTION
Capture a new frame and return a pointer to this frame.
SEE ALSO
get()
SYNOPSIS
void Camera::close(void)
DESCRIPTION
Release all resources allocated by initialize(). A new call to
initialize is required before calling any of the other object
methods in this class.
SEE ALSO
initialize()
SYNOPSIS
bool Camera::framerateOn(bool state)
DESCRIPTION
Turn on or off frame rate calculation. Default is 'off'.
RETURN VALUE
Return the old state before turngin framerate calculation on or off.
SEE ALSO
getFramerate()
SYNOPSIS
Picture *Camera::get(void)
DESCRIPTION
Return the last captured frame.
SEE ALSO
capture()
SYNOPSIS
int Camera::getFileDescriptor(void)
DESCRIPTION
Return a select()able file descriptor assosiated with this
device, or -1 if no such file descriptor exists.
SYNOPSIS
double Camera::getFramerate(void)
DESCRIPTION
Return current framerate in frames/second if frame rate
calculation is turned on, othervise return 0.0.
SEE ALSO
framerateOn()
SYNOPSIS
long Camera::getTime(void)
DESCRIPTION
Get current time in 1/1000 seconds since some time in the past.
This value is used for timestamping frames and calculating
frame rate. The actual resolution is platform dependent.
SYNOPSIS
long Camera::getTimestamp(void)
DESCRIPTION
Return a best guess on the currents frames timestamp in 1/1000
seconds since some time in the past.
SEE ALSO
getTime()
SYNOPSIS
bool Camera::initialize(unsigned int nwidth = 0,
unsigned int nheight = 0,
pixel_format nfmt = pix_unknown,
char *device = 0)
DESCRIPTION
Initializes camera driver to the given resolution and pixel
format. Returns true on success and false on failure. If
nwidth or nheigth is 0, the driver can replace it with any
value. If pixel format is pix_unknown, the devices default
pixel format is used.
device is platform dependend and mostly unused.
SEE ALSO
close()
SYNOPSIS
static Camera *Camera::newCamera(unsigned int nwidth,
unsigned int nheight,
pixel_format nfmt)
DESCRIPTION
Camera fabric. Based on the current platform, the camera drivers
compiled into the library and the setting of environment variable
CAMERA, return a pointer to a working camera implementation
supporting the given resolution and pixel format. Use resolution
0x0 and format pix_unknown to get the dirivers default values.
Call delete on the pointer when it is no longer needed.
RETURN VALUE
Returns NULL if no working camera driver could be found.
SYNOPSIS
Picture *Camera_capture(capref ref)
DESCRIPTION
C wrapper for Camera::capture().
SEE ALSO
Camera_get(), Camera::capture(), Camera::get()
SYNOPSIS
void Camera_close(capref ref)
DESCRIPTION
C wrapper for Camera::close().
SEE ALSO
Camera::close()
SYNOPSIS
void Camera_delete(capref ref)
DESCRIPTION
C wrapper for 'delete camref;'. Releases resources allocated
in the Camera class. 'ref' is not usable after this call.
SEE ALSO
Camera_newCamera()
SYNOPSIS
int Camera_framerateOn(capref ref, int state)
DESCRIPTION
C wrapper for Camera::framerateOn().
SEE ALSO
Camera::framerateOn()
SYNOPSIS
Picture *Camera_get(capref ref)
DESCRIPTION
C wrapper for Camera::get().
SEE ALSO
Camera_capture(), Camera::get(), , Camera::capture()
SYNOPSIS
int Camera_getFileDescriptor(capref ref)
DESCRIPTION
C wrapper for Camera::getFileDescriptor().
SEE ALSO
Camera::getFileDescriptor()
SYNOPSIS
double Camera_getFramerate(capref ref)
DESCRIPTION
C wrapper for Camera::getFramerate().
SEE ALSO
Camera::getFramerate()
SYNOPSIS
long Camera_getTime(capref ref)
DESCRIPTION
C wrapper for Camera::getTime().
SEE ALSO
Camera::getTime()
SYNOPSIS
long Camera_getTimestamp(capref ref)
DESCRIPTION
C wrapper for Camera::getTimestamp().
SEE ALSO
Camera::getTimestamp()
SYNOPSIS
int Camera_initialize(capref ref, unsigned int nwidth, unsigned int nheight)
DESCRIPTION
C wrapper for Camera::initialize().
SEE ALSO
Camera::initialize()
SYNOPSIS
int Camera_initialize(capref ref, unsigned int nwidth,
unsigned int nheight, pixel_format nfmt,
char *device)
DESCRIPTION
C wrapper for Camera::initialize().
SEE ALSO
Camera::initialize()
SYNOPSIS
camref Camera_newCamera(unsigned int nwidth, unsigned int nheight,
pixel_format nfmt)
DESCRIPTION
C wrapper for Camera::newCamera().
SEE ALSO
Camera::newCamera()
SYNOPSIS
int DummyCamera::loadImage(const char *fname, Picture * img)
DESCRIPTION
Quick and dirty PPM picture loader.
SYNOPSIS
void DummyCamera::swapRgbToBgr(Picture *img)
DESCRIPTION
Convert 24 or 32 bit Picture RGB data to BGR data.