Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Config::vision_config Class Reference

vision configuration options (this is a *big* section, with sub-sections) More...

#include <Config.h>

Inheritance diagram for Config::vision_config:

Detailed Description

vision configuration options (this is a *big* section, with sub-sections)

Definition at line 274 of file Config.h.

List of all members.

Classes

class  DepthCamConfig
class  RawCamConfig
 contains settings specific to the "RawCam" (original camera images) for streaming video over the network More...
class  RegionCamConfig
 contains settings specific to the "RegionCam" (only display a box for each blob of color) for streaming over the network More...
class  SegCamConfig
 contains settings specific to the "SegCam" (segmented color images) for streaming video over the network More...
class  StreamingConfig
 contains settings related to streaming video over the network More...

Public Types

enum  white_balance_levels { WB_INDOOR = 1, WB_OUTDOOR, WB_FLUORESCENT }
 

white balance levels supported by the Aibo's camera

More...
enum  gain_levels { GAIN_LOW = 1, GAIN_MID, GAIN_HIGH }
 

gain levels supported by the Aibo's camera

More...
enum  shutter_speeds { SHUTTER_SLOW = 1, SHUTTER_MID, SHUTTER_FAST }
 

shutter speeds supported by the Aibo's camera

More...
enum  encoding_t { ENCODE_COLOR, ENCODE_SINGLE_CHANNEL, ENCODE_DEPTH }

Public Member Functions

 vision_config ()
 constructor
void computeRay (float x, float y, float &r_x, float &r_y, float &r_z)
 provides a ray through camera origin from a generalized pixel coordinate
void computePixel (float r_x, float r_y, float r_z, float &x, float &y)
 provides a generalized pixel hit in image by a ray going through the camera origin
void computePixelCorrected (float r_x, float r_y, float r_z, float &x, float &y)
 provides a generalized pixel hit in image by a ray going through the camera origin that is corrected via the homography

Public Attributes

plist::NamedEnumeration
< white_balance_levels
white_balance
 white balance shifts color spectrum in the image
plist::NamedEnumeration
< gain_levels
gain
 Increasing gain will brighten the image, at the expense of more graininess/noise.
plist::NamedEnumeration
< shutter_speeds
shutter_speed
 slower shutter will brighten image, but increases motion blur
plist::Primitive< int > resolution
 the resolution that object recognition system will run at -- this counts down from the maximum resolution layer, so higher numbers mean lower resolution
plist::ArrayOf
< plist::Primitive
< std::string > > 
thresh
 threshold file names
plist::Primitive< std::string > colors
 colors definition (.col) file
plist::Primitive< bool > restore_image
 if true, replaces pixels holding image info with actual image pixels (as much as possible anyway)
plist::Primitive< bool > region_calc_total
 if true, RegionGenerator will calculate total area for each color (has to run through the region list for each color)
plist::NamedEnumeration
< J_DCT_METHOD > 
jpeg_dct_method
 pick between dct methods for jpeg compression
plist::Primitive< floataspectRatio
 ratio of width to height (x_res/y_res); this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is 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 (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):
float y_range
 range of values for the y axis when using generalized coordinates; this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):
float x_focalLen
 focal length of x axis: x_range / tan(RobotInfo::CameraHorizFOV); this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):
float y_focalLen
 focal length of y axis: y_range / tan(RobotInfo::CameraVertFOV); this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):
Config::vision_config::RawCamConfig rawcam
 contains settings specific to the "RawCam" (original camera images) for streaming video over the network
Config::vision_config::DepthCamConfig depthcam
Config::vision_config::SegCamConfig segcam
 contains settings specific to the "SegCam" (segmented color images) for streaming video over the network
Config::vision_config::RegionCamConfig regioncam
 contains settings specific to the "RegionCam" (only display a box for each blob of color) for streaming over the network

Static Public Attributes

static const unsigned int NUM_ENCODINGS = 3
 number of encodings available
static const char * encoding_names [NUM_ENCODINGS+1] = { "color", "grayscale", "depth", NULL }
 string names for encoding_t
static const char * dct_method_names [] = { "islow", "ifast", "float", NULL }
 string names for J_DCT_METHOD

Protected Member Functions

void aspectRatioChanged ()

Protected Attributes

plist::PrimitiveCallbackMember
< vision_config
aspectRatioListener

Member Enumeration Documentation

Enumerator:
ENCODE_COLOR 

send Y, U, and V channels

ENCODE_SINGLE_CHANNEL 

send only a single channel (which channel to send is stored in channel) This is also used for all seg cam images

ENCODE_DEPTH 

Definition at line 376 of file Config.h.

gain levels supported by the Aibo's camera

Enumerator:
GAIN_LOW 
GAIN_MID 
GAIN_HIGH 

Definition at line 359 of file Config.h.

shutter speeds supported by the Aibo's camera

Enumerator:
SHUTTER_SLOW 
SHUTTER_MID 
SHUTTER_FAST 

Definition at line 372 of file Config.h.

white balance levels supported by the Aibo's camera

Enumerator:
WB_INDOOR 
WB_OUTDOOR 
WB_FLUORESCENT 

