【Camera】Monocular vs Stereo Calibration


文章目录


不完全一样,但双目标定包含单目标定。可以这样理解:

单目标定解决的是"每个相机自己长什么样";双目标定解决的是"两个相机之间是什么关系"。


一、单目标定得到什么?

对于一个相机,标定得到:

① 内参(Intrinsic)

描述相机自身成像特性:

K = f x 0 c x 0 f y c y 0 0 1 K= \begin{bmatrix} f_x&0&c_x\\ 0&f_y&c_y\\ 0&0&1 \end{bmatrix} K= fx000fy0cxcy1

包括:

  • 焦距 (f_x,f_y)
  • 主点 (c_x,c_y)

以及

② 畸变参数(Distortion)

例如:

  • k1、k2、k3(径向畸变)
  • p1、p2(切向畸变)

注:OpenCV 实际返回顺序是 (k1, k2, p1, p2, k3),径向与切向是交错排列的,不是"先全部径向、再全部切向"。


③ 每张图片的外参(Pose)

这里很多人容易误解。

单目标定也有外参,但它表示的是:

标定板相对于相机的位置和姿态。

对于每张图片都会得到:

  • R
  • t

例如:
#mermaid-svg-cuqSnDlWyygy0hwa{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-cuqSnDlWyygy0hwa .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-cuqSnDlWyygy0hwa .error-icon{fill:#552222;}#mermaid-svg-cuqSnDlWyygy0hwa .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-cuqSnDlWyygy0hwa .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-cuqSnDlWyygy0hwa .marker{fill:#333333;stroke:#333333;}#mermaid-svg-cuqSnDlWyygy0hwa .marker.cross{stroke:#333333;}#mermaid-svg-cuqSnDlWyygy0hwa svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-cuqSnDlWyygy0hwa p{margin:0;}#mermaid-svg-cuqSnDlWyygy0hwa .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-cuqSnDlWyygy0hwa .cluster-label text{fill:#333;}#mermaid-svg-cuqSnDlWyygy0hwa .cluster-label span{color:#333;}#mermaid-svg-cuqSnDlWyygy0hwa .cluster-label span p{background-color:transparent;}#mermaid-svg-cuqSnDlWyygy0hwa .label text,#mermaid-svg-cuqSnDlWyygy0hwa span{fill:#333;color:#333;}#mermaid-svg-cuqSnDlWyygy0hwa .node rect,#mermaid-svg-cuqSnDlWyygy0hwa .node circle,#mermaid-svg-cuqSnDlWyygy0hwa .node ellipse,#mermaid-svg-cuqSnDlWyygy0hwa .node polygon,#mermaid-svg-cuqSnDlWyygy0hwa .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-cuqSnDlWyygy0hwa .rough-node .label text,#mermaid-svg-cuqSnDlWyygy0hwa .node .label text,#mermaid-svg-cuqSnDlWyygy0hwa .image-shape .label,#mermaid-svg-cuqSnDlWyygy0hwa .icon-shape .label{text-anchor:middle;}#mermaid-svg-cuqSnDlWyygy0hwa .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-cuqSnDlWyygy0hwa .rough-node .label,#mermaid-svg-cuqSnDlWyygy0hwa .node .label,#mermaid-svg-cuqSnDlWyygy0hwa .image-shape .label,#mermaid-svg-cuqSnDlWyygy0hwa .icon-shape .label{text-align:center;}#mermaid-svg-cuqSnDlWyygy0hwa .node.clickable{cursor:pointer;}#mermaid-svg-cuqSnDlWyygy0hwa .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-cuqSnDlWyygy0hwa .arrowheadPath{fill:#333333;}#mermaid-svg-cuqSnDlWyygy0hwa .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-cuqSnDlWyygy0hwa .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-cuqSnDlWyygy0hwa .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cuqSnDlWyygy0hwa .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-cuqSnDlWyygy0hwa .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cuqSnDlWyygy0hwa .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-cuqSnDlWyygy0hwa .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-cuqSnDlWyygy0hwa .cluster text{fill:#333;}#mermaid-svg-cuqSnDlWyygy0hwa .cluster span{color:#333;}#mermaid-svg-cuqSnDlWyygy0hwa div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-cuqSnDlWyygy0hwa .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-cuqSnDlWyygy0hwa rect.text{fill:none;stroke-width:0;}#mermaid-svg-cuqSnDlWyygy0hwa .icon-shape,#mermaid-svg-cuqSnDlWyygy0hwa .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cuqSnDlWyygy0hwa .icon-shape p,#mermaid-svg-cuqSnDlWyygy0hwa .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-cuqSnDlWyygy0hwa .icon-shape .label rect,#mermaid-svg-cuqSnDlWyygy0hwa .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cuqSnDlWyygy0hwa .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-cuqSnDlWyygy0hwa .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-cuqSnDlWyygy0hwa :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-cuqSnDlWyygy0hwa .pain>*{fill:#fee2e2!important;stroke:#dc2626!important;stroke-width:1px!important;color:#7f1d1d!important;}#mermaid-svg-cuqSnDlWyygy0hwa .pain span{fill:#fee2e2!important;stroke:#dc2626!important;stroke-width:1px!important;color:#7f1d1d!important;}#mermaid-svg-cuqSnDlWyygy0hwa .pain tspan{fill:#7f1d1d!important;}#mermaid-svg-cuqSnDlWyygy0hwa .art>*{fill:#f1f5f9!important;stroke:#64748b!important;stroke-width:1px!important;color:#0f172a!important;}#mermaid-svg-cuqSnDlWyygy0hwa .art span{fill:#f1f5f9!important;stroke:#64748b!important;stroke-width:1px!important;color:#0f172a!important;}#mermaid-svg-cuqSnDlWyygy0hwa .art tspan{fill:#0f172a!important;} R,t(第1组)
R,t(第2组)
R,t(第3组)
标定板 第1张
相机
标定板 第2张
标定板 第3张

