1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Move border type constants and Moments class to core module

This commit is contained in:
Andrey Kamaev
2013-04-10 15:54:14 +04:00
parent f4ae0cf19c
commit c98c246fc2
83 changed files with 541 additions and 639 deletions
+13 -13
View File
@@ -236,7 +236,7 @@ BRISK::generateKernel(std::vector<float> &radiusList, std::vector<int> &numberLi
// get the total number of points
const int rings = (int)radiusList.size();
assert(radiusList.size()!=0&&radiusList.size()==numberList.size());
CV_Assert(radiusList.size() != 0 && radiusList.size() == numberList.size());
points_ = 0; // remember the total number of points
for (int ring = 0; ring < rings; ring++)
{
@@ -336,7 +336,7 @@ BRISK::generateKernel(std::vector<float> &radiusList, std::vector<int> &numberLi
else if (norm_sq < dMax_sq)
{
// save to short pairs
assert(noShortPairs_<indSize);
CV_Assert(noShortPairs_ < indSize);
// make sure the user passes something sensible
BriskShortPair& shortPair = shortPairs_[indexChange[noShortPairs_]];
shortPair.j = j;
@@ -536,7 +536,7 @@ BRISK::computeDescriptorsAndOrOrientation(InputArray _image, InputArray _mask, s
{
Mat image = _image.getMat(), mask = _mask.getMat();
if( image.type() != CV_8UC1 )
cvtColor(image, image, CV_BGR2GRAY);
cvtColor(image, image, COLOR_BGR2GRAY);
if (!useProvidedKeypoints)
{
@@ -729,7 +729,7 @@ BRISK::computeKeypointsNoOrientation(InputArray _image, InputArray _mask, std::v
{
Mat image = _image.getMat(), mask = _mask.getMat();
if( image.type() != CV_8UC1 )
cvtColor(_image, image, CV_BGR2GRAY);
cvtColor(_image, image, COLOR_BGR2GRAY);
BriskScaleSpace briskScaleSpace(octaves);
briskScaleSpace.constructPyramid(image);
@@ -912,7 +912,7 @@ BriskScaleSpace::getKeypoints(const int threshold_, std::vector<cv::KeyPoint>& k
inline int
BriskScaleSpace::getScoreAbove(const int layer, const int x_layer, const int y_layer) const
{
assert(layer<layers_-1);
CV_Assert(layer < layers_-1);
const BriskLayer& l = pyramid_[layer + 1];
if (layer % 2 == 0)
{ // octave
@@ -955,7 +955,7 @@ BriskScaleSpace::getScoreAbove(const int layer, const int x_layer, const int y_l
inline int
BriskScaleSpace::getScoreBelow(const int layer, const int x_layer, const int y_layer) const
{
assert(layer);
CV_Assert(layer);
const BriskLayer& l = pyramid_[layer - 1];
int sixth_x;
int quarter_x;
@@ -1343,7 +1343,7 @@ BriskScaleSpace::getScoreMaxAbove(const int layer, const int x_layer, const int
float y1;
// the layer above
assert(layer+1<layers_);
CV_Assert(layer + 1 < layers_);
const BriskLayer& layerAbove = pyramid_[layer + 1];
if (layer % 2 == 0)
@@ -1539,7 +1539,7 @@ BriskScaleSpace::getScoreMaxBelow(const int layer, const int x_layer, const int
}
// the layer below
assert(layer>0);
CV_Assert(layer > 0);
const BriskLayer& layerBelow = pyramid_[layer - 1];
// check the first row
@@ -2109,7 +2109,7 @@ BriskLayer::getAgastScore(float xf, float yf, int threshold_in, float scale_in)
inline int
BriskLayer::value(const cv::Mat& mat, float xf, float yf, float scale_in) const
{
assert(!mat.empty());
CV_Assert(!mat.empty());
// get the position
const int x = cvFloor(xf);
const int y = cvFloor(yf);
@@ -2216,8 +2216,8 @@ inline void
BriskLayer::halfsample(const cv::Mat& srcimg, cv::Mat& dstimg)
{
// make sure the destination image is of the right size:
assert(srcimg.cols/2==dstimg.cols);
assert(srcimg.rows/2==dstimg.rows);
CV_Assert(srcimg.cols / 2 == dstimg.cols);
CV_Assert(srcimg.rows / 2 == dstimg.rows);
// handle non-SSE case
resize(srcimg, dstimg, dstimg.size(), 0, 0, INTER_AREA);
@@ -2227,8 +2227,8 @@ inline void
BriskLayer::twothirdsample(const cv::Mat& srcimg, cv::Mat& dstimg)
{
// make sure the destination image is of the right size:
assert((srcimg.cols/3)*2==dstimg.cols);
assert((srcimg.rows/3)*2==dstimg.rows);
CV_Assert((srcimg.cols / 3) * 2 == dstimg.cols);
CV_Assert((srcimg.rows / 3) * 2 == dstimg.rows);
resize(srcimg, dstimg, dstimg.size(), 0, 0, INTER_AREA);
}