* grabs from the K2T_V300 framegrabber. See comments for the Video* class for details about derived functions not commented here * * WANTED : Someone to rewrite this so that oriented grabs are more * efficient. * class K2T_V300_Mono public MonoVideo


Inheritance:


Public Fields

Public Methods

void circle(float x, float y, int r, int color = 1)
Draws a square with sides = 2*radius, aligned with the camera axes
void clearcircle(float x, float y, int r)
void clearcubic(float x, float y, int length, float angle, float a, float b, float c)
void clearline(float x, float y, int length, float angle, int samp = 1)
void clearline2(float x1, float y1, float x2, float y2)
void close()
void cubic(float x, float y, int length, float angle, float a, float b, float c, int color = 1)
Draws nothing
virtual void* current_frame_ptr()
char* device_info()
int grab(int *image, int x, int y, int width, int height, float angle = 0.0, int sampw =1, int samph =1, short int mask = 0xff)
Delegates calls to grab_aligned and grab_aligned_s when appropriate
int grab_aligned(int x, int y, int width, int height, int *image, short int mask = 0xff)
int grab_aligned(int *image, float &x, float &y, int width, int height, int sampw =1, int samph =1, short int mask = 0xff)
Optimized for dense grabs (i
int grab_aligned2(int x, int y, int width, int height, int *image, short int mask = 0xff)
Used to pre-grab a bounding box around oriented grabs
int grab_aligned_s(int x, int y, int width, int height, int *image, int wsamp, int lsamp, short int mask = 0xff)
This version should be used to grab lines that are either subsampled in the y direction, subsampled with wsamp >= 4 in the x direction, or a combination
void grab_constant_size(int *image, float x, float y, int width, int height, float angle = 0.0, short int mask = 0xff)
A vestigial function left over for some historical reason
K2T_V300_Mono(int channel = 0, int camera = 0)
void line(float x, float y, int length, float angle, int color = 1, int samp = 1)
Draws a line using routines similar to those in Acquire
void line2(float x1, float y1, float x2, float y2, int color = 1)
void linegrab(int x, int y, int length, int *image, float angle, short int mask = 0xff)
Currently does nothing
void point(int x, int y, Color color = 1, int size=1)
Draws a single point at (x,y) with color
int show(int x, int y, int width, int height, int *image)
Attempts to shows an image on the monitor
~K2T_V300_Mono()

Protected Methods

int map_color(Color colin)

Private Fields

unsigned int* mem_map
unsigned int* reg_map
int* vimage

Inherited from MonoVideo:

Public Methods

virtual void set_grab_type(Device_output_type ot)

Inherited from Video:

Public Methods

virtual int bytesperpixel()
virtual void* direct_memptr()
virtual int grab_region(int *image, int lx, int ly, int ux, int uy, int sampw =1, int samph = 1)
virtual int grab_region(Image &image, int lx, int ly, int sampw =1, int samph = 1)
virtual int grab_static(int *image, int x, int y, int width, int height, float angle = 0.0, int sampw =1, int samph =1, short int mask = 0xff)
virtual int grab_static(Image &image, int x, int y, float angle = 0.0, int sampw =1, int samph =1, short int mask = 0xff)
int height()
int in_view(int cx, int cy, int w, int h)
int in_view(const Image &x, int cx, int cy, float angle)
int in_view(const Image &x, int cx, int cy)
int in_view(int cx, int cy, int w, int h, float angle)
int in_view2(int x1, int y1, int x2, int y2)
virtual int is_mappable()
Device_output_type output_data_type()
virtual int post_grab()
virtual int pre_grab()
int width()

Protected Fields

int _bytesperpixel
int _is_mappable
int fg_ncols
int fg_nrows
Device_output_type input_type
int ncols
int nrows
Device_output_type output_type

Protected Methods

int adjust_to_first_coord(float &x, int width)
void map_image(int *x, int npixels)
void map_image(Image &x)
void set_fg_size(int nrows_in, int ncols_in)
Device_output_type set_input_type(Device_output_type ot)
void set_size(int nrows_in, int ncols_in)

Documentation

unsigned int* reg_map

unsigned int* mem_map

int* vimage

int map_color(Color colin)

K2T_V300_Mono(int channel = 0, int camera = 0)

~K2T_V300_Mono()

void close()

char* device_info()

virtual void* current_frame_ptr()

int grab(int *image, int x, int y, int width, int height, float angle = 0.0, int sampw =1, int samph =1, short int mask = 0xff)
Delegates calls to grab_aligned and grab_aligned_s when appropriate. Otherwise performs a dense initial grab of the bounding, aligned rectangle (grab_aligned2), and THEN uses the routines from Acquire.* to grab an image with the desired orientation. Very inefficient.

int grab_aligned(int *image, float &x, float &y, int width, int height, int sampw =1, int samph =1, short int mask = 0xff)
Optimized for dense grabs (i.e., no subsampling) of windows aligned with camera axes. Due to the fact that whole words (4 bytes) are transfered over the bus to and from the framegrabber, and because the words are unpacked to make four ints each, some ugly code is required. For some subsampled aligned grabs, grab_aligned_s (below) is faster.

int grab_aligned(int x, int y, int width, int height, int *image, short int mask = 0xff)

int grab_aligned2(int x, int y, int width, int height, int *image, short int mask = 0xff)
Used to pre-grab a bounding box around oriented grabs.

int grab_aligned_s(int x, int y, int width, int height, int *image, int wsamp, int lsamp, short int mask = 0xff)
This version should be used to grab lines that are either subsampled in the y direction, subsampled with wsamp >= 4 in the x direction, or a combination.

void grab_constant_size(int *image, float x, float y, int width, int height, float angle = 0.0, short int mask = 0xff)
A vestigial function left over for some historical reason. There shouldn't be a reason to use it.

void linegrab(int x, int y, int length, int *image, float angle, short int mask = 0xff)
Currently does nothing. The intention is to grab a single line of pixels at various orientations.

int show(int x, int y, int width, int height, int *image)
Attempts to shows an image on the monitor. However, because of timing problems (probably), little is actually visible on live output.

void point(int x, int y, Color color = 1, int size=1)
Draws a single point at (x,y) with color

void line(float x, float y, int length, float angle, int color = 1, int samp = 1)
Draws a line using routines similar to those in Acquire.*

void clearline(float x, float y, int length, float angle, int samp = 1)

void line2(float x1, float y1, float x2, float y2, int color = 1)

void clearline2(float x1, float y1, float x2, float y2)

void circle(float x, float y, int r, int color = 1)
Draws a square with sides = 2*radius, aligned with the camera axes

void clearcircle(float x, float y, int r)

void cubic(float x, float y, int length, float angle, float a, float b, float c, int color = 1)
Draws nothing. Do not use.

void clearcubic(float x, float y, int length, float angle, float a, float b, float c)


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de