1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Warning fixes continued

This commit is contained in:
Andrey Kamaev
2012-06-09 15:00:04 +00:00
parent f6b451c607
commit f2d3b9b4a1
127 changed files with 6298 additions and 6277 deletions
+8 -8
View File
@@ -60,9 +60,9 @@ protected:
void CV_DrawingTest::run( int )
{
Mat testImg, valImg;
const string name = "drawing/image.jpg";
const string fname = "drawing/image.jpg";
string path = ts->get_data_path(), filename;
filename = path + name;
filename = path + fname;
draw( testImg );
@@ -415,30 +415,30 @@ class CV_FillConvexPolyTest : public cvtest::BaseTest
{
public:
CV_FillConvexPolyTest() {}
~CV_FillConvexPolyTest() {}
~CV_FillConvexPolyTest() {}
protected:
void run(int)
{
vector<Point> line1;
vector<Point> line2;
line1.push_back(Point(1, 1));
line1.push_back(Point(5, 1));
line1.push_back(Point(5, 8));
line1.push_back(Point(1, 8));
line2.push_back(Point(2, 2));
line2.push_back(Point(10, 2));
line2.push_back(Point(10, 16));
line2.push_back(Point(2, 16));
Mat gray0(10,10,CV_8U, Scalar(0));
fillConvexPoly(gray0, line1, Scalar(255), 8, 0);
int nz1 = countNonZero(gray0);
fillConvexPoly(gray0, line2, Scalar(0), 8, 1);
int nz2 = countNonZero(gray0)/255;
CV_Assert( nz1 == 40 && nz2 == 0 );
}
};
+8 -8
View File
@@ -53,7 +53,7 @@ string fourccToString(int fourcc)
{
return format("%c%c%c%c", fourcc & 255, (fourcc >> 8) & 255, (fourcc >> 16) & 255, (fourcc >> 24) & 255);
}
const VideoFormat g_specific_fmt_list[] =
{
VideoFormat("avi", CV_FOURCC('X', 'V', 'I', 'D')),
@@ -63,11 +63,11 @@ const VideoFormat g_specific_fmt_list[] =
VideoFormat("mkv", CV_FOURCC('X', 'V', 'I', 'D')),
VideoFormat("mkv", CV_FOURCC('M', 'P', 'E', 'G')),
VideoFormat("mkv", CV_FOURCC('M', 'J', 'P', 'G')),
VideoFormat("mov", CV_FOURCC('m', 'p', '4', 'v')),
VideoFormat()
};
}
class CV_HighGuiTest : public cvtest::BaseTest
@@ -246,7 +246,7 @@ void CV_HighGuiTest::VideoTest(const string& dir, const cvtest::VideoFormat& fmt
if (!img)
break;
frames.push_back(Mat(img).clone());
if (writer == 0)
@@ -393,7 +393,7 @@ void CV_HighGuiTest::SpecificVideoTest(const string& dir, const cvtest::VideoFor
{
string ext = fmt.ext;
int fourcc = fmt.fourcc;
string fourcc_str = cvtest::fourccToString(fourcc);
const string video_file = "video_" + fourcc_str + "." + ext;
@@ -403,7 +403,7 @@ void CV_HighGuiTest::SpecificVideoTest(const string& dir, const cvtest::VideoFor
if (!writer.isOpened())
{
// call it repeatedly for easier debugging
VideoWriter writer(video_file, fourcc, 25, frame_size, true);
VideoWriter writer2(video_file, fourcc, 25, frame_size, true);
ts->printf(ts->LOG, "Creating a video in %s...\n", video_file.c_str());
ts->printf(ts->LOG, "Cannot create VideoWriter object with codec %s.\n", fourcc_str.c_str());
ts->set_failed_test_info(ts->FAIL_MISMATCH);
@@ -412,7 +412,7 @@ void CV_HighGuiTest::SpecificVideoTest(const string& dir, const cvtest::VideoFor
const size_t IMAGE_COUNT = 30;
vector<Mat> images;
for( size_t i = 0; i < IMAGE_COUNT; ++i )
{
string file_path = format("%s../python/images/QCIF_%02d.bmp", dir.c_str(), i);
@@ -432,7 +432,7 @@ void CV_HighGuiTest::SpecificVideoTest(const string& dir, const cvtest::VideoFor
if (img.at<Vec3b>(k, l) == Vec3b::all(0))
img.at<Vec3b>(k, l) = Vec3b(0, 255, 0);
else img.at<Vec3b>(k, l) = Vec3b(0, 0, 255);
resize(img, img, frame_size, 0.0, 0.0, INTER_CUBIC);
images.push_back(img);