所以:

单目标定没有一个固定外参。

每拍一张图都会重新算一组。


二、双目标定得到什么?

双目标定首先会分别做:
#mermaid-svg-vZXzHvx1YSazKsQV{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-vZXzHvx1YSazKsQV .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-vZXzHvx1YSazKsQV .error-icon{fill:#552222;}#mermaid-svg-vZXzHvx1YSazKsQV .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-vZXzHvx1YSazKsQV .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-vZXzHvx1YSazKsQV .marker{fill:#333333;stroke:#333333;}#mermaid-svg-vZXzHvx1YSazKsQV .marker.cross{stroke:#333333;}#mermaid-svg-vZXzHvx1YSazKsQV svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-vZXzHvx1YSazKsQV p{margin:0;}#mermaid-svg-vZXzHvx1YSazKsQV .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-vZXzHvx1YSazKsQV .cluster-label text{fill:#333;}#mermaid-svg-vZXzHvx1YSazKsQV .cluster-label span{color:#333;}#mermaid-svg-vZXzHvx1YSazKsQV .cluster-label span p{background-color:transparent;}#mermaid-svg-vZXzHvx1YSazKsQV .label text,#mermaid-svg-vZXzHvx1YSazKsQV span{fill:#333;color:#333;}#mermaid-svg-vZXzHvx1YSazKsQV .node rect,#mermaid-svg-vZXzHvx1YSazKsQV .node circle,#mermaid-svg-vZXzHvx1YSazKsQV .node ellipse,#mermaid-svg-vZXzHvx1YSazKsQV .node polygon,#mermaid-svg-vZXzHvx1YSazKsQV .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-vZXzHvx1YSazKsQV .rough-node .label text,#mermaid-svg-vZXzHvx1YSazKsQV .node .label text,#mermaid-svg-vZXzHvx1YSazKsQV .image-shape .label,#mermaid-svg-vZXzHvx1YSazKsQV .icon-shape .label{text-anchor:middle;}#mermaid-svg-vZXzHvx1YSazKsQV .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-vZXzHvx1YSazKsQV .rough-node .label,#mermaid-svg-vZXzHvx1YSazKsQV .node .label,#mermaid-svg-vZXzHvx1YSazKsQV .image-shape .label,#mermaid-svg-vZXzHvx1YSazKsQV .icon-shape .label{text-align:center;}#mermaid-svg-vZXzHvx1YSazKsQV .node.clickable{cursor:pointer;}#mermaid-svg-vZXzHvx1YSazKsQV .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-vZXzHvx1YSazKsQV .arrowheadPath{fill:#333333;}#mermaid-svg-vZXzHvx1YSazKsQV .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-vZXzHvx1YSazKsQV .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-vZXzHvx1YSazKsQV .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-vZXzHvx1YSazKsQV .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-vZXzHvx1YSazKsQV .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-vZXzHvx1YSazKsQV .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-vZXzHvx1YSazKsQV .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-vZXzHvx1YSazKsQV .cluster text{fill:#333;}#mermaid-svg-vZXzHvx1YSazKsQV .cluster span{color:#333;}#mermaid-svg-vZXzHvx1YSazKsQV div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-vZXzHvx1YSazKsQV .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-vZXzHvx1YSazKsQV rect.text{fill:none;stroke-width:0;}#mermaid-svg-vZXzHvx1YSazKsQV .icon-shape,#mermaid-svg-vZXzHvx1YSazKsQV .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-vZXzHvx1YSazKsQV .icon-shape p,#mermaid-svg-vZXzHvx1YSazKsQV .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-vZXzHvx1YSazKsQV .icon-shape .label rect,#mermaid-svg-vZXzHvx1YSazKsQV .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-vZXzHvx1YSazKsQV .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-vZXzHvx1YSazKsQV .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-vZXzHvx1YSazKsQV :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-vZXzHvx1YSazKsQV .role>*{fill:#e0e7ff!important;stroke:#4f46e5!important;stroke-width:1px!important;color:#312e81!important;}#mermaid-svg-vZXzHvx1YSazKsQV .role span{fill:#e0e7ff!important;stroke:#4f46e5!important;stroke-width:1px!important;color:#312e81!important;}#mermaid-svg-vZXzHvx1YSazKsQV .role tspan{fill:#312e81!important;}#mermaid-svg-vZXzHvx1YSazKsQV .art>*{fill:#f1f5f9!important;stroke:#64748b!important;stroke-width:1px!important;color:#0f172a!important;}#mermaid-svg-vZXzHvx1YSazKsQV .art span{fill:#f1f5f9!important;stroke:#64748b!important;stroke-width:1px!important;color:#0f172a!important;}#mermaid-svg-vZXzHvx1YSazKsQV .art tspan{fill:#0f172a!important;} 左相机
K_left / Dist_left
右相机
K_right / Dist_right

