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

initial commit

This commit is contained in:
Dmitriy Anisimov
2014-09-13 18:28:41 +04:00
parent cff5e3ee88
commit 1007c06d44
159 changed files with 118 additions and 5119 deletions
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

+1 -1
View File
@@ -23,7 +23,7 @@ int main(int argc, const char** argv)
{
cv::CommandLineParser cmd(argc, argv,
"{ c camera | | use camera }"
"{ f file | 768x576.avi | input video file }"
"{ f file | ../data/768x576.avi | input video file }"
"{ m method | mog | method (mog, mog2, gmg, fgd) }"
"{ h help | | print help message }");
+1 -1
View File
@@ -27,7 +27,7 @@ static Mat loadImage(const string& name)
int main(int argc, const char* argv[])
{
CommandLineParser cmd(argc, argv,
"{ image i | pic1.png | input image }"
"{ image i | ../data/pic1.png | input image }"
"{ template t | templ.png | template image }"
"{ full | | estimate scale and rotation }"
"{ gpu | | use gpu version }"
+2 -2
View File
@@ -15,12 +15,12 @@ static void help()
{
cout << "This program demonstrates line finding with the Hough transform." << endl;
cout << "Usage:" << endl;
cout << "./gpu-example-houghlines <image_name>, Default is pic1.png\n" << endl;
cout << "./gpu-example-houghlines <image_name>, Default is ../data/pic1.png\n" << endl;
}
int main(int argc, const char* argv[])
{
const string filename = argc >= 2 ? argv[1] : "pic1.png";
const string filename = argc >= 2 ? argv[1] : "../data/pic1.png";
Mat src = imread(filename, IMREAD_GRAYSCALE);
if (src.empty())
+1 -1
View File
@@ -44,7 +44,7 @@ App::App(int argc, const char* argv[])
exit(0);
}
String filename = argc == 2 ? argv[1] : "baboon.jpg";
String filename = argc == 2 ? argv[1] : "../data/baboon.jpg";
Mat img = imread(filename);
if (img.empty())
+19 -19
View File
@@ -281,8 +281,8 @@ TEST(meanShift)
TEST(SURF)
{
Mat src = imread(abspath("aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open aloeL.jpg");
Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open ../data/aloeL.jpg");
xfeatures2d::SURF surf;
vector<KeyPoint> keypoints;
@@ -311,8 +311,8 @@ TEST(SURF)
TEST(FAST)
{
Mat src = imread(abspath("aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open aloeL.jpg");
Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open ../data/aloeL.jpg");
vector<KeyPoint> keypoints;
@@ -336,8 +336,8 @@ TEST(FAST)
TEST(ORB)
{
Mat src = imread(abspath("aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open aloeL.jpg");
Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open ../data/aloeL.jpg");
ORB orb(4000);
vector<KeyPoint> keypoints;
@@ -1065,9 +1065,9 @@ TEST(equalizeHist)
TEST(Canny)
{
Mat img = imread(abspath("aloeL.jpg"), IMREAD_GRAYSCALE);
Mat img = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (img.empty()) throw runtime_error("can't open aloeL.jpg");
if (img.empty()) throw runtime_error("can't open ../data/aloeL.jpg");
Mat edges(img.size(), CV_8UC1);
@@ -1166,8 +1166,8 @@ TEST(gemm)
TEST(GoodFeaturesToTrack)
{
Mat src = imread(abspath("aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open aloeL.jpg");
Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open ../data/aloeL.jpg");
vector<Point2f> pts;
@@ -1191,11 +1191,11 @@ TEST(GoodFeaturesToTrack)
TEST(PyrLKOpticalFlow)
{
Mat frame0 = imread(abspath("rubberwhale1.png"));
if (frame0.empty()) throw runtime_error("can't open rubberwhale1.png");
Mat frame0 = imread(abspath("../data/rubberwhale1.png"));
if (frame0.empty()) throw runtime_error("can't open ../data/rubberwhale1.png");
Mat frame1 = imread(abspath("rubberwhale2.png"));
if (frame1.empty()) throw runtime_error("can't open rubberwhale2.png");
Mat frame1 = imread(abspath("../data/rubberwhale2.png"));
if (frame1.empty()) throw runtime_error("can't open ../data/rubberwhale2.png");
Mat gray_frame;
cvtColor(frame0, gray_frame, COLOR_BGR2GRAY);
@@ -1242,7 +1242,7 @@ TEST(PyrLKOpticalFlow)
TEST(FarnebackOpticalFlow)
{
const string datasets[] = {"rubberwhale", "basketball"};
const string datasets[] = {"../data/rubberwhale", "../data/basketball"};
for (size_t i = 0; i < sizeof(datasets)/sizeof(*datasets); ++i) {
for (int fastPyramids = 0; fastPyramids < 2; ++fastPyramids) {
for (int useGaussianBlur = 0; useGaussianBlur < 2; ++useGaussianBlur) {
@@ -1274,10 +1274,10 @@ TEST(FarnebackOpticalFlow)
TEST(MOG)
{
const std::string inputFile = abspath("768x576.avi");
const std::string inputFile = abspath("../data/768x576.avi");
cv::VideoCapture cap(inputFile);
if (!cap.isOpened()) throw runtime_error("can't open 768x576.avi");
if (!cap.isOpened()) throw runtime_error("can't open ../data/768x576.avi");
cv::Mat frame;
cap >> frame;
@@ -1327,10 +1327,10 @@ TEST(MOG)
TEST(MOG2)
{
const std::string inputFile = abspath("768x576.avi");
const std::string inputFile = abspath("../data/768x576.avi");
cv::VideoCapture cap(inputFile);
if (!cap.isOpened()) throw runtime_error("can't open 768x576.avi");
if (!cap.isOpened()) throw runtime_error("can't open ../data/768x576.avi");
cv::Mat frame;
cap >> frame;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB