Fawkes API  Fawkes Development Version
firevision::RectificationInfoBlock Class Reference

Rectification info block. More...

#include <>>

Inheritance diagram for firevision::RectificationInfoBlock:

List of all members.

Public Member Functions

 RectificationInfoBlock (uint8_t block_type, uint8_t camera, size_t block_size)
 Recommended constructor.
 RectificationInfoBlock (FireVisionDataFileBlock *block)
 Copy constructor.
virtual ~RectificationInfoBlock ()
 Destructor.
uint8_t camera () const
 Get block camera identifier.
virtual void mapping (uint16_t x, uint16_t y, uint16_t *to_x, uint16_t *to_y)=0
 Get mapping (to_x, to_y) for (x, y).

Protected Attributes

rectinfo_block_header_t_block_header
 Rectification block header.

Detailed Description

Rectification info block.

This base class defines the basic interface to interact with rectification info blocks. It manages a small memory chunk that may later be used via other recitification information classes in an easy manner. Concrete implementations of a specific block type shall be derived from this class.

Author:
Tim Niemueller

Constructor & Destructor Documentation

firevision::RectificationInfoBlock::RectificationInfoBlock ( uint8_t  block_type,
uint8_t  camera,
size_t  block_data_size 
)

Recommended constructor.

With this constructor a chunk of memory is allocated that is sufficient to hold the internal block header and the data of the given size. Note that the size you give is only meant to hold your type specific header and data. Some extra bytes are internally added for the type agnostic block header.

Parameters:
block_typetype of the block as defined per rectinfo_block_type_t
cameracamera identifier
block_data_sizesize of the data block, this means only the sum of the size of the type specific header and the data itself, NOT including the type agnostic block header.

Definition at line 78 of file rectinfo_block.cpp.

References firevision::FireVisionDataFileBlock::_data_size, _block_header, firevision::FireVisionDataFileBlock::_spec_header, firevision::_rectinfo_block_header_t::camera, and camera().

firevision::RectificationInfoBlock::RectificationInfoBlock ( FireVisionDataFileBlock block)

Copy constructor.

Copies data from the given FireVisionDataFileBlock. It is assumed that this actually is a rectification info block, check that before calling this method.

Parameters:
blockFireVision data file block

Definition at line 99 of file rectinfo_block.cpp.

References _block_header, and firevision::FireVisionDataFileBlock::_spec_header.

firevision::RectificationInfoBlock::~RectificationInfoBlock ( ) [virtual]

Destructor.

Destructs the chunk, if and only if _free_block_chunk is true.

Definition at line 109 of file rectinfo_block.cpp.

References _block_header.


Member Function Documentation

uint8_t firevision::RectificationInfoBlock::camera ( ) const

Get block camera identifier.

Returns:
camera identifier
See also:
rectinfo_block_header_t

Definition at line 120 of file rectinfo_block.cpp.

References _block_header, and firevision::_rectinfo_block_header_t::camera.

Referenced by firevision::TriclopsStereoProcessor::verify_rectification_lut(), and RectificationInfoBlock().

void firevision::RectificationInfoBlock::mapping ( uint16_t  x,
uint16_t  y,
uint16_t *  to_x,
uint16_t *  to_y 
) [pure virtual]

Get mapping (to_x, to_y) for (x, y).

This can be used as a general method to access the RectificationInfoBlock mapping. For many models there may be a better (faster) way to access the mapping information. It performance matters (and it most probably will) exploit this and use the provided shortcut.

Parameters:
xX pixel coordinate to get mapping for
yY pixel coordinate to get mapping for
to_xUpon return contains the X pixel coordinate of the unrectified image
to_yUpon return contains the Y pixel coordinate of the unrectified image

Implemented in firevision::RectificationLutInfoBlock.

Referenced by firevision::FilterRectify::apply().


Member Data Documentation

Rectification block header.

This is a pointer to the content-specific block header for rectification info blocks.

Definition at line 48 of file rectinfo_block.h.

Referenced by RectificationInfoBlock(), ~RectificationInfoBlock(), and camera().


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