Added Source/Mirroring parameter for convenience

This commit is contained in:
matlabbe
2015-02-28 18:09:22 -05:00
parent 395dac5777
commit cf69f17925
9 changed files with 100 additions and 43 deletions
+5
View File
@@ -50,6 +50,7 @@ Camera::Camera(float imageRate,
_imageRate(imageRate),
_imageWidth(imageWidth),
_imageHeight(imageHeight),
_mirroring(false),
_frameRateTimer(new UTimer())
{
}
@@ -177,6 +178,10 @@ cv::Mat Camera::takeImage()
cv::Mat temp = img.clone();
cv::undistort(temp, img, _k, _d);
}
if(!img.empty() && _mirroring)
{
cv::flip(img,img,1);
}
UDEBUG("Time capturing image = %fs", timer.ticks());
return img;
}