Simple demonstrations of basic use of OpenCV
Structures
- Image Processing
- Calib3d
Many of the functions of the calib3d module relate to the pinhole camera model found in the Detailed Description on the Camera Calibration page and below. Often, you'll have some of the values and want to know which function to use to solve for the unknown. The table below shows inputs in italic and outputs in bold.
| u | | fx 0 cx || R R R Tx|| X |
s | v | = | 0 fy cy || R R R Ty|| Y |
| 1 | | 0 0 1 || R R R Tz|| Z |
| 1 |
Function | objPts | pts1/2 | M | distort | R | T | E | F | H | R1/R2 | P1/P2 | Q | misc |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
calib3d | |||||||||||||
calibrateCamera | X | 1 | X | X | X | X | |||||||
projectPoints | X | 1 | X | X | X | X | |||||||
stereoCalibrate | X | 1&2 | 1&2 | 1&2 | X | X | X | X | |||||
findEssentialMat | 1&2 | foc/pp | X | ||||||||||
findFundamentalMat | 1&2 | X | |||||||||||
findHomography | 1&2 | X | |||||||||||
stereoRectify | 1&2 | 1&2 | X | X | 1&2 | 1&2 | X | ||||||
stereoRectifyUncalibrated | 1&2 | X | 1&2 | ||||||||||
computeCorrespondEpilines | 1 | X | |||||||||||
reprojectImageTo3D | disparity | X | image3d | ||||||||||
decomposeEssentialMat | 1&2 | X | X | ||||||||||
decomposeHomographyMat | X(K) | multiple | multiple | X | |||||||||
decomposeProjectionMatrix | X | X | X | P | |||||||||
recoverPose | 1&2 | foc/pp | X | X | X | ||||||||
triangulatePoints | 1&2 | P1&P2 | points4D | ||||||||||
solvePnP | X | 1 | X | X | X | X | |||||||
solvePnPRansac | X | 1 | X | X | X | X | |||||||
core Operations on Arrays | |||||||||||||
perspectiveTransform | X | X | points | ||||||||||
Function | objPts | pts1/2 | M | distort | R | T | E | F | H | R1/R2 | P1/P2 | Q | misc |
imgproc Geometric Image Transformations | |||||||||||||
initUndistortRectifyMap | X | X | X | X | mapx/y | ||||||||
remap | srcImg | mapx/ydstImg | |||||||||||
undistort | srcImg | X | X | dstImg | |||||||||
undistortPoints | X | X | X | X | X | points | |||||||
warpPerspective | srcImg | X | dstImg |
Type | C1 | C2 | C3 | C4 |
---|---|---|---|---|
CV_8U | 0 | 8 | 16 | 24 |
CV_8S | 1 | 9 | 17 | 25 |
CV_16U | 2 | 10 | 18 | 26 |
CV_16S | 3 | 11 | 19 | 27 |
CV_32S | 4 | 12 | 20 | 28 |
CV_32F | 5 | 13 | 21 | 29 |
CV_64F | 6 | 14 | 22 | 30 |