Skip to content
Snippets Groups Projects
Commit 91eac3b0 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix for multi thread call to grab

parent d047ada4
Branches
Tags
No related merge requests found
......@@ -112,12 +112,15 @@ static void disparityToDepth(const cv::Mat &disparity, cv::Mat &depth, const cv:
}
void StereoVideoSource::grab() {
// TODO(Nick) find a way to move this to last part ... but grab can't
// be called twice by different threads and it is currently
// FIXME Call to grab from multiple threads
unique_lock<mutex> lk(mutex_);
calib_->rectified(left_, right_);
cv::Mat disp;
disp_->compute(left_, right_, disp);
unique_lock<mutex> lk(mutex_);
left_.copyTo(rgb_);
disparityToDepth(disp, depth_, calib_->getQ());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment