lukasvst / dm-vio

Source code for the paper DM-VIO: Delayed Marginalization Visual-Inertial Odometry
GNU General Public License v3.0
1.07k stars 187 forks source link

live saving pictures get #17

Closed Zoltan3057 closed 2 years ago

Zoltan3057 commented 2 years ago

Hi, It seems saved images sometimes have misalignment. Using cv::Mat clone() may improve this condition.

Screenshot from 2022-06-24 15-54-42

void dmvio::DatasetSaver::addImage(cv::Mat& mat, double timestamp, double exposure)
{
    {
        std::unique_lock<std::mutex> lock(mutex);
        imageQueue.emplace_back(mat.clone(), timestamp, exposure);
    }
    frameArrivedCond.notify_all();
}
lukasvst commented 2 years ago

Thanks a lot for reporting this and providing a solution! It should be fixed now, but please let me know if the problem still arises.