Depth Map from Stereo-Imaging and Single Camera
Hi all,
I'm going to try to imitate stereo-imaging by having 1 camera (I am using a camera with 4K res) fixed, and moving the object 0.8 cm left/right (baseline) and taking two pictures later on feeding them into:
import numpy as np
import cv2
from matplotlib import pyplot as plt
imgL = cv2.imread('left.png',0)
imgR = cv2.imread('right.png',0)
stereo = cv2.StereoBM_create(numDisparities=16, blockSize=15)
disparity = stereo.compute(imgL,imgR)
plt.imshow(disparity,'gray')
plt.show()
However, my output looks a bit wierd.
Is this because the difference between my images was too little (0.8 cm)?
Thanks in advance.