#include "stdafx.h"#include "CMUCameraGrab.h"
Functions | |
| int | getFrameRateCode (float fps) |
| Converts frames per second into DCAM frame rate code. | |
| float | getFrameRate (int frameRateCode) |
| Converts DCAM frame rate code into frames per second. | |
| int | setupFWCamera (int width, int height, float fps, enum ColourSpace col) |
| set up camera given width, height, fps and colour space | |
| int | setupFWCamera (int format, int mode, int frameRate) |
| set up camera given a DCAM format, mode, and frame rate code | |
| int | setupFWCamera (void) |
| sets up camera with 640x480 RGB and 15fps | |
| int | startImageAcquisition () |
| starts the camera acquisition process | |
| int | getFWImage (IplImage *img) |
| gets an image off the acquisition buffer. NB IplImage img is always unsigned 8 bit 3 channel RGB no matter what the camera settings are | |
| int | stopFWCamera () |
| stops the acquisition | |
| int | getColourString (enum ColourSpace col, char *name) |
| Converts colour space enum into human readable string. | |
| int | getWidthHeight (int format, int mode, int *width, int *height, enum ColourSpace *col) |
| Get the width, height and colour space for a given mode and format. | |
| int | getModeFormat (int *format, int *mode, int width, int height, enum ColourSpace *col) |
| Gets the mode and format given a video width, height and colour space. | |
| void | BRG2RGB (IplImage *img) |
| Convert a colour BRG image to RGB. | |
| int | getCurrentCameraFormat (int *format, int *mode) |
| Returns the current camera format and mode. | |
| int | listSupportedModes () |
| Prints supported modes to the console. | |
Variables | |
| C1394Camera | Camera |
| CMU camera class. | |
| void BRG2RGB | ( | IplImage * | img | ) |
Convert a colour BRG image to RGB.
| img | IplImage to covert colour order. This must be 8 bit unsigned and 3 channel. No checking is done for speed. |
| int getColourString | ( | enum ColourSpace | col, | |
| char * | name | |||
| ) |
Converts colour space enum into human readable string.
| col | Colour space | |
| name | Pre-allocated char array, must be at least 7 bytes long |
| int getCurrentCameraFormat | ( | int * | format, | |
| int * | mode | |||
| ) |
Returns the current camera format and mode.
| format | output format. | |
| mode | output mode. |
| float getFrameRate | ( | int | frameRateCode | ) |
Converts DCAM frame rate code into frames per second.
| frameRateCode | DCAM frame rate code 0-7. |
| int getFrameRateCode | ( | float | fps | ) |
Converts frames per second into DCAM frame rate code.
| fps | input desired fps. |
| int getFWImage | ( | IplImage * | img | ) |
gets an image off the acquisition buffer. NB IplImage img is always unsigned 8 bit 3 channel RGB no matter what the camera settings are
| int getModeFormat | ( | int * | format, | |
| int * | mode, | |||
| int | width, | |||
| int | height, | |||
| enum ColourSpace * | col | |||
| ) |
Gets the mode and format given a video width, height and colour space.
| format | DCAM format to be returned | |
| mode | DCAM mode to be returned | |
| width | input desired video width | |
| height | input desired video height | |
| col | input desired video colour model |
| int getWidthHeight | ( | int | format, | |
| int | mode, | |||
| int * | width, | |||
| int * | height, | |||
| enum ColourSpace * | col | |||
| ) |
Get the width, height and colour space for a given mode and format.
| format | DCAM format. | |
| mode | DCAM mode. | |
| width | Outputs the width. | |
| height | Outputs the height. | |
| col | Outputs the colour space. |
| int listSupportedModes | ( | ) |
Prints supported modes to the console.
| int setupFWCamera | ( | void | ) |
sets up camera with 640x480 RGB and 15fps
| int setupFWCamera | ( | int | format, | |
| int | mode, | |||
| int | frameRate | |||
| ) |
set up camera given a DCAM format, mode, and frame rate code
| int setupFWCamera | ( | int | width, | |
| int | height, | |||
| float | fps, | |||
| enum ColourSpace | col | |||
| ) |
set up camera given width, height, fps and colour space
Sets up the camera
| width | Video width. | |
| height | Video height | |
| fps | Frames per second. | |
| col | Colour space |
| int startImageAcquisition | ( | void | ) |
starts the camera acquisition process
| int stopFWCamera | ( | void | ) |
stops the acquisition
| C1394Camera Camera |
CMU camera class.
Simple quick and dirty wrapper functions for the CMU1394 library
Copyright (c) 2008 by <Philip Birch/University of Sussex> Version 0.1
1.5.6