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

asked 2020-10-29 10:16:25 -0600

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...

edit retag flag offensive close merge delete

Comments

but result image is empty

is it empty() or do you see a black image only ?

are you simply missing a waitKey()after the imshow() ?

not have information

you would need the opencv_world430d.pdb file to debug the opencv library code, which is not supplied with the prebuild binaries (if you need this, you have to build from src)

berak gravatar imageberak ( 2020-10-29 10:31:51 -0600 )edit

hello. thank you for your answer. at first, empty mean is only have black image. so, need to insert "opencv_world430d.pdb" in ther project folder ?

---> I just inseted opencv_world430d.pdb file, but result is same.

Seungho Hyun gravatar imageSeungho Hyun ( 2020-10-29 10:54:59 -0600 )edit

please read the comment above again, carefully ...

berak gravatar imageberak ( 2020-10-29 11:11:42 -0600 )edit

Thank you for your advice, I carefully read, In the Opencv/builde/x64/vc14/bin and Opencv/builde/x64/vc15/bin have opencv_world430d.pdb file.
so, can you teach to me the ways about solve this problem? I think Ptr<stereobm> don't have information, so can not process function

Seungho Hyun gravatar imageSeungho Hyun ( 2020-10-29 11:29:55 -0600 )edit