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

make camera flip image instead of code to save some cpu #272

Merged
merged 2 commits into from
Nov 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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