type
status
date
slug
summary
tags
category
icon
References
Theory Introduction
Pinhole camera model, optical center (o)
Coordinate
It seems that there are errors inside.
Parameters calculated by the least-square method
For example
demosaic
deYUV
彩色电视为了与黑白电视兼容,必须传送一个亮度信号,以便黑白电视机接收。在彩色电视中,常用两个色差信号(B-Y)和(R-Y)来代表色度信息,它们与彩色摄像机输出的R、G、B三基色信号存在下列关系:
read_yuv422_mode1_by_numpy
demosaicRaw
Demosaic the 16bit and 8bit raw to RGB color, take RCCB as RGGB
matrix2uint8
Limit the image raw8 which is to be returned in [0, 255]
WhiteBalance
The old code uses OpenCV 3.1.0
calib1cam
calib1cam_chessboard
calib1cam_dots
blobdetc
picklekp
pickle.dump
kpsort1
Sort the keypoints from left to right, from top to bottom!
- d1_sq: The point that has the farthest distance from the end of the image. That is to say, the one that is closest to the origin point.
- d2_sq: The second
- d1_sq > d2_sq
- Purpose: Find the beginning of the dots.
Different cases of I & j:
i=0, j=0
i>0, j=0
i>0, j>0
fitpinhole
- ret = retval: the overall RMS re-projection error.
- mtx = cameraMatrix: Input/output 3x3 floating-point camera intrinsic matrix A.
- If CALIB_USE_INTRINSIC_GUESS and/or CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
- dist = distCoeffs: Input/output vector of distortion coefficients "A vector"of 4, 5, 8, 12 or 14 elements.
- rvecs: Output vector of rotation vectors (Rodrigues ) estimated for each pattern view (e.g. std::vectorcv::Mat>). That is, each i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter description) brings the calibration pattern from the object coordinate space (in which object points are specified) to the camera coordinate space. In more technical terms, the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space to camera coordinate space. Due to its duality, this tuple is equivalent to the position of the calibration pattern with respect to the camera coordinate space.
- tvecs: Output vector of translation vectors estimated for each pattern view, see parameter describtion above.
fitfisheye
links about the "criteria"
OpenCV函数的 [ ] 表示可选参数
- ret = retval: the overall RMS re-projection error 均方根(RMS)重投影误差
- cam_mtx = K: Output 3x3 floating-point camera intrinsic matrix A.
- If fisheye::CALIB_USE_INTRINSIC_GUESS is specified, some or all of fx, fy, cx, cy must be initialized before calling the function.
- cam_dist = D: Output vector of distortion coefficients.
- rvecsf = rvecs: Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. M -1).
- tvecsf = tvecs: Output vector of translation vectors estimated for each pattern view.
fitpinhole & fitfisheye (All images)
Links related to my attempt to accelerate or simplify the calculation.
My failed attempt to calculate the "retval"
fitpinhole
fitfisheye
pinholeFOV
- CalcFOV
Schematic Diagram
FisheyeFOV
- FCalcFOV
The distorted point coordinates are [x'; y']
New code learned:
Schematic Diagram
Process & Write & Print data
External Reference
Internal Reference
Not shown in data. Just for intuitive illustration.
- 表示单一像素在x轴和y轴方向上的物理长度(其单位可理解为 mm/像素)。表示u轴和v轴之间的夹角,理想情况下。
- 图像像素坐标系(pixel coordinate system)
- 图像物理坐标系(retinal coordinate system,or像平面坐标系,单位常用mm)
- 相机坐标系(camera coordinate system)
- Equivalent to pinhole camera model
Images that demonstrate the camera coordinate system
- 世界坐标系
张正友标定法仅仅考虑了畸变模型中影响较大的径向畸变。
Said by a Postgraduate from SJTU.
Really? Maybe this conclusion deserves more consideration.
Input/output 3x3 floating-point camera intrinsic matrix.
Input/output vector of distortion coefficients.
Number of pictures whose
retP
is less than 2.the overall RMS re-projection error from
fitpinhole
in camera intrinsic matrix from
fitpinhole
in camera intrinsic matrix from
fitpinhole
in camera intrinsic matrix from
fitpinhole
in camera intrinsic matrix from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
in distortion coefficients from
fitpinhole
from
pinholeFOV
from
pinholeFOV
Input/output 3x3 floating-point camera intrinsic matrix.
Output vector of distortion coefficients.
Number of pictures whose
retF
is less than 2.the overall RMS re-projection error from
fitfisheye
in camera intrinsic matrix from
fitfisheye
in camera intrinsic matrix from
fitfisheye
in camera intrinsic matrix from
fitfisheye
in camera intrinsic matrix from
fitfisheye
in distortion coefficients from
fitfisheye
in distortion coefficients from
fitfisheye
in distortion coefficients from
fitfisheye
in distortion coefficients from
fitfisheye
from
FisheyeFOV
from
FisheyeFOV
The mtx is from
fitpinhole
.The mtx is from
fitpinhole
.The cam_mtx is from
fitfisheye
.