Closed orsveri closed 2 years ago
hm... It's hard to say but probably the images are not loaded. try to plot them or resave them after loading.
The error happens on this line: libGraphSLAM/GraphSLAM:78 I tried to add the following piece just above this line:
CTICK("[SLAM][ProcessFrame]1.ProcessFrame");
// debug
std::cout << "process frame : " << std::endl;
std::cout << "pose " << *pose << std::endl;
std::cout << "D w : " << depthImage.cols << std::endl;
std::cout << "D h: " << depthImage.rows << std::endl;
std::cout << "RGB w : " << colorImage.cols << std::endl;
std::cout << "RGB h: " << colorImage.rows << std::endl;
inseg_->ProcessFrame(depthImage, colorImage);
CTOCK("[SLAM][ProcessFrame]1.ProcessFrame");
and I got this output:
/home/s.orlova@dev.braingarden.ai/Projects/3DRecog/SGF/SceneGraphFusion/bin/exe_GraphSLAM --pth_in /home/s.orlova@dev.braingarden.ai/Projects/3DRecog/datasets/3RScan/data/3RScan/4acaebcc-6c10-2a2a-858b-29c7e4fb410d/sequence
detect data type: 3RScanI0131 23:12:26.826 main.cc:main:154] Buliding data loader...
I0131 23:12:27.028 main.cc:main:166] Building renderer...
I0131 23:12:29.776 main.cc:main:174] Building framework...
I0131 23:12:29.779 main.cc:main:211] start processing frames...
V0131 23:12:29.782 main.cc:main:214] process frame: 1
process frame :
pose 0.0228455 -0.66513 -0.746379 20.175
-0.999622 -0.00380361 -0.0272072 -1.8562
0.0152574 0.746719 -0.664966 -43.6553
-0 0 0 1
D w : 960
D h: 540
RGB w : 960
RGB h: 540
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.5-dev) /home/s.orlova@dev.braingarden.ai/src/opencv_build/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
So it seems that image is loaded correctly.
It is still not obvious to me. I think the problem is more related to the operating system instead of the main code. I don't think I can help here. Maybe you can try to run the code in a virtual machine?
Hello! Thank you for your advice. I'll try it after I test the idea that it may happen because of the negative or zero fx
or fy
in cv::resize
function:
cv::resize(src, dst, Size(), fx, fy, interpolation);
I found the line that my error message refers to:
opencv repo, modules/imgproc/src/resize.cpp:4055
It seems that it gets zero dsize
and tries to apply fx
and fy
.
So I'll see if I can do anything about it first
Hi! I changed OpenCV version from 4.5.5 (built from source) to 4.2.0 (installed via apt). After this I wasn't able to build GraphSLAM without GUI, because it couldn't find imgui.h. But after this I ran build with GUI option, it reloaded libGUI3D and everything has been working like a charm since then, yay! Thank you for support!
Hello! I successfully built exe_GraphSLAM, but when I try to run it with example sequence, I get the following error:
Could you give me a cue what to look for and where, please? I assumed that different OpenCV version isn't a problem here, but maybe it is.