opencv_contrib + opencv 3 using xfeature::SURF unexpeted handle 0xc0000005
I am working in the VS2013 with C++. Every time I call the function xfeature::SURF::create(), I will get crush.
#include <opencv2/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/xfeatures2d/nonfree.hpp>
int main(int argc, char* argv[])
{
cv::Mat image = cv::imread("1.jpg", cv::IMREAD_GRAYSCALE);
std::vector<cv::KeyPoint> keyPoints;
cv::Mat descriptor;
//cv::imshow("demo",image);
cv::Ptr<cv::xfeatures2d::SURF> surf = cv::xfeatures2d::SURF::create();
//surf->detectAndCompute(image.getUMat(cv::ACCESS_READ), 0, keyPoints, descriptor);
return 0;
}