Ask Your Question

Revision history [back]

MS Visual Studio 2017 MFC, when using StereoBM not have information

hello. I am testing about StereoBM function. My environment is MS Visual Studio 2017, OpenCV 4.3 . I usually used opencv function in this environment. but at the now when I using StereoBM function. I faced on strange problem.

My Source code is very simple

     Ptr<StereoBM> left_matcher = StereoBM::create(64, 9);//Number of Disparity 64, Window Size 9

CString ImgPath_Left, ImgPath_Right;
ImgPath_Left = strResult + CString("\\Q3_Image\\imL.png");
ImgPath_Right = strResult + CString("\\Q3_Image\\imR.png");

//CString cStr = L"String";
std::string str_LeftPath = std::string(CT2CA(ImgPath_Left));
std::string str_RightPath = std::string(CT2CA(ImgPath_Right));


Mat MLeft = imread(str_LeftPath, IMREAD_COLOR);
Mat MRight = imread(str_RightPath, IMREAD_COLOR);

Mat MLeft_gray,MRight_gray,Disparity_Map;

cvtColor(MLeft, MLeft_gray, COLOR_BGR2GRAY); //BGR -> GRAY 
cvtColor(MRight, MRight_gray, COLOR_BGR2GRAY); //BGR -> GRAY

left_matcher->compute(MLeft_gray, MRight_gray, Disparity_Map);


namedWindow("Disparity Map", WINDOW_AUTOSIZE);

imshow("Disparity Map", Disparity_Map);

but result image is empty, so I debuged, two input image are no problem. when I excute this command line "Ptr<stereobm> left_matcher = StereoBM::create(64, 9);" none error and exception. but, when I debug this command , I found this message "not have information. did not loaded about signal of opencv_world430d.dll"

image description

how to treat????

really, I usually used many time opencv on the vs mfc.

very strange...