Ask Your Question
0

'MODE_SGBM_3WAY' is not a member of 'cv::StereoSGBM'

asked 2016-02-11 08:15:43 -0500

farzad_1990 gravatar image

Dear friends for calculate the volume, I used the stereo_match.cpp file that available in OpenCV3.1.0 (opencv3.1.0 / sampels / cpp/stereo_match.cpp).I wrote the program entries as follows: std::string img1_filename = "/home/farzad/Desktop/mathing/build-matching-Desktop-Debug/left.jpg"; std::string img2_filename = "/home/farzad/Desktop/mathing/build-matching-Desktop-Debug/right.jpg"; std::string intrinsic_filename = "/home/farzad/Desktop/calibration/build-calibration-Desktop-Debug/intrinsics.yml"; std::string extrinsic_filename = "/home/farzad/Desktop/calibration/build-calibration-Desktop-Debug/extrinsics.yml"; std::string disparity_filename = "/home/farzad/Desktop/mathing/build-matching-Desktop-Debug/opencv_storage/disparity.jpg"; std::string point_cloud_filename = "/home/farzad/Desktop/mathing/build-matching-Desktop-Debug/opencv_storage/point_cloud.yml";

But I faced the following error: 'MODE_SGBM_3WAY' is not a member of 'cv::StereoSGBM'

Does anyone know the problem?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-02-11 10:40:55 -0500

Use the following:

  auto sgbm =
      cv::StereoSGBM::create(   0,   //mindisp
                               48,   //numdisp
                                5,   //SADWindow
                               25,   //P1
                               50,   //P2
                                1,   //dispdiffmax
                               63,   //prefiltercap
                               40,   //uniqueness
                              200,   //speckle window size
                                2,   //speckle range
                                cv::StereoSGBM::MODE_SGBM_3WAY );
edit flag offensive delete link more

Comments

Please explain more precisely.

farzad_1990 gravatar imagefarzad_1990 ( 2016-05-27 14:07:07 -0500 )edit

Please state your question more precisely. It's unreadable.

Der Luftmensch gravatar imageDer Luftmensch ( 2016-05-29 08:38:59 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-02-11 08:15:43 -0500

Seen: 357 times

Last updated: Feb 11 '16