Skip to content

Commit 75aff16

Browse files
authored
Update doc.md
1 parent 8876aec commit 75aff16

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

doc/doc.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,8 @@ python run_get_projection_maps.py -camera front -scale 0.7 0.8 -shift -150 -100
198198
4. 对重叠区域中的每个像素,利用 `cv2.pointPolygonTest` 计算其到这两个多边形 `polyA``polyB` 的距离 $d_A,d_B$,则该像素对应的权值为 $w=d_B^2/(d_A^2+d_B^2)$,即如果这个像素落在 `front` 画面内,则它与 `polyB` 的距离就更远,从而权值更大。
199199

200200
5. 对不在重叠区域内的像素,若其属于 `front` 相机的范围则其权值为 1,否则权值为 0。于是我们得到了一个连续变化的,取值范围在 0~1 之间的矩阵 $G$,其灰度图如下:
201-
202-
<img style="margin:0px auto;display:block" width=250 src="./img/weight_for_FL.png" />
203-
204-
将 $G$ 作为权值可得融合后的图像为 `front * G + (1- G) * left`
201+
<img style="margin:0px auto;display:block" width=250 src="./img/weight_for_FL.png" />
202+
将 $G$ 作为权值可得融合后的图像为 `front * G + (1- G) * left`
205203

206204
6. 注意由于重叠区域中的像素值是来自两幅图像的加权平均,所以出现在这个区域内的物体会不可避免出现虚影的现象,所以我们需要尽量压缩重叠区域的范围,尽可能只对拼接缝周围的像素计算权值,拼接缝上方的像素尽量使用来自 `front` 的原像素,拼接缝下方的像素尽量使用来自 `back` 的原像素。这一步可以通过控制 $d_B$ 的值得到。
207205

0 commit comments

Comments
 (0)