![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Vision/ImageUndistortion.h>
This class enables the undistortion of images, i.e. More...
This class enables the undistortion of images, i.e.
it corrects the radial distortion caused by lenses. Pixel mapping and correction is done by the CPU by default, but there is also a GPU path for larger images with the default lens model. Unfortunately, benchmarks show that even with very large images, the GPU is slower than the CPU.
Public Types | |
| enum | InterpolationMode { Nearest , Linear } |
| enum | LensModel { Standard , Fisheye } |
Public Member Functions | |
| bool | setDistortionParameters (const mat3 &K, const Eigen::VectorXd &dist, int width, int height, InterpolationMode interpolationMode=InterpolationMode::Linear, LensModel=LensModel::Standard) |
| Set camera intrinsics and distortion parameters. | |
| bool | compute (SharedImage &imgIn, SharedImage &imgOut) |
| Undistort image. | |
| bool | compute (SharedImageSet &imgSetIn, SharedImageSet &imgSetOut) |
| Undistort all images in SharedImageSet. | |
| bool | computeInplace (SharedImageSet &imgSet) |
| Undistort images in-place Returns true on success. | |
| bool | computeInplace (MemImage &img) |
| Undistort image in-place Returns true on success. | |
| void | setUseGPU (bool useGPU) |
| const bool | useGPU () const |
| void | initGPU () |
| void | setProgess (Progress *prog) |
| bool | isPixelMappingInitialized () |
| void | clearPixelMapping () |
| bool compute | ( | SharedImage & | imgIn, |
| SharedImage & | imgOut ) |
Undistort image.
imgOut must be compatible with imgIn Returns true on success.
| bool compute | ( | SharedImageSet & | imgSetIn, |
| SharedImageSet & | imgSetOut ) |
Undistort all images in SharedImageSet.
Output images are created and added to imgSetOut by the method. Returns true on success.