Revision history [back]

StereoBM_create.compute() with different image shape

I would like to find the depth or disparity map for an image pair, but the images don't have the exactly same dimensions...

So I have this (strange) error:

error: /..../opencv/modules/calib3d/src/stereobm.cpp:1069: error: (-209) All the images must have the same size in function compute


From this points, three questions:

1. Is it possible to run StereoBM_create.compute() on images with different sizes?
2. Does it make sense to reshape one image to fit the smaller?
3. Is there any other tool to perform a depth computation that could work on image with different sizes?

(I run cv2 on Python 2.7)

StereoBM_create.compute() with different image images shape

I would like to find the depth or disparity map for an image pair, but the images don't have the exactly same dimensions...

So I have this (strange) error:

error: /..../opencv/modules/calib3d/src/stereobm.cpp:1069: error: (-209) All the images must have the same size in function compute


From this points, three questions:

1. Is it possible to run StereoBM_create.compute() on images with different sizes?
2. Does it make sense to reshape one image to fit the smaller?
3. Is there any other tool to perform a depth computation that could work on image with different sizes?

(I run cv2 on Python 2.7)

StereoBM_create.compute() with different images shape

I would like to find the depth or disparity map for an image pair, but the images don't have the exactly same dimensions...

So I have this (strange) error:

error: /..../opencv/modules/calib3d/src/stereobm.cpp:1069: error: (-209) All the images must have the same size in function compute


From this points, three questions:

1. Is it possible to run StereoBM_create.compute() on images with different sizes?
2. Does it make sense to reshape one image to fit the smaller?
3. Is there any other tool to perform a depth computation that could work on image with different sizes?

I also have some really weird results:
Created so: stereo = cv2.StereoBM_create(numDisparities=16, blockSize=21)

(I run cv2 on Python 2.7)