这和单目标定完全一样。

然后增加一步:

计算
#mermaid-svg-Swz7l8CWJF4kwb99{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Swz7l8CWJF4kwb99 .error-icon{fill:#552222;}#mermaid-svg-Swz7l8CWJF4kwb99 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Swz7l8CWJF4kwb99 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Swz7l8CWJF4kwb99 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Swz7l8CWJF4kwb99 .marker.cross{stroke:#333333;}#mermaid-svg-Swz7l8CWJF4kwb99 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Swz7l8CWJF4kwb99 p{margin:0;}#mermaid-svg-Swz7l8CWJF4kwb99 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 .cluster-label text{fill:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 .cluster-label span{color:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 .cluster-label span p{background-color:transparent;}#mermaid-svg-Swz7l8CWJF4kwb99 .label text,#mermaid-svg-Swz7l8CWJF4kwb99 span{fill:#333;color:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 .node rect,#mermaid-svg-Swz7l8CWJF4kwb99 .node circle,#mermaid-svg-Swz7l8CWJF4kwb99 .node ellipse,#mermaid-svg-Swz7l8CWJF4kwb99 .node polygon,#mermaid-svg-Swz7l8CWJF4kwb99 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Swz7l8CWJF4kwb99 .rough-node .label text,#mermaid-svg-Swz7l8CWJF4kwb99 .node .label text,#mermaid-svg-Swz7l8CWJF4kwb99 .image-shape .label,#mermaid-svg-Swz7l8CWJF4kwb99 .icon-shape .label{text-anchor:middle;}#mermaid-svg-Swz7l8CWJF4kwb99 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Swz7l8CWJF4kwb99 .rough-node .label,#mermaid-svg-Swz7l8CWJF4kwb99 .node .label,#mermaid-svg-Swz7l8CWJF4kwb99 .image-shape .label,#mermaid-svg-Swz7l8CWJF4kwb99 .icon-shape .label{text-align:center;}#mermaid-svg-Swz7l8CWJF4kwb99 .node.clickable{cursor:pointer;}#mermaid-svg-Swz7l8CWJF4kwb99 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Swz7l8CWJF4kwb99 .arrowheadPath{fill:#333333;}#mermaid-svg-Swz7l8CWJF4kwb99 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Swz7l8CWJF4kwb99 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Swz7l8CWJF4kwb99 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Swz7l8CWJF4kwb99 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Swz7l8CWJF4kwb99 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Swz7l8CWJF4kwb99 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Swz7l8CWJF4kwb99 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Swz7l8CWJF4kwb99 .cluster text{fill:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 .cluster span{color:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-Swz7l8CWJF4kwb99 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Swz7l8CWJF4kwb99 rect.text{fill:none;stroke-width:0;}#mermaid-svg-Swz7l8CWJF4kwb99 .icon-shape,#mermaid-svg-Swz7l8CWJF4kwb99 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Swz7l8CWJF4kwb99 .icon-shape p,#mermaid-svg-Swz7l8CWJF4kwb99 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Swz7l8CWJF4kwb99 .icon-shape .label rect,#mermaid-svg-Swz7l8CWJF4kwb99 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Swz7l8CWJF4kwb99 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Swz7l8CWJF4kwb99 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Swz7l8CWJF4kwb99 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-Swz7l8CWJF4kwb99 .role>*{fill:#e0e7ff!important;stroke:#4f46e5!important;stroke-width:1px!important;color:#312e81!important;}#mermaid-svg-Swz7l8CWJF4kwb99 .role span{fill:#e0e7ff!important;stroke:#4f46e5!important;stroke-width:1px!important;color:#312e81!important;}#mermaid-svg-Swz7l8CWJF4kwb99 .role tspan{fill:#312e81!important;} R, T(固定外参)
左相机 Left
右相机 Right

