宽体车参数修订
6
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/run_get_weight_matrices.py" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -132,7 +132,7 @@ python run_get_projection_maps.py -camera front -scale 0.7 0.8 -shift -150 -100
|
||||
|
||||
然后依次点击事先确定好的四个标志点 (顺序不能错!),得到的效果如下:
|
||||
|
||||
<img style="margin:0px auto;display:block" width=600 src="./img/choose_front.png"/>
|
||||
<img style="margin:0px auto;display:block" width=600 src="./img/choose_front.png" alt=""/>
|
||||
|
||||
注意标志点的设置代码在[这里](https://github.com/neozhaoliang/surround-view-system-introduction/blob/master/surround_view/param_settings.py#L40)。
|
||||
|
||||
|
||||
BIN
images/back.png
|
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 5.0 MiB |
BIN
images/front.png
|
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 5.1 MiB |
BIN
images/left.png
|
Before Width: | Height: | Size: 4.9 MiB After Width: | Height: | Size: 5.0 MiB |
BIN
images/right.png
|
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 5.1 MiB |
@@ -26,7 +26,7 @@ def main():
|
||||
birdview.make_luminance_balance().stitch_all_parts()
|
||||
birdview.make_white_balance()
|
||||
birdview.copy_car_image()
|
||||
ret = display_image("BirdView Result", birdview.image)
|
||||
ret = display_image("360 bird look", birdview.image)
|
||||
if ret > 0:
|
||||
Image.fromarray((Gmat * 255).astype(np.uint8)).save("weights.png")
|
||||
Image.fromarray(Mmat.astype(np.uint8)).save("masks.png")
|
||||
|
||||
@@ -5,8 +5,8 @@ import cv2
|
||||
camera_names = ["front", "back", "left", "right"]
|
||||
|
||||
# 标定布向外扩展的尺寸,单位为像素,默认不修改
|
||||
shift_w = 300
|
||||
shift_h = 300
|
||||
shift_w = 900
|
||||
shift_h = 900
|
||||
|
||||
# 标定布的长和宽
|
||||
cal_w = 3000
|
||||
@@ -17,8 +17,8 @@ conner_w = 1000
|
||||
conner_h = 1000
|
||||
|
||||
# 车辆的长和宽
|
||||
car_w = 300
|
||||
car_h = 550
|
||||
car_w = 1600
|
||||
car_h = 2000
|
||||
|
||||
# 车辆与标定布指定四角之间的间隙
|
||||
inn_shift_w = (cal_w - 2 * conner_w - car_w) // 2
|
||||
@@ -49,22 +49,22 @@ project_shapes = {
|
||||
project_keypoints = {
|
||||
"front": [(shift_w + 200, shift_h),
|
||||
(shift_w + 2800, shift_h),
|
||||
(shift_w + 200, shift_h + 800),
|
||||
(shift_w + 2800, shift_h + 800)],
|
||||
(shift_w + 200, shift_h + 700),
|
||||
(shift_w + 2800, shift_h + 700)],
|
||||
|
||||
"back": [(shift_w + 200, shift_h),
|
||||
(shift_w + 2800, shift_h),
|
||||
(shift_w + 200, shift_h + 500),
|
||||
(shift_w + 2800, shift_h + 500)],
|
||||
(shift_w + 200, shift_h + 700),
|
||||
(shift_w + 2800, shift_h + 700)],
|
||||
|
||||
"left": [(shift_w + 300, shift_h),
|
||||
(shift_w + 3200, shift_h),
|
||||
(shift_w + 300, shift_h + 700),
|
||||
(shift_w + 3200, shift_h + 700)],
|
||||
"left": [(shift_w + 200, shift_h),
|
||||
(shift_w + 3300, shift_h),
|
||||
(shift_w + 200, shift_h + 600),
|
||||
(shift_w + 3300, shift_h + 600)],
|
||||
|
||||
"right": [(shift_h + 500, shift_w),
|
||||
"right": [(shift_h + 200, shift_w),
|
||||
(shift_h + 3300, shift_w),
|
||||
(shift_h + 500, shift_w + 600),
|
||||
(shift_h + 200, shift_w + 600),
|
||||
(shift_h + 3300, shift_w + 600)],
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ project_matrix: !!opencv-matrix
|
||||
rows: 3
|
||||
cols: 3
|
||||
dt: d
|
||||
data: [ -1.6630244936572751e+00, -2.6235622379961145e+00,
|
||||
3.5016508426417076e+03, -9.6185827770920898e-02,
|
||||
-2.4771954637838691e+00, 2.6363684218350554e+03,
|
||||
-5.3720940146215687e-05, -1.4862196717814050e-03, 1. ]
|
||||
data: [ 4.7130092313900384e+01, 4.5706425884913429e+01,
|
||||
-4.8632853979743268e+04, 2.0091730581034950e+00,
|
||||
5.9188695261792354e+01, -3.6891340693634782e+04,
|
||||
-1.0383730105240072e-04, 1.9380884145387894e-02, 1. ]
|
||||
scale_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
@@ -34,4 +34,4 @@ shift_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
dt: f
|
||||
data: [ -150., -100. ]
|
||||
data: [ -150., -220. ]
|
||||
|
||||
@@ -4,14 +4,14 @@ camera_matrix: !!opencv-matrix
|
||||
rows: 3
|
||||
cols: 3
|
||||
dt: d
|
||||
data: [ 8.6726608019452317e+02, 0., 1.1654823547060421e+03, 0.,
|
||||
8.6642315489461635e+02, 7.0829791670122563e+02, 0., 0., 1. ]
|
||||
data: [ 8.7564843852829847e+02, 0., 1.1587653618485392e+03, 0.,
|
||||
8.7392998079840913e+02, 7.1928969544949632e+02, 0., 0., 1. ]
|
||||
dist_coeffs: !!opencv-matrix
|
||||
rows: 4
|
||||
cols: 1
|
||||
dt: d
|
||||
data: [ -2.0351195680457176e-01, 7.2366975794859609e-02,
|
||||
-6.7931513547321534e-02, 2.7753672462015658e-02 ]
|
||||
data: [ -1.8577009254771773e-01, -1.2112661747599207e-02,
|
||||
3.8920501515379735e-02, -1.5534566103624418e-02 ]
|
||||
resolution: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
@@ -21,10 +21,10 @@ project_matrix: !!opencv-matrix
|
||||
rows: 3
|
||||
cols: 3
|
||||
dt: d
|
||||
data: [ -1.7621178147029364e+00, -3.1225515440046361e+00,
|
||||
3.6879628012831586e+03, 6.4441326643723845e-02,
|
||||
-3.2973218330573513e+00, 3.0848594829140279e+03,
|
||||
2.7252094566955889e-05, -1.6884773289497907e-03, 1. ]
|
||||
data: [ -4.0454349692549840e+01, -3.8462399360732675e+01,
|
||||
4.1942067316789995e+04, 1.2796393778893011e-02,
|
||||
-4.7794558773808895e+01, 2.9905357948844816e+04,
|
||||
-7.9780705064873378e-04, -1.6453197618009299e-02, 1. ]
|
||||
scale_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
@@ -34,4 +34,4 @@ shift_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
dt: f
|
||||
data: [ -150., -100. ]
|
||||
data: [ -150., -220. ]
|
||||
|
||||
@@ -21,10 +21,10 @@ project_matrix: !!opencv-matrix
|
||||
rows: 3
|
||||
cols: 3
|
||||
dt: d
|
||||
data: [ -2.0521737883395668e+00, -3.7532420536911584e+00,
|
||||
4.2596358822851871e+03, -2.4577314766587831e-03,
|
||||
-3.3960994301950915e+00, 3.0045527363823876e+03,
|
||||
-8.1924382555303808e-06, -1.9197310294567422e-03, 1. ]
|
||||
data: [ 8.5509640434493392e+01, 1.0190846677991429e+02,
|
||||
-9.6242835690001855e+04, -3.1764361424893210e+00,
|
||||
1.0352170457968155e+02, -6.0809237322321533e+04,
|
||||
-8.1404947594278059e-04, 3.7945941299093379e-02, 1. ]
|
||||
scale_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
@@ -34,4 +34,4 @@ shift_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
dt: f
|
||||
data: [ -150., -100. ]
|
||||
data: [ -150., -220. ]
|
||||
|
||||
@@ -21,10 +21,10 @@ project_matrix: !!opencv-matrix
|
||||
rows: 3
|
||||
cols: 3
|
||||
dt: d
|
||||
data: [ -1.9401318142117736e+00, -3.9568680582533751e+00,
|
||||
4.3374250732845567e+03, 2.2553918190428280e-02,
|
||||
-3.0113755118912739e+00, 2.8156665747361490e+03,
|
||||
-1.5310504337675217e-05, -1.7968437058381963e-03, 1. ]
|
||||
data: [ -2.7248556473092950e+01, -3.4275886579619730e+01,
|
||||
3.2783807802016345e+04, -1.2977296512114450e-01,
|
||||
-3.4291333987141726e+01, 2.2511924257001145e+04,
|
||||
1.8315529141828271e-04, -1.2957104293237372e-02, 1. ]
|
||||
scale_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
@@ -34,4 +34,4 @@ shift_xy: !!opencv-matrix
|
||||
rows: 2
|
||||
cols: 1
|
||||
dt: f
|
||||
data: [ -150., -100. ]
|
||||
data: [ -150., -220. ]
|
||||
|
||||