Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Config::vision_config Struct Reference

#include <Config.h>

List of all members.


Detailed Description

vision information

Definition at line 52 of file Config.h.

Intrinsic Parameters

Lens Distortion for Close-Range Photogrammetry - D.C. Brown, Photometric Engineering, pages 855-866, Vol. 37, No. 8, 1971.

Can be computated by 'Camera Calibration Toolbox for Matlab', by Jean-Yves Bouguet: http://www.vision.caltech.edu/bouguetj/calib_doc/

void computeRay (float x, float y, float &r_x, float &r_y, float &r_z)
 provides a ray from camera through pixel in image; where possible, use computePixel for better accuracy (i.e. try to always move from world to camera instead of the other way around)
void computePixel (float r_x, float r_y, float r_z, float &x, float &y)
 provides a pixel hit in image by a ray going through the camera frame
float focal_len_x
 focal length of camera, in pixels, K11
float focal_len_y
 focal length of camera, in pixels, K22
float principle_point_x
 center of optical projection, K13
float principle_point_y
 center of optical projection, K23
float skew
 CCD skew, K12 = skew*focal_len_x.
float kc1_r2
 r-squared radial distortion
float kc2_r4
 r to the 4 radial distortion
float kc5_r6
 r to the 6 radial distortion
float kc3_tan1
 first tangential correction term
float kc4_tan2
 second tangential correctiont term
unsigned int calibration_res_x
 provides a ray from camera through pixel in image; where possible, use computePixel for better accuracy (i.e. try to always move from world to camera instead of the other way around)
unsigned int calibration_res_y
 provides a ray from camera through pixel in image; where possible, use computePixel for better accuracy (i.e. try to always move from world to camera instead of the other way around)

Public Types

 ENCODE_COLOR
 send Y, U, and V channels
 ENCODE_SINGLE_CHANNEL
 send only a single channel (which channel to send is stored in Config::vision_config::rawcam_channel) This is also used for all seg cam images
 COMPRESS_NONE
 no compression (other than subsampling)
 COMPRESS_JPEG
 JPEG compression.
 COMPRESS_PNG
 PNG compression.
 COMPRESS_RLE
 RLE compression.
enum  encoding_t { ENCODE_COLOR, ENCODE_SINGLE_CHANNEL }
 type of information to send, stored in Config::vision_config::rawcam_encoding More...
enum  compression_t { COMPRESS_NONE, COMPRESS_JPEG, COMPRESS_PNG, COMPRESS_RLE }
 compression format to use, stored in Config::vision_config::rawcam_compression More...

Public Member Functions

 vision_config ()
 constructor

Public Attributes

int white_balance
 white balance
int gain
 gain
int shutter_speed
 shutter speed
int resolution
 resolution
std::vector< std::string > thresh
 thresholds
char colors [50]
 colors
int rawcam_port
 port to send raw frames on
int rawcam_transport
 transport protocol: 0 for udp, 1 for tcp
unsigned int rawcam_interval
 interval between images: 0 for fast-as-possible, 100 for 10 FPS, 200 for 5 FPS, etc.
int segcam_port
 port to send segmented color frames on
int segcam_transport
 transport protocol: 0 for udp, 1 for tcp
unsigned int segcam_interval
 interval between images: 0 for fast-as-possible, 100 for 10 FPS, 200 for 5 FPS, etc.
int region_port
 port to send Region information on
int region_transport
 transport protocol: 0 for udp, 1 for tcp
int obj_port
 port to send object info on
bool restore_image
 if true, replaces pixels holding image info with actual image pixels (as much as possible anyway)
bool region_calc_total
 if true, RegionGenerator will calculate total area for each color (has to run through the region list for each color)
J_DCT_METHOD jpeg_dct_method
 pick between dct methods for jpeg compression
float aspectRatio
 ratio of width to height (x_res/y_res); this is *not* read from configuration file, but set from most recent camera image (or RobotInfo namespace values if no camera image has been received)
float x_range
 range of values for the x axis when using generalized coordinates; this is *not* read from configuration file, but set from most recent camera image (or RobotInfo namespace values if no camera image has been received)
float y_range
 range of values for the x axis when using generalized coordinates; this is *not* read from configuration file, but set from most recent camera image (or RobotInfo namespace values if no camera image has been received)
encoding_t rawcam_encoding
 holds whether to send color or single channel
int rawcam_channel
 RawCameraGenerator::channel_id_t, if raw_encoding is single channel, this holds the channel to send (computed from rawcam_encoding, not set directly).