也就是:

左相机到右相机的固定变换。

OpenCV 的方向约定是:把点从左相机坐标系变换到右相机坐标系,即

X r i g h t = R ⋅ X l e f t + T X_{right}=R\cdot X_{left}+T Xright=R⋅Xleft+T

例如:

text 复制代码
R =
两个相机坐标系之间旋转

T =
两个相机中心之间平移

这就是大家常说的

Stereo Extrinsic


三、最大的区别

单目标定的外参:
#mermaid-svg-uatslgpRMIwSdYtE{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-uatslgpRMIwSdYtE .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-uatslgpRMIwSdYtE .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-uatslgpRMIwSdYtE .error-icon{fill:#552222;}#mermaid-svg-uatslgpRMIwSdYtE .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-uatslgpRMIwSdYtE .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-uatslgpRMIwSdYtE .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-uatslgpRMIwSdYtE .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-uatslgpRMIwSdYtE .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-uatslgpRMIwSdYtE .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-uatslgpRMIwSdYtE .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-uatslgpRMIwSdYtE .marker{fill:#333333;stroke:#333333;}#mermaid-svg-uatslgpRMIwSdYtE .marker.cross{stroke:#333333;}#mermaid-svg-uatslgpRMIwSdYtE svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-uatslgpRMIwSdYtE p{margin:0;}#mermaid-svg-uatslgpRMIwSdYtE .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-uatslgpRMIwSdYtE .cluster-label text{fill:#333;}#mermaid-svg-uatslgpRMIwSdYtE .cluster-label span{color:#333;}#mermaid-svg-uatslgpRMIwSdYtE .cluster-label span p{background-color:transparent;}#mermaid-svg-uatslgpRMIwSdYtE .label text,#mermaid-svg-uatslgpRMIwSdYtE span{fill:#333;color:#333;}#mermaid-svg-uatslgpRMIwSdYtE .node rect,#mermaid-svg-uatslgpRMIwSdYtE .node circle,#mermaid-svg-uatslgpRMIwSdYtE .node ellipse,#mermaid-svg-uatslgpRMIwSdYtE .node polygon,#mermaid-svg-uatslgpRMIwSdYtE .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-uatslgpRMIwSdYtE .rough-node .label text,#mermaid-svg-uatslgpRMIwSdYtE .node .label text,#mermaid-svg-uatslgpRMIwSdYtE .image-shape .label,#mermaid-svg-uatslgpRMIwSdYtE .icon-shape .label{text-anchor:middle;}#mermaid-svg-uatslgpRMIwSdYtE .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-uatslgpRMIwSdYtE .rough-node .label,#mermaid-svg-uatslgpRMIwSdYtE .node .label,#mermaid-svg-uatslgpRMIwSdYtE .image-shape .label,#mermaid-svg-uatslgpRMIwSdYtE .icon-shape .label{text-align:center;}#mermaid-svg-uatslgpRMIwSdYtE .node.clickable{cursor:pointer;}#mermaid-svg-uatslgpRMIwSdYtE .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-uatslgpRMIwSdYtE .arrowheadPath{fill:#333333;}#mermaid-svg-uatslgpRMIwSdYtE .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-uatslgpRMIwSdYtE .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-uatslgpRMIwSdYtE .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-uatslgpRMIwSdYtE .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-uatslgpRMIwSdYtE .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-uatslgpRMIwSdYtE .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-uatslgpRMIwSdYtE .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-uatslgpRMIwSdYtE .cluster text{fill:#333;}#mermaid-svg-uatslgpRMIwSdYtE .cluster span{color:#333;}#mermaid-svg-uatslgpRMIwSdYtE div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-uatslgpRMIwSdYtE .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-uatslgpRMIwSdYtE rect.text{fill:none;stroke-width:0;}#mermaid-svg-uatslgpRMIwSdYtE .icon-shape,#mermaid-svg-uatslgpRMIwSdYtE .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-uatslgpRMIwSdYtE .icon-shape p,#mermaid-svg-uatslgpRMIwSdYtE .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-uatslgpRMIwSdYtE .icon-shape .label rect,#mermaid-svg-uatslgpRMIwSdYtE .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-uatslgpRMIwSdYtE .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-uatslgpRMIwSdYtE .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-uatslgpRMIwSdYtE :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-uatslgpRMIwSdYtE .pain>*{fill:#fee2e2!important;stroke:#dc2626!important;stroke-width:1px!important;color:#7f1d1d!important;}#mermaid-svg-uatslgpRMIwSdYtE .pain span{fill:#fee2e2!important;stroke:#dc2626!important;stroke-width:1px!important;color:#7f1d1d!important;}#mermaid-svg-uatslgpRMIwSdYtE .pain tspan{fill:#7f1d1d!important;} 外参随每张图而变
标定板 Board
相机 Camera

