1 #include<opencv2/opencv.hpp>
2 #include<iostream>
3 #include<cassert>
4 #include<vector>
5 #include<stdio.h>
6 #include <sys/time.h>
7
8 using namespace cv;
9 using namespace std;
10
11 int main(int argc, char* argv[])
12 {
13 int resize_height = 360;
14 int resize_width = 480;
15 Mat src = imread(argv[1], CV_LOAD_IMAGE_COLOR);
16 Mat dst;
17 //imshow("src", src);
18 double time = getTime_us();
19 resize(src, dst, Size(resize_width, resize_height), 0, 0, cv::INTER_LINEAR);
20 cout << "time:" << (getTime_us()-time)/1000 <<"ms"<< endl;
21 //imshow("dst", dst);
22
23 cout << "type:" << dst.type() << endl;
24 cout << "CV_8UC3:" << CV_8UC3 << endl;
25 cout << "depth:" << dst.depth() << endl;
26 cout << "channel:" << dst.channels() << endl;
27 cout << "rows:" << dst.rows << endl;
28 cout << "cols:" << dst.cols << endl;
29
30 cv::waitKey(0);
31 return 0;
32 }
1 #include<opencv2/opencv.hpp>
2 #include<iostream>
3 #include<cassert>
4 #include<vector>
5 #include<stdio.h>
6 #include <sys/time.h>
7
8 using namespace cv;
9 using namespace std;
10
11 int main(int argc, char* argv[])
12 {
13 int resize_height = 360;
14 int resize_width = 480;
15 Mat src = imread(argv[1], CV_LOAD_IMAGE_COLOR);
16 Mat dst;
17 //imshow("src", src);
18 double time = getTime_us();
19 resize(src, dst, Size(resize_width, resize_height), 0, 0, cv::INTER_LINEAR);
20 cout << "time:" << (getTime_us()-time)/1000 <<"ms"<< endl;
21 //imshow("dst", dst);
22
23 cout << "type:" << dst.type() << endl;
24 cout << "CV_8UC3:" << CV_8UC3 << endl;
25 cout << "depth:" << dst.depth() << endl;
26 cout << "channel:" << dst.channels() << endl;
27 cout << "rows:" << dst.rows << endl;
28 cout << "cols:" << dst.cols << endl;
29
30 cv::waitKey(0);
31 return 0;
32 }