1

I install ubuntu 14.04.3 and opencv3 on my macbook, but when i compile the below code :

#include <opencv2/opencv.hpp>
#include <iostream>
#include <stdio.h>
using namespace std;
using namespace cv;

int main(){
    Ptr<StereoBM> sbm = createStereoBM(16,2);
    return 0;
}

I get error:

stereo.cpp: In function ‘int main()’:
stereo.cpp:8:44: error: ‘createStereoBM’ was not declared in this scope
     Ptr<StereoBM> sbm = createStereoBM(16,2);
                                        ^

I can't find createStereoBM library. I would appreciate any hint. Thanks.

Leomic
  • 33
  • 6

1 Answers1

2

There may possibly be an issue with the 3.0 beta documentation; it appears to reference a cuda function.

The correct function appears to be:

 cv::StereoBM::create

As @berak points out using the current opencv documentation.

user2585501
  • 596
  • 4
  • 17
  • A link to a potential solution is always welcome, but please [add context around the link](http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers/8259#8259) so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. Take into account that being *barely more than a link to an external site* is a possible reason as to [Why and how are some answers deleted?](http://stackoverflow.com/help/deleted-answers). – Gustavo Morales Jul 04 '16 at 01:07