它随着拍摄变化。

例如:

text 复制代码
第1张:
Board 在这里

第2张:
Board 又换地方了

所以:

外参一直变。


双目标定的外参:
#mermaid-svg-ddidVeFzBirKgYCA{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-ddidVeFzBirKgYCA .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-ddidVeFzBirKgYCA .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-ddidVeFzBirKgYCA .error-icon{fill:#552222;}#mermaid-svg-ddidVeFzBirKgYCA .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-ddidVeFzBirKgYCA .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-ddidVeFzBirKgYCA .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-ddidVeFzBirKgYCA .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-ddidVeFzBirKgYCA .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-ddidVeFzBirKgYCA .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-ddidVeFzBirKgYCA .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-ddidVeFzBirKgYCA .marker{fill:#333333;stroke:#333333;}#mermaid-svg-ddidVeFzBirKgYCA .marker.cross{stroke:#333333;}#mermaid-svg-ddidVeFzBirKgYCA svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-ddidVeFzBirKgYCA p{margin:0;}#mermaid-svg-ddidVeFzBirKgYCA .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-ddidVeFzBirKgYCA .cluster-label text{fill:#333;}#mermaid-svg-ddidVeFzBirKgYCA .cluster-label span{color:#333;}#mermaid-svg-ddidVeFzBirKgYCA .cluster-label span p{background-color:transparent;}#mermaid-svg-ddidVeFzBirKgYCA .label text,#mermaid-svg-ddidVeFzBirKgYCA span{fill:#333;color:#333;}#mermaid-svg-ddidVeFzBirKgYCA .node rect,#mermaid-svg-ddidVeFzBirKgYCA .node circle,#mermaid-svg-ddidVeFzBirKgYCA .node ellipse,#mermaid-svg-ddidVeFzBirKgYCA .node polygon,#mermaid-svg-ddidVeFzBirKgYCA .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-ddidVeFzBirKgYCA .rough-node .label text,#mermaid-svg-ddidVeFzBirKgYCA .node .label text,#mermaid-svg-ddidVeFzBirKgYCA .image-shape .label,#mermaid-svg-ddidVeFzBirKgYCA .icon-shape .label{text-anchor:middle;}#mermaid-svg-ddidVeFzBirKgYCA .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-ddidVeFzBirKgYCA .rough-node .label,#mermaid-svg-ddidVeFzBirKgYCA .node .label,#mermaid-svg-ddidVeFzBirKgYCA .image-shape .label,#mermaid-svg-ddidVeFzBirKgYCA .icon-shape .label{text-align:center;}#mermaid-svg-ddidVeFzBirKgYCA .node.clickable{cursor:pointer;}#mermaid-svg-ddidVeFzBirKgYCA .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-ddidVeFzBirKgYCA .arrowheadPath{fill:#333333;}#mermaid-svg-ddidVeFzBirKgYCA .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-ddidVeFzBirKgYCA .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-ddidVeFzBirKgYCA .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ddidVeFzBirKgYCA .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-ddidVeFzBirKgYCA .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ddidVeFzBirKgYCA .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-ddidVeFzBirKgYCA .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-ddidVeFzBirKgYCA .cluster text{fill:#333;}#mermaid-svg-ddidVeFzBirKgYCA .cluster span{color:#333;}#mermaid-svg-ddidVeFzBirKgYCA div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-ddidVeFzBirKgYCA .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-ddidVeFzBirKgYCA rect.text{fill:none;stroke-width:0;}#mermaid-svg-ddidVeFzBirKgYCA .icon-shape,#mermaid-svg-ddidVeFzBirKgYCA .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-ddidVeFzBirKgYCA .icon-shape p,#mermaid-svg-ddidVeFzBirKgYCA .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-ddidVeFzBirKgYCA .icon-shape .label rect,#mermaid-svg-ddidVeFzBirKgYCA .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-ddidVeFzBirKgYCA .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-ddidVeFzBirKgYCA .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-ddidVeFzBirKgYCA :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-ddidVeFzBirKgYCA .test>*{fill:#dcfce7!important;stroke:#16a34a!important;stroke-width:1px!important;color:#14532b!important;}#mermaid-svg-ddidVeFzBirKgYCA .test span{fill:#dcfce7!important;stroke:#16a34a!important;stroke-width:1px!important;color:#14532b!important;}#mermaid-svg-ddidVeFzBirKgYCA .test tspan{fill:#14532b!important;} 外参固定不变
左相机 Left
右相机 Right