compression_t rawcam_compression
 holds whether to send jpeg compression
int rawcam_compress_quality
 0-100, compression quality (currently only used by jpeg)
int rawcam_y_skip
 resolution level to transmit y channel at
int rawcam_uv_skip
 resolution level to transmit uv channel at
int segcam_skip
 resolution level to transmit segmented images at
int segcam_channel
 channel to send (which color threshold map to use)
compression_t segcam_compression
 what compression to use on the segmented image
int regioncam_skip
 resolution level to transmit segmented images at


Member Enumeration Documentation

compression format to use, stored in Config::vision_config::rawcam_compression

Enumerator:
COMPRESS_NONE  no compression (other than subsampling)
COMPRESS_JPEG  JPEG compression.
COMPRESS_PNG  PNG compression.
COMPRESS_RLE  RLE compression.

Definition at line 84 of file Config.h.

type of information to send, stored in Config::vision_config::rawcam_encoding

Enumerator:
ENCODE_COLOR  send Y, U, and V channels
ENCODE_SINGLE_CHANNEL  send only a single channel (which channel to send is stored in Config::vision_config::rawcam_channel) This is also used for all seg cam images

Definition at line 76 of file Config.h.


Constructor & Destructor Documentation

Config::vision_config::vision_config (  )  [inline]

constructor

Definition at line 164 of file Config.h.


Member Function Documentation

void Config::vision_config::computePixel ( float  r_x,
float  r_y,
float  r_z,
float &  x,
float &  y 
) [inline]

provides a pixel hit in image by a ray going through the camera frame

Hopefully we'll eventually upgrade this to account for lens distortion

Parameters:
[in] r_x x value of the ray
[in] r_y y value of the ray
[in] r_z z value of the ray
[out] x x position in range [-1,1]
[out] y y position in range [-1,1]

Definition at line 145 of file Config.h.

void Config::vision_config::computeRay ( float  x,
float  y,
float &  r_x,
float &  r_y,
float &  r_z 
) [inline]

provides a ray from camera through pixel in image; where possible, use computePixel for better accuracy (i.e. try to always move from world to camera instead of the other way around)

We can't undo some terms of the distortion model -- this is an estimate.

Parameters:
[in] x x position in range [-1,1]
[in] y y position in range [-1,1]
[out] r_x x value of the ray
[out] r_y y value of the ray
[out] r_z z value of the ray (always 1)

Definition at line 126 of file Config.h.


Member Data Documentation

ratio of width to height (x_res/y_res); this is *not* read from configuration file, but set from most recent camera image (or RobotInfo namespace values if no camera image has been received)

Definition at line 71 of file Config.h.

Referenced by RawCameraGenerator::processEvent().

provides a ray from camera through pixel in image; where possible, use computePixel for better accuracy (i.e. try to always move from world to camera instead of the other way around)

We can't undo some terms of the distortion model -- this is an estimate.

Parameters:
[in] x x position in range [-1,1]
[in] y y position in range [-1,1]
[out] r_x x value of the ray
[out] r_y y value of the ray
[out] r_z z value of the ray (always 1)

Definition at line 116 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

provides a ray from camera through pixel in image; where possible, use computePixel for better accuracy (i.e. try to always move from world to camera instead of the other way around)

We can't undo some terms of the distortion model -- this is an estimate.

Parameters:
[in] x x position in range [-1,1]
[in] y y position in range [-1,1]
[out] r_x x value of the ray
[out] r_y y value of the ray
[out] r_z z value of the ray (always 1)

Definition at line 117 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

colors

Definition at line 58 of file Config.h.

Referenced by Config::setValue(), and vision_config().

focal length of camera, in pixels, K11

Definition at line 106 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

focal length of camera, in pixels, K22

Definition at line 107 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

gain

Definition at line 54 of file Config.h.

Referenced by Config::setValue().

pick between dct methods for jpeg compression

Definition at line 70 of file Config.h.

Referenced by JPEGGenerator::calcImage(), and Config::setValue().

r-squared radial distortion

Definition at line 111 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

r to the 4 radial distortion

Definition at line 112 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

first tangential correction term

Definition at line 114 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

second tangential correctiont term

Definition at line 115 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

r to the 6 radial distortion

Definition at line 113 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

port to send object info on

Definition at line 67 of file Config.h.

Referenced by Config::setValue().

center of optical projection, K13

Definition at line 108 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

