24 #include <core/exceptions/software.h> 25 #include <fvutils/rectification/rectinfo_lut_block.h> 29 namespace firevision {
43 RectificationLutInfoBlock::RectificationLutInfoBlock(uint16_t width,
55 _lut_block_header->
width = width;
56 _lut_block_header->
height = height;
75 if (x > _lut_block_header->
width) {
78 if (y > _lut_block_header->
height) {
82 *to_x = _lut_data[y * _lut_block_header->
width + x].
x;
83 *to_y = _lut_data[y * _lut_block_header->
width + x].
y;
95 if (x > _lut_block_header->
width) {
98 if (y > _lut_block_header->
height) {
101 if (to_x > _lut_block_header->
width) {
104 if (to_y > _lut_block_header->
height) {
108 _lut_data[y * _lut_block_header->
width + x].
x = to_x;
109 _lut_data[y * _lut_block_header->
width + x].
y = to_y;
118 return _lut_block_header->
width;
127 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