CameraCalibrationStereoCalibrate Method |
http://www.emgu.com
Estimates transformation between the 2 cameras making a stereo pair. If we have a stereo camera, where the relative position and orientatation of the 2 cameras is fixed, and if we computed poses of an object relative to the fist camera and to the second camera, (R1, T1) and (R2, T2), respectively (that can be done with cvFindExtrinsicCameraParams2), obviously, those poses will relate to each other, i.e. given (R1, T1) it should be possible to compute (R2, T2) - we only need to know the position and orientation of the 2nd camera relative to the 1st camera. That's what the described function does. It computes (R, T) such that:
R2=R*R1,
T2=R*T1 + T
Namespace:
Emgu.CV
Assembly:
Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.3.0.2824 (3.3.0.2824)
Syntaxpublic static void StereoCalibrate(
MCvPoint3D32f[][] objectPoints,
PointF[][] imagePoints1,
PointF[][] imagePoints2,
IntrinsicCameraParameters intrinsicParam1,
IntrinsicCameraParameters intrinsicParam2,
Size imageSize,
CalibType flags,
MCvTermCriteria termCrit,
out ExtrinsicCameraParameters extrinsicParams,
out Matrix<double> foundamentalMatrix,
out Matrix<double> essentialMatrix
)
Public Shared Sub StereoCalibrate (
objectPoints As MCvPoint3D32f()(),
imagePoints1 As PointF()(),
imagePoints2 As PointF()(),
intrinsicParam1 As IntrinsicCameraParameters,
intrinsicParam2 As IntrinsicCameraParameters,
imageSize As Size,
flags As CalibType,
termCrit As MCvTermCriteria,
<OutAttribute> ByRef extrinsicParams As ExtrinsicCameraParameters,
<OutAttribute> ByRef foundamentalMatrix As Matrix(Of Double),
<OutAttribute> ByRef essentialMatrix As Matrix(Of Double)
)
public:
static void StereoCalibrate(
array<array<MCvPoint3D32f>^>^ objectPoints,
array<array<PointF>^>^ imagePoints1,
array<array<PointF>^>^ imagePoints2,
IntrinsicCameraParameters^ intrinsicParam1,
IntrinsicCameraParameters^ intrinsicParam2,
Size imageSize,
CalibType flags,
MCvTermCriteria termCrit,
[OutAttribute] ExtrinsicCameraParameters^% extrinsicParams,
[OutAttribute] Matrix<double>^% foundamentalMatrix,
[OutAttribute] Matrix<double>^% essentialMatrix
)
static member StereoCalibrate :
objectPoints : MCvPoint3D32f[][] *
imagePoints1 : PointF[][] *
imagePoints2 : PointF[][] *
intrinsicParam1 : IntrinsicCameraParameters *
intrinsicParam2 : IntrinsicCameraParameters *
imageSize : Size *
flags : CalibType *
termCrit : MCvTermCriteria *
extrinsicParams : ExtrinsicCameraParameters byref *
foundamentalMatrix : Matrix<float> byref *
essentialMatrix : Matrix<float> byref -> unit
Parameters
- objectPoints
- Type: Emgu.CV.StructureMCvPoint3D32f
The 3D location of the object points. The first index is the index of image, second index is the index of the point - imagePoints1
- Type: System.DrawingPointF
The 2D image location of the points for camera 1. The first index is the index of the image, second index is the index of the point - imagePoints2
- Type: System.DrawingPointF
The 2D image location of the points for camera 2. The first index is the index of the image, second index is the index of the point - intrinsicParam1
- Type: Emgu.CVIntrinsicCameraParameters
The intrisinc parameters for camera 1, might contains some initial values. The values will be modified by this function. - intrinsicParam2
- Type: Emgu.CVIntrinsicCameraParameters
The intrisinc parameters for camera 2, might contains some initial values. The values will be modified by this function. - imageSize
- Type: System.DrawingSize
Size of the image, used only to initialize intrinsic camera matrix - flags
- Type: Emgu.CV.CvEnumCalibType
Different flags - termCrit
- Type: Emgu.CV.StructureMCvTermCriteria
Termination criteria for the iterative optimiziation algorithm - extrinsicParams
- Type: Emgu.CVExtrinsicCameraParameters
The extrinsic parameters which contains:
R - The rotation matrix between the 1st and the 2nd cameras' coordinate systems;
T - The translation vector between the cameras' coordinate systems. - foundamentalMatrix
- Type: Emgu.CVMatrixDouble
The fundamental matrix - essentialMatrix
- Type: Emgu.CVMatrixDouble
The essential matrix
See Also