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

Commit

Permalink
make camera flip image instead of code to save some cpu
Browse files Browse the repository at this point in the history
on my tests with delay_thread=0 to see higher utilisation I went down
from 53 to 48 % of cpu utilisation on 4eye3controler setup
  • Loading branch information
gb2111 committed Nov 11, 2016
1 parent fe5f7e0 commit 80e029a
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 80e029a

Please sign in to comment.