Skip to content

Core dump on Stereo mode #12

@toniomtb

Description

@toniomtb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions