Fawkes API  Fawkes Development Version
firevision::RectificationLutInfoBlock Class Reference

Recitification Lookup Table Block. More...

#include <>>

Inheritance diagram for firevision::RectificationLutInfoBlock:

Public Member Functions

 RectificationLutInfoBlock (uint16_t width, uint16_t height, uint8_t camera)
 Constructor. More...
 
 RectificationLutInfoBlock (FireVisionDataFileBlock *block)
 Copy Constructor. More...
 
void set_mapping (uint16_t x, uint16_t y, uint16_t to_x, uint16_t to_y)
 Set mapping. More...
 
virtual void mapping (uint16_t x, uint16_t y, uint16_t *to_x, uint16_t *to_y)
 Get mapping (to_x, to_y) for (x, y). More...
 
uint16_t pixel_width ()
 Get width of the LUT. More...
 
uint16_t pixel_height ()
 Get height the LUT. More...
 
rectinfo_lut_16x16_entry_tlut_data ()
 Get raw LUT data. More...
 
- Public Member Functions inherited from firevision::RectificationInfoBlock
 RectificationInfoBlock (uint8_t block_type, uint8_t camera, size_t block_size)
 Recommended constructor. More...
 
 RectificationInfoBlock (FireVisionDataFileBlock *block)
 Copy constructor. More...
 
virtual ~RectificationInfoBlock ()
 Destructor. More...
 
uint8_t camera () const
 Get block camera identifier. More...
 
- Public Member Functions inherited from firevision::FireVisionDataFileBlock
 FireVisionDataFileBlock (unsigned int type, size_t data_size, void *spec_header, size_t spec_header_size)
 Constructor. More...
 
 FireVisionDataFileBlock (unsigned int type, size_t data_size, size_t spec_header_size)
 Constructor. More...
 
 FireVisionDataFileBlock (unsigned int type, size_t data_size)
 Constructor. More...
 
 FireVisionDataFileBlock (FireVisionDataFileBlock *block)
 Shallow copy constructor. More...
 
virtual ~FireVisionDataFileBlock ()
 Destructor. More...
 
unsigned int type () const
 Get block type. More...
 
void * block_memptr () const
 Pointer to the whole block. More...
 
size_t block_size () const
 Size of blocks. More...
 
void * data_ptr () const
 Get data pointer. More...
 
size_t data_size () const
 Size of data chunk. More...
 

Additional Inherited Members

- Protected Member Functions inherited from firevision::FireVisionDataFileBlock
void set_spec_header (void *spec_header, size_t spec_header_size)
 Set content-specific header. More...
 
- Protected Attributes inherited from firevision::RectificationInfoBlock
rectinfo_block_header_t_block_header
 Rectification block header. More...
 
- Protected Attributes inherited from firevision::FireVisionDataFileBlock
void * _data
 Pointer to the internal data segment. More...
 
size_t _data_size
 Size of _data in bytes. More...
 
void * _spec_header
 Pointer to the content specific block header. More...
 

Detailed Description

Recitification Lookup Table Block.

This class defines a rectification lookup table info block that can be used to define a LUT that maps rectified to unrectified pixels.

Author
Tim Niemueller

Definition at line 34 of file rectinfo_lut_block.h.

Constructor & Destructor Documentation

◆ RectificationLutInfoBlock() [1/2]

firevision::RectificationLutInfoBlock::RectificationLutInfoBlock ( uint16_t  width,
uint16_t  height,
uint8_t  camera 
)

Constructor.

Parameters
widthwidth of the image
heightheight of the image
cameracamera identifier, see rectinfo_camera_t

Definition at line 47 of file rectinfo_lut_block.cpp.

References firevision::FireVisionDataFileBlock::_data, firevision::_rectinfo_lut_16x16_block_header_t::height, and firevision::_rectinfo_lut_16x16_block_header_t::width.

◆ RectificationLutInfoBlock() [2/2]

firevision::RectificationLutInfoBlock::RectificationLutInfoBlock ( FireVisionDataFileBlock block)

Copy Constructor.

It is assumed that the block actually is a rectification LUT info block. Check that before calling this method.

Parameters
blockblock to copy

Definition at line 69 of file rectinfo_lut_block.cpp.

References firevision::FireVisionDataFileBlock::_data.

Member Function Documentation

◆ lut_data()

rectinfo_lut_16x16_entry_t * firevision::RectificationLutInfoBlock::lut_data ( )

Get raw LUT data.

Use this to access the LUT.

Returns
pointer to raw LUT data

Definition at line 147 of file rectinfo_lut_block.cpp.

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

◆ mapping()

void firevision::RectificationLutInfoBlock::mapping ( uint16_t  x,
uint16_t  y,
uint16_t *  to_x,
uint16_t *  to_y 
)
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

Implements firevision::RectificationInfoBlock.

Definition at line 79 of file rectinfo_lut_block.cpp.

References firevision::_rectinfo_lut_16x16_block_header_t::height, firevision::_rectinfo_lut_16x16_block_header_t::width, firevision::_rectinfo_lut_16x16_entry_t::x, and firevision::_rectinfo_lut_16x16_entry_t::y.

Referenced by firevision::TriclopsStereoProcessor::verify_rectification_lut().

◆ pixel_height()

uint16_t firevision::RectificationLutInfoBlock::pixel_height ( )

Get height the LUT.

Returns
height of LUT.

Definition at line 136 of file rectinfo_lut_block.cpp.

References firevision::_rectinfo_lut_16x16_block_header_t::height.

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

◆ pixel_width()

uint16_t firevision::RectificationLutInfoBlock::pixel_width ( )

Get width of the LUT.

Returns
width of LUT.

Definition at line 126 of file rectinfo_lut_block.cpp.

References firevision::_rectinfo_lut_16x16_block_header_t::width.

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

◆ set_mapping()

void firevision::RectificationLutInfoBlock::set_mapping ( uint16_t  x,
uint16_t  y,
uint16_t  to_x,
uint16_t  to_y 
)

Set mapping.

Parameters
xX pixel coordinate to get mapping for
yY pixel coordinate to get mapping for
to_xX pixel coordinate of the unrectified image
to_yY pixel coordinate of the unrectified image

Definition at line 101 of file rectinfo_lut_block.cpp.

References firevision::_rectinfo_lut_16x16_block_header_t::height, firevision::_rectinfo_lut_16x16_block_header_t::width, firevision::_rectinfo_lut_16x16_entry_t::x, and firevision::_rectinfo_lut_16x16_entry_t::y.

Referenced by firevision::TriclopsStereoProcessor::generate_rectification_lut().


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