这是两个相机安装好的位置关系。

只要相机没拆:

text 复制代码
永远一样。

例如(理想的"完全平行"安装示意):

text 复制代码
Baseline = 60 mm

R ≈ 单位矩阵

T =
[60
 0
 0]

注意:真实相机装配存在公差,标定出的 R 几乎不会是严格的单位矩阵 ,只会接近单位阵。严格单位阵是理想假设,或者是极线校正(rectification)之后才有的状态------正是靠后续的校正,才把左右两图摆成严格行对齐。

这组参数只要相机不拆就一直不变。


四、OpenCV 返回值也能看出来

calibrateCamera()

返回:

text 复制代码
K
Dist
rvecs
tvecs

其中

text 复制代码
rvecs/tvecs

表示:
Board → Camera

而且有很多组。


stereoCalibrate()

返回:

text 复制代码
K1
Dist1

K2
Dist2

R
T
E
F

其中:

  • E:本质矩阵(Essential),描述标定坐标系下的极线约束
  • F:基础矩阵(Fundamental),描述像素坐标系下的极线约束

这里的

text 复制代码
R
T

表示:

text 复制代码
Left Camera
      ↓
Right Camera

只有一组。


五、总结

项目 单目标定 双目标定
左相机内参
右相机内参 ❌(需单独标定)
畸变参数
标定板→相机外参 ✅(每张图一组) ✅(每张图参与联合优化,通常不作主要返回值)
左相机→右相机外参 ✅(固定一组)
是否能做去畸变
是否能做双目测距/三角化 ❌(单帧纯单目无绝对尺度)

