Remove all using directives for STL namespace and members
Made all STL usages explicit to be able automatically find all usages of particular class or function.
This commit is contained in:
@@ -150,7 +150,7 @@ int main()
|
||||
|
||||
|
||||
ChessBoardGenerator::ChessBoardGenerator(const Size& _patternSize) : sensorWidth(32), sensorHeight(24),
|
||||
squareEdgePointsNum(200), min_cos(sqrt(2.f)*0.5f), cov(0.5),
|
||||
squareEdgePointsNum(200), min_cos(std::sqrt(2.f)*0.5f), cov(0.5),
|
||||
patternSize(_patternSize), rendererResolutionMultiplier(4), tvec(Mat::zeros(1, 3, CV_32F))
|
||||
{
|
||||
Rodrigues(Mat::eye(3, 3, CV_32F), rvec);
|
||||
@@ -275,7 +275,7 @@ Mat cv::ChessBoardGenerator::generageChessBoard(const Mat& bg, const Mat& camMat
|
||||
|
||||
Mat cv::ChessBoardGenerator::operator ()(const Mat& bg, const Mat& camMat, const Mat& distCoeffs, vector<Point2f>& corners) const
|
||||
{
|
||||
cov = min(cov, 0.8);
|
||||
cov = std::min(cov, 0.8);
|
||||
double fovx, fovy, focalLen;
|
||||
Point2d principalPoint;
|
||||
double aspect;
|
||||
@@ -296,7 +296,7 @@ Mat cv::ChessBoardGenerator::operator ()(const Mat& bg, const Mat& camMat, const
|
||||
Point3f pb1, pb2;
|
||||
generateBasis(pb1, pb2);
|
||||
|
||||
float cbHalfWidth = static_cast<float>(norm(p) * sin( min(fovx, fovy) * 0.5 * CV_PI / 180));
|
||||
float cbHalfWidth = static_cast<float>(norm(p) * sin( std::min(fovx, fovy) * 0.5 * CV_PI / 180));
|
||||
float cbHalfHeight = cbHalfWidth * patternSize.height / patternSize.width;
|
||||
|
||||
vector<Point3f> pts3d(4);
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
int maskSize0 = CV_DIST_MASK_5;
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
static void help()
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include "opencv2/nonfree/nonfree.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
static void help()
|
||||
|
@@ -57,7 +57,7 @@ static void readTrainFilenames( const string& filename, string& dirName, vector<
|
||||
|
||||
size_t pos = filename.rfind('\\');
|
||||
char dlmtr = '\\';
|
||||
if (pos == String::npos)
|
||||
if (pos == string::npos)
|
||||
{
|
||||
pos = filename.rfind('/');
|
||||
dlmtr = '/';
|
||||
|
@@ -25,14 +25,14 @@ int main(int, char* [])
|
||||
curr.convertTo(curr64f, CV_64F);
|
||||
|
||||
Point2d shift = phaseCorrelate(prev64f, curr64f, hann);
|
||||
double radius = cv::sqrt(shift.x*shift.x + shift.y*shift.y);
|
||||
double radius = std::sqrt(shift.x*shift.x + shift.y*shift.y);
|
||||
|
||||
if(radius > 5)
|
||||
{
|
||||
// draw a circle and line indicating the shift direction...
|
||||
Point center(curr.cols >> 1, curr.rows >> 1);
|
||||
cv::circle(frame, center, (int)radius, cv::Scalar(0, 255, 0), 3, CV_AA);
|
||||
cv::line(frame, center, Point(center.x + (int)shift.x, center.y + (int)shift.y), cv::Scalar(0, 255, 0), 3, CV_AA);
|
||||
circle(frame, center, (int)radius, Scalar(0, 255, 0), 3, CV_AA);
|
||||
line(frame, center, Point(center.x + (int)shift.x, center.y + (int)shift.y), Scalar(0, 255, 0), 3, CV_AA);
|
||||
}
|
||||
|
||||
imshow("phase shift", frame);
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
static void help()
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
const char* helphelp =
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
/**
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include "opencv2/nonfree/features2d.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
void readme();
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include "opencv2/calib3d/calib3d.hpp"
|
||||
#include "opencv2/nonfree/features2d.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
void readme();
|
||||
|
@@ -18,8 +18,8 @@ void detectAndDisplay( Mat frame );
|
||||
|
||||
/** Global variables */
|
||||
//-- Note, either copy these two files from opencv/data/haarscascades to your current folder, or change these locations
|
||||
String face_cascade_name = "haarcascade_frontalface_alt.xml";
|
||||
String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
|
||||
string face_cascade_name = "haarcascade_frontalface_alt.xml";
|
||||
string eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
|
||||
CascadeClassifier face_cascade;
|
||||
CascadeClassifier eyes_cascade;
|
||||
string window_name = "Capture - Face detection";
|
||||
|
@@ -17,8 +17,8 @@ using namespace cv;
|
||||
void detectAndDisplay( Mat frame );
|
||||
|
||||
/** Global variables */
|
||||
String face_cascade_name = "lbpcascade_frontalface.xml";
|
||||
String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
|
||||
string face_cascade_name = "lbpcascade_frontalface.xml";
|
||||
string eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
|
||||
CascadeClassifier face_cascade;
|
||||
CascadeClassifier eyes_cascade;
|
||||
string window_name = "Capture - Face detection";
|
||||
|
Reference in New Issue
Block a user