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

View File

@@ -1126,7 +1126,7 @@ void CascadeClassifier::detectMultiScale( const Mat& image, std::vector<Rect>& o
if( grayImage.channels() > 1 )
{
Mat temp;
cvtColor(grayImage, temp, CV_BGR2GRAY);
cvtColor(grayImage, temp, COLOR_BGR2GRAY);
grayImage = temp;
}
@@ -1149,7 +1149,7 @@ void CascadeClassifier::detectMultiScale( const Mat& image, std::vector<Rect>& o
continue;
Mat scaledImage( scaledImageSize, CV_8U, imageBuffer.data );
resize( grayImage, scaledImage, scaledImageSize, 0, 0, CV_INTER_LINEAR );
resize( grayImage, scaledImage, scaledImageSize, 0, 0, INTER_LINEAR );
int yStep;
if( getFeatureType() == cv::FeatureEvaluator::HOG )

View File

@@ -1,4 +1,5 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <deque>
#include <algorithm>

View File

@@ -1,4 +1,5 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "_latentsvm.h"
#include "_lsvm_resizeimg.h"

View File

@@ -42,7 +42,8 @@
/* Haar features calculation */
#include "precomp.hpp"
#include "stdio.h"
#include "opencv2/imgproc/imgproc_c.h"
#include <stdio.h>
#if CV_SSE2
# if 1 /*!CV_SSE4_1 && !CV_SSE4_2*/

View File

@@ -1,4 +1,5 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "_lsvmparser.h"
#include "_lsvm_matching.h"

View File

@@ -483,7 +483,7 @@ void ColorGradientPyramid::pyrDown()
if (!mask.empty())
{
Mat next_mask;
resize(mask, next_mask, size, 0.0, 0.0, CV_INTER_NN);
resize(mask, next_mask, size, 0.0, 0.0, INTER_NEAREST);
mask = next_mask;
}
@@ -635,17 +635,11 @@ static void quantizedNormals(const Mat& src, Mat& dst, int distance_threshold,
{
dst = Mat::zeros(src.size(), CV_8U);
IplImage src_ipl = src;
IplImage* ap_depth_data = &src_ipl;
IplImage dst_ipl = dst;
IplImage* dst_ipl_ptr = &dst_ipl;
IplImage** m_dep = &dst_ipl_ptr;
const unsigned short * lp_depth = src.ptr<ushort>();
unsigned char * lp_normals = dst.ptr<uchar>();
unsigned short * lp_depth = (unsigned short *)ap_depth_data->imageData;
unsigned char * lp_normals = (unsigned char *)m_dep[0]->imageData;
const int l_W = ap_depth_data->width;
const int l_H = ap_depth_data->height;
const int l_W = src.cols;
const int l_H = src.rows;
const int l_r = 5; // used to be 7
const int l_offset0 = -l_r - l_r * l_W;
@@ -662,7 +656,7 @@ static void quantizedNormals(const Mat& src, Mat& dst, int distance_threshold,
for (int l_y = l_r; l_y < l_H - l_r - 1; ++l_y)
{
unsigned short * lp_line = lp_depth + (l_y * l_W + l_r);
const unsigned short * lp_line = lp_depth + (l_y * l_W + l_r);
unsigned char * lp_norm = lp_normals + (l_y * l_W + l_r);
for (int l_x = l_r; l_x < l_W - l_r - 1; ++l_x)
@@ -725,7 +719,7 @@ static void quantizedNormals(const Mat& src, Mat& dst, int distance_threshold,
++lp_norm;
}
}
cvSmooth(m_dep[0], m_dep[0], CV_MEDIAN, 5, 5);
medianBlur(dst, dst, 5);
}
class DepthNormalPyramid : public QuantizedPyramid
@@ -772,12 +766,12 @@ void DepthNormalPyramid::pyrDown()
// In this case, NN-downsample the quantized image
Mat next_normal;
Size size(normal.cols / 2, normal.rows / 2);
resize(normal, next_normal, size, 0.0, 0.0, CV_INTER_NN);
resize(normal, next_normal, size, 0.0, 0.0, INTER_NEAREST);
normal = next_normal;
if (!mask.empty())
{
Mat next_mask;
resize(mask, next_mask, size, 0.0, 0.0, CV_INTER_NN);
resize(mask, next_mask, size, 0.0, 0.0, INTER_NEAREST);
mask = next_mask;
}
}
@@ -805,7 +799,7 @@ bool DepthNormalPyramid::extractTemplate(Template& templ) const
temp.setTo(1 << i, local_mask);
bitwise_and(temp, normal, temp);
// temp is now non-zero at pixels in the mask with quantized orientation i
distanceTransform(temp, distances[i], CV_DIST_C, 3);
distanceTransform(temp, distances[i], DIST_C, 3);
}
// Count how many features taken for each label

View File

@@ -45,8 +45,6 @@
#include "opencv2/objdetect.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/core_c.h"
#include "opencv2/core/utility.hpp"

View File

@@ -1,4 +1,5 @@
#include "precomp.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "_lsvm_resizeimg.h"
#include <stdio.h>
#include <assert.h>