Ask Your Question
1

error in findStereoCorrespondenceBM

asked 2014-03-24 07:09:23 -0600

Veronica gravatar image

Hi all,

I'm trying to implement 3D reconstruction, but I can't go over this error:

I'm reading images from stereo cameras as IplImage. I convert the IplImage in Mat and then in cvMat.

CvMat l_rect = cvMat(imageSize_l.height, imageSize_l.width, CV_8UC1);

The error appears in the findStereoCorrespondenceBM function:

OpenCV Error: Unsupported format or combination of formats (Both input images must have CV_8UC1) in findStereoCorrespondenceBM

How can I solve this problem?

Thank you

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-03-25 12:55:57 -0600

xaffeine gravatar image

Convert all your images to single-channel 8-bit form using cvtcolor and, if necessary, convertTo, threshold, or normalize.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-03-24 07:09:23 -0600

Seen: 1,379 times

Last updated: Mar 25 '14