Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #272 from gb2111/master
Browse files Browse the repository at this point in the history
make camera flip image instead of code to save some cpu
  • Loading branch information
HipsterSloth authored Nov 11, 2016
2 parents 112b06e + 80e029a commit 6def02f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/psmoveservice/Device/View/ServerTrackerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ class OpenCVBufferState
{
const cv::Mat videoBufferMat(frameHeight, frameWidth, CV_8UC3, const_cast<unsigned char *>(video_buffer));

// Copy and Flip image about the x-axis
cv::flip(videoBufferMat, *bgrBuffer, 1);
videoBufferMat.copyTo(*bgrBuffer);

// Convert the video buffer to the HSV color space
if (bgr2hsv != nullptr)
Expand Down
2 changes: 2 additions & 0 deletions src/psmoveservice/PSMoveTracker/PSEye/PSEyeVideoCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ class PSEYECaptureCAM_PS3EYE : public cv::IVideoCapture

eye->setAutogain(false);
eye->setAutoWhiteBalance(false);

eye->setFlip(true, false);

m_index = _index;
refreshDimensions();
Expand Down

0 comments on commit 6def02f

Please sign in to comment.