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::Lens Struct Reference
Collaboration diagram for camera_lens_detail::Lens:

Public Member Functions

 Lens (int width, int height, const Json &values)
 Build intrinsics for the selected distortion model.
cv::Matx33d intrinsic (int width, int height, double scale) const
 Camera matrix for one channel focal scale.
cv::Mat project (const cv::Mat &rays, int width, int height, double scale) const
cv::Mat undistort (const cv::Mat &pixels, int width, int height, double scale) const
cv::Mat rays (int width, int height, int first, int rows, double scale) const

Data Fields

Json profile
double focal_x
double focal_y
cv::Mat distortion
bool fisheye

Detailed Description

Camera intrinsics and Brown/fisheye distortion coefficients for ray generation.

Definition at line 803 of file camera_lens.cpp.

Constructor & Destructor Documentation

◆ Lens()

camera_lens_detail::Lens::Lens ( int width,
int height,
const Json & values )
inline

Build intrinsics for the selected distortion model.

Parameters
widthOutput columns in pixels.
heightOutput rows in pixels.
valuesValidated model, field of view, and distortion coefficients.

Brown intrinsics use the two rectilinear fields of view. Fisheye intrinsics derive a shared focal length from the distorted diagonal ray.

Definition at line 814 of file camera_lens.cpp.

Member Function Documentation

◆ intrinsic()

cv::Matx33d camera_lens_detail::Lens::intrinsic ( int width,
int height,
double scale ) const
inline

Camera matrix for one channel focal scale.

Definition at line 838 of file camera_lens.cpp.

◆ project()

cv::Mat camera_lens_detail::Lens::project ( const cv::Mat & rays,
int width,
int height,
double scale ) const
inline

Forward lens model: normalized rays to distorted pixel coordinates.

Parameters
raysN x 1 CV_32FC2 normalized camera rays.
widthFull image width.
heightFull image height.
scalePer-channel focal scaling.
Returns
N x 1 CV_32FC2 pixel coordinates.

Definition at line 848 of file camera_lens.cpp.

◆ rays()

cv::Mat camera_lens_detail::Lens::rays ( int width,
int height,
int first,
int rows,
double scale ) const

Normalized rays for one strip; see RayField for the accuracy contract.

Parameters
widthFull image width.
heightFull image height.
firstFirst row represented by this strip.
rowsStrip row count.
scalePer-channel focal scaling.
Returns
rows x width CV_32FC2 normalized rays.

Definition at line 1089 of file camera_lens.cpp.

◆ undistort()

cv::Mat camera_lens_detail::Lens::undistort ( const cv::Mat & pixels,
int width,
int height,
double scale ) const
inline

Exactly invert distortion for arbitrary pixels, then forward-project to reject non-convergent rays.

Parameters
pixelsN x 1 CV_32FC2 pixel coordinates.
widthFull image width.
heightFull image height.
scalePer-channel focal scaling for chromatic-aberration simulation.
Returns
N x 1 normalized camera rays.

Definition at line 872 of file camera_lens.cpp.

Field Documentation

◆ distortion

cv::Mat camera_lens_detail::Lens::distortion

Definition at line 806 of file camera_lens.cpp.

◆ fisheye

bool camera_lens_detail::Lens::fisheye

Definition at line 807 of file camera_lens.cpp.

◆ focal_x

double camera_lens_detail::Lens::focal_x

Definition at line 805 of file camera_lens.cpp.

◆ focal_y

double camera_lens_detail::Lens::focal_y

Definition at line 805 of file camera_lens.cpp.

◆ profile

Json camera_lens_detail::Lens::profile

Definition at line 804 of file camera_lens.cpp.


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