Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
camera_lens_detail::RayField Class Reference

Public Member Functions

 RayField (const Lens &lens, int width, int height, double scale, size_t budget=static_cast< size_t >(-1))
 Build and verify the ray field for one channel focal scale.
size_t bytes () const
 Resident bytes of the node grid and column lookup.
int node_columns () const
 Interpolate rays at horizontal grid nodes for one full-frame row.
void row_nodes_into (int full_row, float *rx, float *ry) const
void row_into (int full_row, cv::Vec2f *destination) const
 Interpolate rays for one full-frame row into a caller buffer.
cv::Mat strip (int first, int rows) const
 Interpolate rays for full-frame rows [first, first + rows).
cv::Vec2f at (float x, float y) const
 Interpolate one ray at a sub-pixel position.

Data Fields

int step = 1
double error_px = 0

Private Member Functions

cv::Vec2f blend (int cell_row, float weight_row, int cell_column, float weight_column) const

Static Private Member Functions

static std::vector< float > axis (int size, int step)
static void locate (const std::vector< float > &axis, float value, int &cell, float &weight)

Private Attributes

std::vector< float > node_x
std::vector< float > node_y
cv::Mat nodes
std::vector< int > cell_x
std::vector< float > weight_x
int columns

Detailed Description

Full-frame ray field: exact inverse distortion on a coarse node grid, bilinear interpolation between nodes.

Brown and fisheye inversion is iterative and dominated rendering time when evaluated per pixel and per colour. The distortion field is smooth, so the node step is halved until every interpolated cell-centre ray forward-projects within ray_interpolation_tolerance_px of its pixel. Step 1 is the exact per-pixel inverse.

Definition at line 949 of file camera_lens.cpp.

Constructor & Destructor Documentation

◆ RayField()

camera_lens_detail::RayField::RayField ( const Lens & lens,
int width,
int height,
double scale,
size_t budget = static_cast<size_t>(-1) )
inline

Build and verify the ray field for one channel focal scale.

Exceptions
std::runtime_errorIf exact inversion fails at any node/check.

Definition at line 988 of file camera_lens.cpp.

Member Function Documentation

◆ at()

cv::Vec2f camera_lens_detail::RayField::at ( float x,
float y ) const
inline

Interpolate one ray at a sub-pixel position.

Definition at line 1080 of file camera_lens.cpp.

◆ axis()

std::vector< float > camera_lens_detail::RayField::axis ( int size,
int step )
inlinestaticprivate

Definition at line 956 of file camera_lens.cpp.

◆ blend()

cv::Vec2f camera_lens_detail::RayField::blend ( int cell_row,
float weight_row,
int cell_column,
float weight_column ) const
inlineprivate

Definition at line 971 of file camera_lens.cpp.

◆ bytes()

size_t camera_lens_detail::RayField::bytes ( ) const
inline

Resident bytes of the node grid and column lookup.

Definition at line 1037 of file camera_lens.cpp.

◆ locate()

void camera_lens_detail::RayField::locate ( const std::vector< float > & axis,
float value,
int & cell,
float & weight )
inlinestaticprivate

Definition at line 962 of file camera_lens.cpp.

◆ node_columns()

int camera_lens_detail::RayField::node_columns ( ) const
inline

Interpolate rays at horizontal grid nodes for one full-frame row.

Along each cell [node_x[c], node_x[c + 1]], flat-ground projection is a fractional-linear function with positive denominator and therefore monotone, so row extrema occur at these node columns.

Definition at line 1046 of file camera_lens.cpp.

◆ row_into()

void camera_lens_detail::RayField::row_into ( int full_row,
cv::Vec2f * destination ) const
inline

Interpolate rays for one full-frame row into a caller buffer.

Definition at line 1062 of file camera_lens.cpp.

◆ row_nodes_into()

void camera_lens_detail::RayField::row_nodes_into ( int full_row,
float * rx,
float * ry ) const
inline

Definition at line 1047 of file camera_lens.cpp.

◆ strip()

cv::Mat camera_lens_detail::RayField::strip ( int first,
int rows ) const
inline

Interpolate rays for full-frame rows [first, first + rows).

Definition at line 1071 of file camera_lens.cpp.

Field Documentation

◆ cell_x

std::vector<int> camera_lens_detail::RayField::cell_x
private

Definition at line 952 of file camera_lens.cpp.

◆ columns

int camera_lens_detail::RayField::columns
private

Definition at line 954 of file camera_lens.cpp.

◆ error_px

double camera_lens_detail::RayField::error_px = 0

Definition at line 985 of file camera_lens.cpp.

◆ node_x

std::vector<float> camera_lens_detail::RayField::node_x
private

Definition at line 950 of file camera_lens.cpp.

◆ node_y

std::vector<float> camera_lens_detail::RayField::node_y
private

Definition at line 950 of file camera_lens.cpp.

◆ nodes

cv::Mat camera_lens_detail::RayField::nodes
private

Definition at line 951 of file camera_lens.cpp.

◆ step

int camera_lens_detail::RayField::step = 1

Definition at line 984 of file camera_lens.cpp.

◆ weight_x

std::vector<float> camera_lens_detail::RayField::weight_x
private

Definition at line 953 of file camera_lens.cpp.


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