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

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_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 rle_port
 port to send RLE frames on
int rle_transport
 transport protocol: 0 for udp, 1 for tcp
unsigned int rle_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)
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 rlecam_skip
 resolution level to transmit segmented images at
int rlecam_channel
 channel of RLEGenerator to send
compression_t rlecam_compression
 what compression to use on the segmented image
int regioncam_skip
 resolution level to transmit segmented images at


Member Enumeration Documentation

enum Config::vision_config::compression_t
 

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

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

Definition at line 83 of file Config.h.

enum Config::vision_config::encoding_t
 

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 75 of file Config.h.


Constructor & Destructor Documentation

Config::vision_config::vision_config  )  [inline]
 

constructor

Definition at line 162 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 143 of file Config.h.

Referenced by DrawSkeletonBehavior::getCameraPoint(), and StareAtPawBehavior2::processEvent().

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 124 of file Config.h.


Member Data Documentation

float Config::vision_config::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)

Definition at line 70 of file Config.h.

Referenced by StareAtPawBehavior2::processEvent(), and RawCameraGenerator::processEvent().

unsigned int Config::vision_config::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)

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 114 of file Config.h.

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

unsigned int Config::vision_config::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)

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 115 of file Config.h.

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

char Config::vision_config::colors[50]
 

colors

Definition at line 58 of file Config.h.

Referenced by Config::setValue().

float Config::vision_config::focal_len_x
 

focal length of camera, in pixels, K11

Definition at line 104 of file Config.h.

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

float Config::vision_config::focal_len_y
 

focal length of camera, in pixels, K22

Definition at line 105 of file Config.h.

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

int Config::vision_config::gain
 

gain

Definition at line 54 of file Config.h.

Referenced by Config::setValue().

J_DCT_METHOD Config::vision_config::jpeg_dct_method
 

pick between dct methods for jpeg compression

Definition at line 69 of file Config.h.

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

float Config::vision_config::kc1_r2
 

r-squared radial distortion

Definition at line 109 of file Config.h.

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

float Config::vision_config::kc2_r4
 

r to the 4 radial distortion

Definition at line 110 of file Config.h.

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

float Config::vision_config::kc3_tan1
 

first tangential correction term

Definition at line 112 of file Config.h.

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

float Config::vision_config::kc4_tan2
 

second tangential correctiont term

Definition at line 113 of file Config.h.

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

float Config::vision_config::kc5_r6
 

r to the 6 radial distortion

Definition at line 111 of file Config.h.

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

int Config::vision_config::obj_port
 

port to send object info on

Definition at line 67 of file Config.h.

Referenced by Config::setValue().

float Config::vision_config::principle_point_x
 

center of optical projection, K13

Definition at line 106 of file Config.h.

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

float Config::vision_config::principle_point_y
 

center of optical projection, K23

Definition at line 107 of file Config.h.

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

int Config::vision_config::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).

Definition at line 80 of file Config.h.

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

int Config::vision_config::rawcam_compress_quality
 

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

Definition at line 90 of file Config.h.

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

compression_t Config::vision_config::rawcam_compression
 

holds whether to send jpeg compression

Definition at line 88 of file Config.h.

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

encoding_t Config::vision_config::rawcam_encoding
 

holds whether to send color or single channel

Definition at line 79 of file Config.h.

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

unsigned int Config::vision_config::rawcam_interval
 

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().

int Config::vision_config::rawcam_port
 

port to send raw frames on

Definition at line 59 of file Config.h.

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

int Config::vision_config::rawcam_transport
 

transport protocol: 0 for udp, 1 for tcp

Definition at line 60 of file Config.h.

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

int Config::vision_config::rawcam_uv_skip
 

resolution level to transmit uv channel at

Definition at line 92 of file Config.h.

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

int Config::vision_config::rawcam_y_skip
 

resolution level to transmit y channel at

Definition at line 91 of file Config.h.

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

int Config::vision_config::region_port
 

port to send Region information on

Definition at line 65 of file Config.h.

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

int Config::vision_config::region_transport
 

transport protocol: 0 for udp, 1 for tcp

Definition at line 66 of file Config.h.

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

int Config::vision_config::regioncam_skip
 

resolution level to transmit segmented images at

Definition at line 96 of file Config.h.

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

int Config::vision_config::resolution
 

resolution

Definition at line 56 of file Config.h.

Referenced by BallDetectionGenerator::processEvent(), Config::setValue(), and BallDetectionGenerator::testSendEvent().

bool Config::vision_config::restore_image
 

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().

unsigned int Config::vision_config::rle_interval
 

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().

int Config::vision_config::rle_port
 

port to send RLE frames on

Definition at line 62 of file Config.h.

Referenced by SegCamBehavior::DoStart(), SegCamBehavior::getClassDescription(), RegionCamBehavior::getClassDescription(), and Config::setValue().

int Config::vision_config::rle_transport
 

transport protocol: 0 for udp, 1 for tcp

Definition at line 63 of file Config.h.

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

int Config::vision_config::rlecam_channel
 

channel of RLEGenerator to send

Definition at line 94 of file Config.h.

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

compression_t Config::vision_config::rlecam_compression
 

what compression to use on the segmented image

Definition at line 95 of file Config.h.

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

int Config::vision_config::rlecam_skip
 

resolution level to transmit segmented images at

Definition at line 93 of file Config.h.

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

int Config::vision_config::shutter_speed
 

shutter speed

Definition at line 55 of file Config.h.

Referenced by Config::setValue().

float Config::vision_config::skew
 

CCD skew, K12 = skew*focal_len_x.

Definition at line 108 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().

int Config::vision_config::white_balance
 

white balance

Definition at line 53 of file Config.h.

Referenced by Config::setValue().

float Config::vision_config::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)

Definition at line 71 of file Config.h.

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

float Config::vision_config::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)

Definition at line 72 of file Config.h.

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


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

Tekkotsu v2.4.1
Generated Tue Aug 16 16:34:59 2005 by Doxygen 1.4.4