center of optical projection, K23

Definition at line 109 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

RawCameraGenerator::channel_id_t, if raw_encoding is single channel, this holds the channel to send (computed from rawcam_encoding, not set directly).

Definition at line 81 of file Config.h.

Referenced by RawCamBehavior::getSourceLayer(), Config::setValue(), RawCamBehavior::writeColor(), and RawCamBehavior::writeSingleChannel().

0-100, compression quality (currently only used by jpeg)

Definition at line 92 of file Config.h.

Referenced by JPEGGenerator::calcImage(), and Config::setValue().

interval between images: 0 for fast-as-possible, 100 for 10 FPS, 200 for 5 FPS, etc.

Definition at line 61 of file Config.h.

Referenced by RawCamBehavior::processEvent(), and Config::setValue().

port to send raw frames on

Definition at line 59 of file Config.h.

Referenced by RawCamBehavior::getClassDescription(), RawCamBehavior::setupServer(), and Config::setValue().

transport protocol: 0 for udp, 1 for tcp

Definition at line 60 of file Config.h.

Referenced by RawCamBehavior::processEvent(), RawCamBehavior::setupServer(), and Config::setValue().

resolution level to transmit uv channel at

Definition at line 94 of file Config.h.

Referenced by JPEGGenerator::calcImage(), RawCamBehavior::getSourceLayer(), Config::setValue(), and RawCamBehavior::writeColor().

if true, RegionGenerator will calculate total area for each color (has to run through the region list for each color)

Definition at line 69 of file Config.h.

Referenced by Config::setValue().

port to send Region information on

Definition at line 65 of file Config.h.

Referenced by RegionCamBehavior::setupServer(), and Config::setValue().

transport protocol: 0 for udp, 1 for tcp

Definition at line 66 of file Config.h.

Referenced by RegionCamBehavior::processEvent(), RegionCamBehavior::setupServer(), and Config::setValue().

resolution level to transmit segmented images at

Definition at line 98 of file Config.h.

Referenced by Config::setValue(), and RegionCamBehavior::writeRegions().

if true, replaces pixels holding image info with actual image pixels (as much as possible anyway)

Definition at line 68 of file Config.h.

Referenced by RawCameraGenerator::calcImage(), and Config::setValue().

channel to send (which color threshold map to use)

Definition at line 96 of file Config.h.

Referenced by Config::setValue(), RegionCamBehavior::writeRegions(), SegCamBehavior::writeRLE(), and SegCamBehavior::writeSeg().

what compression to use on the segmented image

Definition at line 97 of file Config.h.

Referenced by SegCamBehavior::processEvent(), and Config::setValue().

interval between images: 0 for fast-as-possible, 100 for 10 FPS, 200 for 5 FPS, etc.

Definition at line 64 of file Config.h.

Referenced by SegCamBehavior::processEvent(), and Config::setValue().

resolution level to transmit segmented images at

Definition at line 95 of file Config.h.

Referenced by Config::setValue(), SegCamBehavior::writeRLE(), and SegCamBehavior::writeSeg().

transport protocol: 0 for udp, 1 for tcp

Definition at line 63 of file Config.h.

Referenced by SegCamBehavior::processEvent(), SegCamBehavior::setupServer(), and Config::setValue().

shutter speed

Definition at line 55 of file Config.h.

Referenced by Config::setValue().

CCD skew, K12 = skew*focal_len_x.

Definition at line 110 of file Config.h.

Referenced by computePixel(), computeRay(), and Config::setValue().

std::vector<std::string> Config::vision_config::thresh

thresholds

Definition at line 57 of file Config.h.

Referenced by Config::setValue().

white balance

Definition at line 53 of file Config.h.

Referenced by Config::setValue().

range of values for the x axis when using generalized coordinates; this is *not* read from configuration file, but set from most recent camera image (or RobotInfo namespace values if no camera image has been received)

Definition at line 72 of file Config.h.

Referenced by RawCameraGenerator::processEvent(), and BallDetectionGenerator::testSendEvent().

range of values for the x axis when using generalized coordinates; this is *not* read from configuration file, but set from most recent camera image (or RobotInfo namespace values if no camera image has been received)

Definition at line 73 of file Config.h.

Referenced by RawCameraGenerator::processEvent(), and BallDetectionGenerator::testSendEvent().


The documentation for this struct was generated from the following file:

Tekkotsu v3.0
Generated Wed Oct 4 00:04:58 2006 by Doxygen 1.4.7