-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core dump on Stereo mode #12
Comments
Executing following operations on GPU is viable. Do you have a patch? |
No, i'm trying to fix this problem but since now i've not found any solution, since i'm not familiar with cuda programming. |
Sorry that I can't roll out a patch for you, either, as I am busy working on other projects. But should anyone also encounter this problem, I'd be appreciative for any patch. Thanks for reaching. |
I clocked the time of the Frame::ComputeStereoMatches() function, which looks like the bottleneck here. Because the Mat is being downloaded from the mvImagePyramid GpuMat within the for loop, it takes more than 2 seconds to process this function for each frame. I am trying to execute the following operations using the GPU and just return the norm between the left and right images to the CPU. Has anyone written a custom cuda kernel to perform this task? |
Hi,
i've tested the SLAM on GPU in monocular mode and it works very well, but i've found an error in stereo mode.
In file Frame.cc, from line 567 to 571 the code is:
`const int w = 5;
cv::cuda::GpuMat gMat = mpORBextractorLeft->mvImagePyramid[kpL.octave].rowRange(scaledvL - w, scaledvL + w + 1).colRange(scaleduL - w, scaleduL + w + 1);
cv::Mat IL(gMat.rows, gMat.cols, gMat.type(), gMat.data, gMat.step);
IL.convertTo(IL,CV_32F);
IL = IL - IL.at(w,w) *cv::Mat::ones(IL.rows,IL.cols,CV_32F);`
The problem is: the cv::Mat IL is pointing to some address in the gpu, but IL is on the host memory, and it's not possible to reference something in the gpu, this is causing the slam to crash in stereo mode. Same thing happen in lines 586 to 589.
i'm asking for help since i've not yet found a way to fix this problem.
i've tried to download the gMat to the host memory with the cv::cuda::GpuMat::download() function but it's slowing down too much the algorithm, since it makes constant memory transfer from gpu to host. I think that a fix can be to execute all the following operation in gpu and not on cpu.
Thanks for the attention,
Antonio
The text was updated successfully, but these errors were encountered: