Skip to content

Commit

Permalink
Mit leisen Schritten richtung Fluchtpunkt.
Browse files Browse the repository at this point in the history
  • Loading branch information
ros authored and ros committed May 3, 2011
1 parent eed24f5 commit 0b5ea88
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions KinectHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,29 @@ CvPoint operator+(CvPoint a, CvPoint b)
return ret;
}

std::ostream& operator<<(std::ostream& s, const cv::Mat& mat)
{
s << "[Channels: " << mat.channels() << "][Size: W:" << mat.size().width << ";H: " << mat.size().height << "][Rows: " << mat.rows << "][Cols: " << mat.cols << "]";
return s;
}

std::ostream& operator<<(std::ostream& s, const CvPoint& point)
{
s << "[" << point.x << ":" << point.y << "]";
return s;
}

bool leftOf(const std::pair<int, cvb::CvBlob*>& point, const std::pair<int, cvb::CvBlob*>& of)
{
return point.second->centroid.x < of.second->centroid.x;
}

bool rightOf(const std::pair<int, cvb::CvBlob*>& point, const std::pair<int, cvb::CvBlob*>& of)
{
return point.second->centroid.x > of.second->centroid.x;
}

bool smallestIndex(const std::pair<int, cvb::CvBlob*>& a, const std::pair<int, cvb::CvBlob*>& b)
{
return a.first < b.first;
}

0 comments on commit 0b5ea88

Please sign in to comment.