[This is preliminary documentation and is subject to change.]
Transforms the image to compensate radial and tangential lens distortion.
The camera matrix and distortion parameters can be determined using cvCalibrateCamera2. For every pixel in the output image the function computes coordinates of the corresponding location in the input image using the formulae in the section beginning. Then, the pixel value is computed using bilinear interpolation. If the resolution of images is different from what was used at the calibration stage, fx, fy, cx and cy need to be adjusted appropriately, while the distortion coefficients remain the same
Namespace:
Emgu.CVAssembly: Emgu.CV (in Emgu.CV.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
C# | Visual Basic | Visual C++ |
[ObsoleteAttribute("Will be removed in the next version, use IntrinsicCameraParameters.Undistor function instead")] public static Image<TColor, TDepth> Undistort2<TColor, TDepth>( Image<TColor, TDepth> src, IntrinsicCameraParameters intrin ) where TColor : struct, new(), IColor where TDepth : new()
<ObsoleteAttribute("Will be removed in the next version, use IntrinsicCameraParameters.Undistor function instead")> _ Public Shared Function Undistort2(Of TColor As {Structure, New, IColor}, TDepth As New) ( _ src As Image(Of TColor, TDepth), _ intrin As IntrinsicCameraParameters _ ) As Image(Of TColor, TDepth)
[ObsoleteAttribute(L"Will be removed in the next version, use IntrinsicCameraParameters.Undistor function instead")] public: generic<typename TColor, typename TDepth> where TColor : value class, gcnew(), IColor where TDepth : gcnew() static Image<TColor, TDepth>^ Undistort2( Image<TColor, TDepth>^ src, IntrinsicCameraParameters^ intrin )
Parameters
- src
- Image<(Of <(TColor, TDepth>)>)
The distorted image
- intrin
- IntrinsicCameraParameters
The intrinsic camera parameters
Type Parameters
- TColor
- The color type of the image
- TDepth
- The depth of the image