
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()
|
inline |
Build intrinsics for the selected distortion model.
- Parameters
-
width Output columns in pixels. height Output rows in pixels. values Validated 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()
|
inline |
Camera matrix for one channel focal scale.
Definition at line 838 of file camera_lens.cpp.
◆ project()
|
inline |
Forward lens model: normalized rays to distorted pixel coordinates.
- Parameters
-
rays N x 1 CV_32FC2 normalized camera rays. width Full image width. height Full image height. scale Per-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
-
width Full image width. height Full image height. first First row represented by this strip. rows Strip row count. scale Per-channel focal scaling.
- Returns
- rows x width CV_32FC2 normalized rays.
Definition at line 1089 of file camera_lens.cpp.
◆ undistort()
|
inline |
Exactly invert distortion for arbitrary pixels, then forward-project to reject non-convergent rays.
- Parameters
-
pixels N x 1 CV_32FC2 pixel coordinates. width Full image width. height Full image height. scale Per-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:
- src/camera_lens.cpp