一句话概括:

  • 单目标定 得到的是相机自身参数 (内参、畸变)以及每张标定图中标定板相对于相机的姿态(外参,每张都不同)。
  • 双目标定 不仅得到左右相机各自的内参和畸变,还会估计左右相机之间固定的外参(R、T)。正是这组固定外参,使得双目系统能够进行极线校正、立体匹配和三角测量来恢复三维深度。
相关推荐
暂未成功人士!23 天前
雷达的标定 --- 雷达到相机(Lidar2Cam)标定 和 雷达到本体(Lidar2Baselink)标定的相关原理以及实现步骤
数码相机·雷达·坐标转换·标定·外参
暂未成功人士!1 个月前
相机标定---张正友相机标定和手眼标定
数码相机·手眼标定·相机标定
暂未成功人士!1 个月前
机器人坐标系转换中的左乘和右乘详解
机器人·坐标转换·外参
weixin_468466851 个月前
相机标定三大坐标系新手入门指南
图像处理·人工智能·相机标定·机器视觉·数字图像·工业自动化·光学系统
weixin_468466851 个月前
基于OpenCV的工业相机标定技术实战
图像处理·人工智能·opencv·计算机视觉·相机标定·机器视觉·工业相机
ergevv5 个月前
双目相机的共视区计算
图像·双目相机·共视区域·x轴
Hi202402176 个月前
相机与激光雷达联合标定:如何选择高辨识度的参照物
数码相机·自动驾驶·雷达·相机标定·机器视觉
曾小蛙6 个月前
【ROS2+深度相机】奥比中光Gemini 335L的简单使用
机器人·ros2·奥比中光·双目相机·gemini 335l·orbbec sdk·orbbecsdk_ros2
友思特 智能感知6 个月前
ZED 相机 × Jetson Thor:赋能机器人全场景高性能视觉,解锁边缘感知无限可能
机器人·双目相机·空间智能