}
- inline oclMat::oclMat(const oclMat &m, const Range &rowRange, const Range &colRange)
+ inline oclMat::oclMat(const oclMat &m, const Range &rRange, const Range &cRange)
{
flags = m.flags;
step = m.step;
wholerows = m.wholerows;
wholecols = m.wholecols;
offset = m.offset;
- if( rowRange == Range::all() )
+ if( rRange == Range::all() )
rows = m.rows;
else
{
- CV_Assert( 0 <= rowRange.start && rowRange.start <= rowRange.end && rowRange.end <= m.rows );
- rows = rowRange.size();
- offset += step * rowRange.start;
+ CV_Assert( 0 <= rRange.start && rRange.start <= rRange.end && rRange.end <= m.rows );
+ rows = rRange.size();
+ offset += step * rRange.start;
}
- if( colRange == Range::all() )
+ if( cRange == Range::all() )
cols = m.cols;
else
{
- CV_Assert( 0 <= colRange.start && colRange.start <= colRange.end && colRange.end <= m.cols );
- cols = colRange.size();
- offset += colRange.start * elemSize();
+ CV_Assert( 0 <= cRange.start && cRange.start <= cRange.end && cRange.end <= m.cols );
+ cols = cRange.size();
+ offset += cRange.start * elemSize();
flags &= cols < m.cols ? ~Mat::CONTINUOUS_FLAG : -1;
}
//CPP void oclMat::copyTo( oclMat& m, const oclMat& mask ) const;
//CPP void oclMat::convertTo( oclMat& m, int rtype, double alpha=1, double beta=0 ) const;
- inline void oclMat::assignTo( oclMat &m, int type ) const
+ inline void oclMat::assignTo( oclMat &m, int mtype ) const
{
- if( type < 0 )
+ if( mtype < 0 )
m = *this;
else
- convertTo(m, type);
+ convertTo(m, mtype);
}
//CPP oclMat& oclMat::operator = (const Scalar& s);
return *this;
}
- inline oclMat oclMat::operator()( Range rowRange, Range colRange ) const
+ inline oclMat oclMat::operator()( Range rRange, Range cRange ) const
{
- return oclMat(*this, rowRange, colRange);
+ return oclMat(*this, rRange, cRange);
}
inline oclMat oclMat::operator()( const Rect &roi ) const
{
using namespace cv;
using namespace std;
-void help()
+static void help()
{
cout <<
"\nA program using OCL module pyramid scaling, Canny, dilate functions, threshold, split; cpu contours, contour simpification and\n"
// helper function:
// finds a cosine of angle between vectors
// from pt0->pt1 and from pt0->pt2
-double angle( Point pt1, Point pt2, Point pt0 )
+static double angle( Point pt1, Point pt2, Point pt0 )
{
double dx1 = pt1.x - pt0.x;
double dy1 = pt1.y - pt0.y;
// returns sequence of squares detected on the image.
// the sequence is stored in the specified memory storage
-void findSquares( const Mat& image, vector<vector<Point> >& squares )
+static void findSquares( const Mat& image, vector<vector<Point> >& squares )
{
squares.clear();
// the function draws all the squares in the image
-void drawSquares( Mat& image, const vector<vector<Point> >& squares )
+static void drawSquares( Mat& image, const vector<vector<Point> >& squares )
{
for( size_t i = 0; i < squares.size(); i++ )
{