March 2018
Beginner to intermediate
306 pages
9h 54m
English
You need to complete the following steps:
import cv2import numpy as np
left_img = cv2.imread('../data/stereo/left.png')right_img = cv2.imread('../data/stereo/right.png')
stereo_bm = cv2.StereoBM_create(32)dispmap_bm = stereo_bm.compute(cv2.cvtColor(left_img, cv2.COLOR_BGR2GRAY), cv2.cvtColor(right_img, cv2.COLOR_BGR2GRAY))
stereo_sgbm = cv2.StereoSGBM_create(0, 32)dispmap_sgbm = stereo_sgbm.compute(left_img, right_img)
plt.figure(figsize=(12,10))plt.subplot(221)plt.title('left') ...