Ask Your Question

Revision history [back]

StereoSGBM Help

Hello everybody. I have a problem in compiling StereoSGBM class.

I am trying to create one instance of the SGBM class. I found some tutorials on Google, but it seems that I misunderstood something:

The problem are these lines:

StereoSGBM sgbm;
sgbm(g1, g2, disp);

where g1 and g2 are the CV_8UC1 images. And disp is the disparity map. The error I get from the compiler is

/home/andrea/NetBeansProjects/ED3D/main.cpp: In function ‘int main(int, char**)’:
/home/andrea/NetBeansProjects/ED3D/main.cpp:122:16: error: cannot declare variable ‘sgbm’ to be of abstract type ‘cv::StereoSGBM’

Thank you for any advice ;)

StereoSGBM Help

Hello everybody. I have a problem in compiling StereoSGBM class.

I am trying to create one instance of the SGBM class. I found some tutorials on Google, but it seems that I misunderstood something:

The problem are these lines:

StereoSGBM sgbm;
sgbm(g1, g2, disp);

where g1 and g2 are the CV_8UC1 images. And images and disp is the disparity map. The error I get from the compiler is

/home/andrea/NetBeansProjects/ED3D/main.cpp: /home/name/NetBeansProjects/ED3D/main.cpp: In function ‘int main(int, char**)’:
/home/andrea/NetBeansProjects/ED3D/main.cpp:122:16: /home/name/NetBeansProjects/ED3D/main.cpp:122:16: error: cannot declare variable ‘sgbm’ to be of abstract type ‘cv::StereoSGBM’

Thank you for any advice ;)