#include "stdafx.h"
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include <conio.h>
#include <1394camera.h>
#include "cvpixel.h"
Enumerations | |
enum | ColourSpace { YUV444, YUV422, YUV411, RGB, MONO8, MONO16 } |
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 | 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. | |
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 | getColourString (enum ColourSpace col, char *name) |
Converts colour space enum into human readable string. | |
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 (void) |
starts the camera acquisition process | |
int | stopFWCamera (void) |
stops the acquisition | |
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 | |
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. |
enum ColourSpace |
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