Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cv.h>
- #include <highgui.h>
- #include <iostream>
- using namespace cv;
- int
- main( int argc, char** argv )
- {
- if( argc != 4 ) {
- std::cerr << "Usage: " << argv[0] << " <InputImage> <OutputImage> up:3.0" << std::endl; return EXIT_FAILURE; }
- float up;
- {
- char* src_img = argv[1];
- Mat src_img;
- src_img = imread( imageName, 1 );
- if( argc != 3 || !up )
- {
- printf( " No image data \n " );
- return -1;
- }
- resize(src_img, dst_img, dst_img.size(), cv::INTER_CUBIC);//画像のサイズを変更 imwrite( argv[2], gray_image );
- namedWindow( src_img, CV_WINDOW_AUTOSIZE );
- namedWindow( "dst_img", CV_WINDOW_AUTOSIZE );
- imshow( src_img, image );
- imshow( "dst_img", dst_img );
- waitKey(0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement