warningx fixed under vs2008
This commit is contained in:
parent
0545e780f8
commit
998fab0ef5
modules/contrib/src
samples/cpp
brief_match_test.cppfitellipse.cppkmeans.cpplkdemo.cppminarea.cppstarter_video.cppvideo_homography.cpp
tests/cv/src
@ -1155,7 +1155,7 @@ ChamferMatcher::Matches* ChamferMatcher::Matching::matchTemplates(Mat& dist_img,
|
||||
* @param edge_img Edge image
|
||||
* @return a match object
|
||||
*/
|
||||
ChamferMatcher::Matches* ChamferMatcher::Matching::matchEdgeImage(Mat& edge_img, const ImageRange& range, float orientation_weight, int max_matches, float min_match_distance)
|
||||
ChamferMatcher::Matches* ChamferMatcher::Matching::matchEdgeImage(Mat& edge_img, const ImageRange& range, float orientation_weight, int /*max_matches*/, float /*min_match_distance*/)
|
||||
{
|
||||
CV_Assert(edge_img.channels()==1);
|
||||
|
||||
|
@ -44,7 +44,7 @@ void matches2points(const vector<DMatch>& matches, const vector<KeyPoint>& kpts_
|
||||
|
||||
}
|
||||
|
||||
double match(const vector<KeyPoint>& kpts_train, const vector<KeyPoint>& kpts_query, DescriptorMatcher& matcher,
|
||||
double match(const vector<KeyPoint>& /*kpts_train*/, const vector<KeyPoint>& /*kpts_query*/, DescriptorMatcher& matcher,
|
||||
const Mat& train, const Mat& query, vector<DMatch>& matches)
|
||||
{
|
||||
|
||||
@ -106,7 +106,7 @@ int main(int ac, char ** av)
|
||||
cout << "matching with BruteForceMatcher<HammingLUT>" << endl;
|
||||
BruteForceMatcher<HammingLUT> matcher;
|
||||
vector<DMatch> matches_lut;
|
||||
float lut_time = match(kpts_1, kpts_2, matcher, desc_1, desc_2, matches_lut);
|
||||
float lut_time = (float)match(kpts_1, kpts_2, matcher, desc_1, desc_2, matches_lut);
|
||||
cout << "done BruteForceMatcher<HammingLUT> matching. took " << lut_time << " seconds" << endl;
|
||||
|
||||
cout << "matching with BruteForceMatcher<Hamming>" << endl;
|
||||
|
@ -59,7 +59,7 @@ int main( int argc, char** argv )
|
||||
|
||||
// Define trackbar callback functon. This function find contours,
|
||||
// draw it and approximate it by ellipses.
|
||||
void processImage(int h, void*)
|
||||
void processImage(int /*h*/, void*)
|
||||
{
|
||||
vector<vector<Point> > contours;
|
||||
Mat bimage = image >= sliderPos;
|
||||
|
@ -14,7 +14,7 @@ void help()
|
||||
"./kmeans\n" << endl;
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
int main( int /*argc*/, char** /*argv*/ )
|
||||
{
|
||||
const int MAX_CLUSTERS = 5;
|
||||
Scalar colorTab[] =
|
||||
|
@ -26,7 +26,7 @@ void help()
|
||||
Point2f pt;
|
||||
bool addRemovePt = false;
|
||||
|
||||
void onMouse( int event, int x, int y, int flags, void* param )
|
||||
void onMouse( int event, int x, int y, int /*flags*/, void* /*param*/ )
|
||||
{
|
||||
if( event == CV_EVENT_LBUTTONDOWN )
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ void help()
|
||||
|
||||
|
||||
|
||||
int main( int argc, char** argv )
|
||||
int main( int /*argc*/, char** /*argv*/ )
|
||||
{
|
||||
Mat img(500, 500, CV_8UC3);
|
||||
RNG& rng = theRNG();
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
* starter_video.cpp
|
||||
*
|
||||
* Created on: Nov 23, 2010
|
||||
* Author: Ethan Rublee
|
||||
*
|
||||
* A starter sample for using opencv, get a video stream and display the images
|
||||
* easy as CV_PI right?
|
||||
*/
|
||||
* starter_video.cpp
|
||||
*
|
||||
* Created on: Nov 23, 2010
|
||||
* Author: Ethan Rublee
|
||||
*
|
||||
* A starter sample for using opencv, get a video stream and display the images
|
||||
* easy as CV_PI right?
|
||||
*/
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@ -16,7 +16,7 @@ using namespace std;
|
||||
|
||||
//hide the local functions in an anon namespace
|
||||
namespace {
|
||||
void help(char** av) {
|
||||
void help(char** av) {
|
||||
cout << "\nThis program justs gets you started reading images from video\n"
|
||||
"Usage:\n./" << av[0] << " <video device number>\n"
|
||||
<< "\tThis is a starter sample, to get you up and going in a copy pasta fashion\n"
|
||||
@ -24,9 +24,9 @@ void help(char** av) {
|
||||
<< "\tTo find the video device number, try ls /dev/video* \n"
|
||||
<< "\tYou may also pass a video file, like my_vide.avi instead of a device number"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
int process(VideoCapture& capture) {
|
||||
int process(VideoCapture& capture) {
|
||||
string window_name = "video | q or esc to quit";
|
||||
cout << "press q or esc to quit" << endl;
|
||||
namedWindow(window_name, CV_WINDOW_KEEPRATIO); //resizable window;
|
||||
@ -47,7 +47,7 @@ int process(VideoCapture& capture) {
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* video_homography.cpp
|
||||
*
|
||||
* Created on: Oct 18, 2010
|
||||
* Author: erublee
|
||||
*/
|
||||
* video_homography.cpp
|
||||
*
|
||||
* Created on: Oct 18, 2010
|
||||
* Author: erublee
|
||||
*/
|
||||
|
||||
#include <opencv2/calib3d/calib3d.hpp>
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
@ -29,10 +29,10 @@ void help(char **av)
|
||||
|
||||
namespace
|
||||
{
|
||||
void drawMatchesRelative(const vector<KeyPoint>& train, const vector<KeyPoint>& query,
|
||||
void drawMatchesRelative(const vector<KeyPoint>& train, const vector<KeyPoint>& query,
|
||||
std::vector<cv::DMatch>& matches, Mat& img, const vector<unsigned char>& mask = vector<
|
||||
unsigned char> ())
|
||||
{
|
||||
{
|
||||
for (int i = 0; i < (int)matches.size(); i++)
|
||||
{
|
||||
if (mask.empty() || mask[i])
|
||||
@ -46,46 +46,46 @@ void drawMatchesRelative(const vector<KeyPoint>& train, const vector<KeyPoint>&
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Takes a descriptor and turns it into an xy point
|
||||
void keypoints2points(const vector<KeyPoint>& in, vector<Point2f>& out)
|
||||
{
|
||||
//Takes a descriptor and turns it into an xy point
|
||||
void keypoints2points(const vector<KeyPoint>& in, vector<Point2f>& out)
|
||||
{
|
||||
out.clear();
|
||||
out.reserve(in.size());
|
||||
for (size_t i = 0; i < in.size(); ++i)
|
||||
{
|
||||
out.push_back(in[i].pt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Takes an xy point and appends that to a keypoint structure
|
||||
void points2keypoints(const vector<Point2f>& in, vector<KeyPoint>& out)
|
||||
{
|
||||
//Takes an xy point and appends that to a keypoint structure
|
||||
void points2keypoints(const vector<Point2f>& in, vector<KeyPoint>& out)
|
||||
{
|
||||
out.clear();
|
||||
out.reserve(in.size());
|
||||
for (size_t i = 0; i < in.size(); ++i)
|
||||
{
|
||||
out.push_back(KeyPoint(in[i], 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Uses computed homography H to warp original input points to new planar position
|
||||
void warpKeypoints(const Mat& H, const vector<KeyPoint>& in, vector<KeyPoint>& out)
|
||||
{
|
||||
//Uses computed homography H to warp original input points to new planar position
|
||||
void warpKeypoints(const Mat& H, const vector<KeyPoint>& in, vector<KeyPoint>& out)
|
||||
{
|
||||
vector<Point2f> pts;
|
||||
keypoints2points(in, pts);
|
||||
vector<Point2f> pts_w(pts.size());
|
||||
Mat m_pts_w(pts_w);
|
||||
perspectiveTransform(Mat(pts), m_pts_w, H);
|
||||
points2keypoints(pts_w, out);
|
||||
}
|
||||
}
|
||||
|
||||
//Converts matching indices to xy points
|
||||
void matches2points(const vector<KeyPoint>& train, const vector<KeyPoint>& query,
|
||||
//Converts matching indices to xy points
|
||||
void matches2points(const vector<KeyPoint>& train, const vector<KeyPoint>& query,
|
||||
const std::vector<cv::DMatch>& matches, std::vector<cv::Point2f>& pts_train,
|
||||
std::vector<Point2f>& pts_query)
|
||||
{
|
||||
{
|
||||
|
||||
pts_train.clear();
|
||||
pts_query.clear();
|
||||
@ -104,12 +104,12 @@ void matches2points(const vector<KeyPoint>& train, const vector<KeyPoint>& query
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void resetH(Mat&H)
|
||||
{
|
||||
void resetH(Mat&H)
|
||||
{
|
||||
H = Mat::eye(3, 3, CV_32FC1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(int ac, char ** av)
|
||||
@ -210,7 +210,7 @@ int main(int ac, char ** av)
|
||||
train_kpts = query_kpts;
|
||||
query_desc.copyTo(train_desc);
|
||||
}
|
||||
char key = waitKey(2);
|
||||
char key = (char)waitKey(2);
|
||||
switch (key)
|
||||
{
|
||||
case 'l':
|
||||
|
@ -222,7 +222,7 @@ void CV_ChessboardDetectorTest::run_batch( const string& filename )
|
||||
Size pattern_size = expected.size();
|
||||
|
||||
vector<Point2f> v;
|
||||
bool result;
|
||||
bool result = false;
|
||||
switch( pattern )
|
||||
{
|
||||
case CHESSBOARD:
|
||||
|
Loading…
x
Reference in New Issue
Block a user