RectificationInfoBlock Class Reference
Rectification info block. More...
#include <fvutils/rectification/rectinfo_block.h>

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.
Definition at line 31 of file rectinfo_block.h.
Constructor & Destructor Documentation
| 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_type type of the block as defined per rectinfo_block_type_t camera camera identifier block_data_size size 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 73 of file rectinfo_block.cpp.
References _block_header, FireVisionDataFileBlock::_data_size, FireVisionDataFileBlock::_spec_header, and _rectinfo_block_header_t::camera.
| 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:
-
block FireVision data file block
Definition at line 94 of file rectinfo_block.cpp.
References _block_header, and FireVisionDataFileBlock::_spec_header.
| RectificationInfoBlock::~RectificationInfoBlock | ( | ) | [virtual] |
Destructor.
Destructs the chunk, if and only if _free_block_chunk is true.
Definition at line 104 of file rectinfo_block.cpp.
References _block_header.
Member Function Documentation
| uint8_t RectificationInfoBlock::camera | ( | ) | const |
Get block camera identifier.
- Returns:
- camera identifier
- See also:
- rectinfo_block_header_t
Definition at line 115 of file rectinfo_block.cpp.
References _block_header, and _rectinfo_block_header_t::camera.
Referenced by TriclopsStereoProcessor::verify_rectification_lut().
| void 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:
-
x X pixel coordinate to get mapping for y Y pixel coordinate to get mapping for to_x Upon return contains the X pixel coordinate of the unrectified image to_y Upon return contains the Y pixel coordinate of the unrectified image
Implemented in RectificationLutInfoBlock.
Referenced by FilterRectify::apply().
Member Data Documentation
RectificationInfoBlock::_block_header [protected] |
Rectification block header.
This is a pointer to the content-specific block header for rectification info blocks.
Definition at line 43 of file rectinfo_block.h.
Referenced by camera(), RectificationInfoBlock(), and ~RectificationInfoBlock().
The documentation for this class was generated from the following files:
- src/firevision/fvutils/rectification/rectinfo_block.h
- src/firevision/fvutils/rectification/rectinfo_block.cpp