Definition at line 346 of file Config.h.


Constructor & Destructor Documentation

Config::vision_config::vision_config (  ) 

constructor

Definition at line 277 of file Config.h.


Member Function Documentation

void Config::vision_config::aspectRatioChanged (  )  [protected]

Definition at line 493 of file Config.cc.

void Config::vision_config::computePixel ( float  r_x,
float  r_y,
float  r_z,
float x,
float y 
)

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

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 ±x_range (±1 assuming x is the major camera axis)
[out] y y position in range ±y_range (±1/aspectRatio assuming x is the major camera axis)

Definition at line 523 of file Config.cc.

Referenced by computePixelCorrected(), DualCoding::MapBuilder::isLineVisible(), DualCoding::MapBuilder::isPointVisible(), and projectShapeToCamera().

void Config::vision_config::computePixelCorrected ( float  r_x,
float  r_y,
float  r_z,
float x,
float y 
)

provides a generalized pixel hit in image by a ray going through the camera origin that is corrected via the homography

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 ±x_range (±1 assuming x is the major camera axis)
[out] y y position in range ±y_range (±1/aspectRatio assuming x is the major camera axis)

Definition at line 532 of file Config.cc.

Referenced by RawCam::drawShapesIntoBuffer().

void Config::vision_config::computeRay ( float  x,
float  y,
float r_x,
float r_y,
float r_z 
)

provides a ray through camera origin from a generalized pixel coordinate

Ideally this would take camera calibration into account, e.g. Lens Distortion for Close-Range Photogrammetry - D.C. Brown, Photometric Engineering, pages 855-866, Vol. 37, No. 8, 1971. or using 'Camera Calibration Toolbox for Matlab', by Jean-Yves Bouguet: http://www.vision.caltech.edu/bouguetj/calib_doc/

However, at the moment this does a naïve computation mapping directly from field of view as specified by RobotInfo CameraFOV

Parameters:
[in] x x position in range ±x_range (±1 assuming x is the major camera axis)
[in] y y position in range ±y_range (±1/aspectRatio assuming x is the major camera axis)
[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 505 of file Config.cc.

Referenced by DualCoding::Lookout::findLocationFor(), and Kinematics::projectToGround().


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 (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):

Definition at line 391 of file Config.h.

Referenced by aspectRatioChanged(), computePixel(), RawCameraGenerator::doEvent(), DualCoding::MapBuilder::isLineVisible(), and DualCoding::MapBuilder::isPointVisible().

colors definition (.col) file

Definition at line 386 of file Config.h.

Referenced by vision_config().

const char * Config::vision_config::dct_method_names = { "islow", "ifast", "float", NULL } [static]

string names for J_DCT_METHOD

Definition at line 389 of file Config.h.

const char * Config::vision_config::encoding_names = { "color", "grayscale", "depth", NULL } [static]

string names for encoding_t

Definition at line 382 of file Config.h.

Increasing gain will brighten the image, at the expense of more graininess/noise.

Definition at line 361 of file Config.h.

Referenced by vision_config().

pick between dct methods for jpeg compression

Definition at line 390 of file Config.h.

Referenced by vision_config().

const unsigned int Config::vision_config::NUM_ENCODINGS = 3 [static]

number of encodings available

Definition at line 381 of file Config.h.

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

Definition at line 388 of file Config.h.

Referenced by vision_config().

contains settings specific to the "RegionCam" (only display a box for each blob of color) for streaming over the network

Referenced by RegionCam::doEvent(), RegionCam::setupServer(), vision_config(), and RegionCam::writeRegions().

the resolution that object recognition system will run at -- this counts down from the maximum resolution layer, so higher numbers mean lower resolution

Definition at line 384 of file Config.h.

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

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

Definition at line 387 of file Config.h.

Referenced by RawCameraGenerator::calcImage(), and vision_config().

slower shutter will brighten image, but increases motion blur

Definition at line 374 of file Config.h.

Referenced by vision_config().

threshold file names

Definition at line 385 of file Config.h.

Referenced by vision_config().

white balance shifts color spectrum in the image

Definition at line 348 of file Config.h.

Referenced by vision_config().

focal length of x axis: x_range / tan(RobotInfo::CameraHorizFOV); this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):

Definition at line 394 of file Config.h.

Referenced by aspectRatioChanged(), computePixel(), and computeRay().

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 (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):

Definition at line 392 of file Config.h.

Referenced by aspectRatioChanged(), and BallDetectionGenerator::testSendEvent().

focal length of y axis: y_range / tan(RobotInfo::CameraVertFOV); this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):

Definition at line 395 of file Config.h.

Referenced by aspectRatioChanged(), computePixel(), and computeRay().

range of values for the y axis when using generalized coordinates; this is *not* read from configuration file, but set from most recent camera image (via RawCameraGenerator, or RobotInfo namespace values until a camera image is been received):

Definition at line 393 of file Config.h.

Referenced by aspectRatioChanged(), and BallDetectionGenerator::testSendEvent().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:06 2016 by Doxygen 1.6.3