OpenCV: Difference between revisions

 
(4 intermediate revisions by the same user not shown)
Line 18: Line 18:


You need to compile [https://github.com/opencv/opencv OpenCV] from source alongside [https://github.com/opencv/opencv_contrib OpenCV-contrib].<br>
You need to compile [https://github.com/opencv/opencv OpenCV] from source alongside [https://github.com/opencv/opencv_contrib OpenCV-contrib].<br>
The easiest way is to use the automated script to compile opencv-contrib-python.<br>
The easiest way is to use [https://github.com/opencv/opencv-python#manual-builds the automated script] to compile opencv-contrib-python.<br>
Email me if you want a prebuilt wheel for Python 3.6 or 3.7.
{{hidden | Compile opencv-contrib-python |
{{hidden | Compile opencv-contrib-python |
You can build a wheel to install which includes NONFREE modules as follows:
You can build a wheel to install which includes NONFREE modules as follows:
Line 182: Line 181:
===Stereo Rectify===
===Stereo Rectify===


This is a summary of the <code>cv2.stereoRectify</code> function which produces a rectification rotation and projection matrix for calibrated cameras (i.e. cameras with known intrinsics and extrinsics).
This is a summary of the [https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga617b1685d4059c6040827800e72ad2b6 <code>cv2.stereoRectify</code>] function which produces a rectification rotation and projection matrix for calibrated cameras (i.e. cameras with known intrinsics and extrinsics).
 
[https://github.com/opencv/opencv/blob/4.x/modules/calib3d/src/calibration.cpp#LL2561C6-L2561C21 source code]


;Algorithm
;Algorithm
Line 188: Line 189:
# Projection calculation
# Projection calculation
# Bounding box calculation
# Bounding box calculation
# Disparity-to-depth matrix calculation


==Resources==
==Resources==


*[https://docs.opencv.org/master/d6/d00/tutorial_py_root.html OpenCV Python Tutorial]
*[https://docs.opencv.org/master/d6/d00/tutorial_py_root.html OpenCV Python Tutorial]