24 #include <fvutils/rectification/rectinfo_lut_block.h> 26 #include <core/exceptions/software.h> 47 RectificationLutInfoBlock::RectificationLutInfoBlock(uint16_t width,
59 _lut_block_header->
width = width;
60 _lut_block_header->
height = height;
80 uint16_t *to_x, uint16_t *to_y)
82 if ( x > _lut_block_header->
width ) {
85 if ( y > _lut_block_header->
height ) {
89 *to_x = _lut_data[y * _lut_block_header->
width + x].
x;
90 *to_y = _lut_data[y * _lut_block_header->
width + x].
y;
102 uint16_t to_x, uint16_t to_y)
104 if ( x > _lut_block_header->
width ) {
107 if ( y > _lut_block_header->
height ) {
110 if ( to_x > _lut_block_header->
width ) {
113 if ( to_y > _lut_block_header->
height ) {
117 _lut_data[y * _lut_block_header->
width + x].
x = to_x;
118 _lut_data[y * _lut_block_header->
width + x].
y = to_y;
128 return _lut_block_header->
width;
138 return _lut_block_header->
height;
uint16_t pixel_width()
Get width of the LUT.
Fawkes library namespace.
void * _data
Pointer to the internal data segment.
FireVision File Format data block.
RectificationLutInfoBlock(uint16_t width, uint16_t height, uint8_t camera)
Constructor.
Data type used to build a rectification LUT.
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).
uint16_t pixel_height()
Get height the LUT.
Rectification info block.
void set_mapping(uint16_t x, uint16_t y, uint16_t to_x, uint16_t to_y)
Set mapping.
uint16_t y
map to y pixel coordinate
rectinfo_lut_16x16_entry_t * lut_data()
Get raw LUT data.
uint16_t x
map to x pixel coordinate