roi.cpp File Reference

contains routines for manipulating the region of interests (ROI). More...

#include "fcdynamic.h"

Functions

int roi_sequence (Fg_Struct *fg, int *seq, int len)
 Writes the active ROI sequence to the frame grabber.
int roi_window (int index, int x, int width, int y, int height)
 Specifies the position in the image for index-th ROI.
int roi_exposure (int index, double exp, double ft)
 Specifies the exposure and frame time of the image for index-th ROI.
int roi_linlog (int index, int use_linlog, int ll1, int ll2, int comp)
 Specifies the linlog parameters of the image for index-th ROI.
int write_roi (Fg_Struct *fg, int index, int imgNr, int doInit)
 Writes the ROI information of the index-th ROI to the frame grabber.


Detailed Description

contains routines for manipulating the region of interests (ROI).


Function Documentation

int roi_exposure ( int  index,
double  exp,
double  ft 
)

Specifies the exposure and frame time of the image for index-th ROI.

This function specifies the exposure (length of time the camera's shutter is open) and the frame time (length of time until the next image is taken, e.g. the inverse of the frame rate), both in microseconds, that the camera will snap a picture.

Because the frame grabber only supports 8 ROIs, index must lie between 0 and 7 (e.g. ROI_0 <= index <= ROI_7). Finally, the ROI specified by index is NEVER written to the camera. You must call write_roi after calling this function for changes to take effect.

Parameters:
index the ROI where the parameters are saved
exp the exposure time in microseconds
ft the frame time in microseconds
See also:
roi_index

write_roi

int roi_linlog ( int  index,
int  use_linlog,
int  ll1,
int  ll2,
int  comp 
)

Specifies the linlog parameters of the image for index-th ROI.

This function specifies the linlog parameters (camera-specific technology that can be found in the Photonfocus TrackCam documentation).

Because the frame grabber only supports 8 ROIs, index must lie between 0 and 7 (e.g. ROI_0 <= index <= ROI_7). Finally, the ROI specified by index is NEVER written to the camera. You must call write_roi after calling this function for changes to take effect.

Parameters:
index the ROI where the parameters are saved
use_linlog a boolean value (0 = FALSE)
ll1 linlog parameter 1 (see Photonfocus doc for description)
ll2 linlog parameter 2 (see Photonfocus doc for description)
comp compensation parameter (see Photonfocus doc for description)
See also:
roi_index

write_roi

int roi_sequence ( Fg_Struct *  fg,
int *  seq,
int  len 
)

Writes the active ROI sequence to the frame grabber.

This function writes the ROI parameters to the frame grabber. The active ROIs will become active on the camera in the order that seq lists them. After cycling through the list, the sequence repeats itself from the beginning. A seq cannot exceed 4,096 entires and seq_len must equal the number of entries in seq.

Parameters:
grabber an initialized Fg_Struct object defined in the Silicon Software API
seq the sequence specifying when a ROI is active
len the length of seq.

int roi_window ( int  index,
int  x,
int  width,
int  y,
int  height 
)

Specifies the position in the image for index-th ROI.

This function specifies what portion of the pixel array on the camera will be transferred up to the application. The window is defined relative to the pixel coordinate system with [0,0] located in the top-most left corner of an image. The window will be placed starting at the the top-most [x,y] pixel coordinate with width and height.

Because the frame grabber only supports 8 ROIs, index must lie between 0 and 7 (e.g. ROI_0 <= index <= ROI_7). Finally, the ROI specified by index is NEVER written to the camera. You must call write_roi after calling this function for changes to take effect.

Parameters:
index the ROI where the parameters are saved
x the topmost x (or column) position in pixels
y the topmost y (or row) position in pixels
width the width of the window
height the height of the window
See also:
roi_index

write_roi

int write_roi ( Fg_Struct *  fg,
int  index,
int  imgNr,
int  doInit 
)

Writes the ROI information of the index-th ROI to the frame grabber.

write_roi writes any changes made to the index-th ROI. The camera is programmed with the updated changes no sooner than the imgNr image has been taken by the camera. If the camera is triggered via external hardware, camera self-trigger (a.k.a free running), or frame grabber then doInit is FALSE, otherwise the camera is software triggered and it must be TRUE for changes to take place. For more information about the triggering modes consult the Silicon software API.

Parameters:
grabber an initialized Fg_Struct object defined in the Silicon Software API
index the ROI where the parameters are saved
imgNr the (minimum) image that the ROI will be active for
doInit perform a reinitialization of the camera ROI (see Silicon Software API)
See also:
roi_index


Generated on Thu Jan 29 21:50:49 2009 for High Speed Vision System by  doxygen 1.5.8