Move border type constants and Moments class to core module
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/imgproc/imgproc_c.h"
|
||||
|
||||
#define ASD_INTENSITY_SET_PIXEL(pointer, qq) {(*pointer) = (unsigned char)qq;}
|
||||
|
||||
|
@@ -483,8 +483,8 @@ namespace colormap
|
||||
}
|
||||
// Turn into a BGR matrix into its grayscale representation.
|
||||
if(src.type() == CV_8UC3)
|
||||
cvtColor(src.clone(), src, CV_BGR2GRAY);
|
||||
cvtColor(src.clone(), src, CV_GRAY2BGR);
|
||||
cvtColor(src.clone(), src, COLOR_BGR2GRAY);
|
||||
cvtColor(src.clone(), src, COLOR_GRAY2BGR);
|
||||
// Apply the ColorMap.
|
||||
LUT(src, _lut, _dst);
|
||||
}
|
||||
|
@@ -832,7 +832,7 @@ void LBPH::predict(InputArray _src, int &minClass, double &minDist) const {
|
||||
minDist = DBL_MAX;
|
||||
minClass = -1;
|
||||
for(size_t sampleIdx = 0; sampleIdx < _histograms.size(); sampleIdx++) {
|
||||
double dist = compareHist(_histograms[sampleIdx], query, CV_COMP_CHISQR);
|
||||
double dist = compareHist(_histograms[sampleIdx], query, HISTCMP_CHISQR);
|
||||
if((dist < minDist) && (dist < _threshold)) {
|
||||
minDist = dist;
|
||||
minClass = _labels.at<int>((int) sampleIdx);
|
||||
|
@@ -118,7 +118,7 @@ void cv::generateColors( std::vector<Scalar>& colors, size_t count, size_t facto
|
||||
// Convert the colors set to Lab space.
|
||||
// Distances between colors in this space correspond a human perception.
|
||||
Mat lab;
|
||||
cvtColor( bgr, lab, CV_BGR2Lab);
|
||||
cvtColor( bgr, lab, COLOR_BGR2Lab);
|
||||
|
||||
// Subsample colors from the generated set so that
|
||||
// to maximize the minimum distances between each other.
|
||||
@@ -128,7 +128,7 @@ void cv::generateColors( std::vector<Scalar>& colors, size_t count, size_t facto
|
||||
|
||||
// Convert subsampled colors back to RGB
|
||||
Mat bgr_subset;
|
||||
cvtColor( lab_subset, bgr_subset, CV_Lab2BGR );
|
||||
cvtColor( lab_subset, bgr_subset, COLOR_Lab2BGR );
|
||||
|
||||
CV_Assert( bgr_subset.total() == count );
|
||||
for( size_t i = 0; i < count; i++ )
|
||||
|
@@ -47,7 +47,6 @@
|
||||
#include "opencv2/features2d.hpp"
|
||||
#include "opencv2/objdetect.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/imgproc/imgproc_c.h"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
||||
#include "opencv2/core/private.hpp"
|
||||
|
@@ -770,7 +770,7 @@ Mat cv::SpinImageModel::packRandomScaledSpins(bool separateScale, size_t xCount,
|
||||
int endx = (x + 1) * sz + x;
|
||||
|
||||
Mat color;
|
||||
cvtColor(spins[pos++], color, CV_GRAY2BGR);
|
||||
cvtColor(spins[pos++], color, COLOR_GRAY2BGR);
|
||||
Mat roi = result(Range(starty, endy), Range(startx, endx));
|
||||
color.copyTo(roi);
|
||||
}
|
||||
|
@@ -367,8 +367,8 @@ void StereoVar::operator ()( const Mat& left, const Mat& right, Mat& disp )
|
||||
// Preprocessing
|
||||
Mat leftgray, rightgray;
|
||||
if (left.type() != CV_8UC1) {
|
||||
cvtColor(left, leftgray, CV_BGR2GRAY);
|
||||
cvtColor(right, rightgray, CV_BGR2GRAY);
|
||||
cvtColor(left, leftgray, COLOR_BGR2GRAY);
|
||||
cvtColor(right, rightgray, COLOR_BGR2GRAY);
|
||||
} else {
|
||||
left.copyTo(leftgray);
|
||||
right.copyTo(rightgray);
|
||||
|
Reference in New Issue
Block a user