#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgcodecs/imgcodecs.hpp"
#include "opencv2/features2d.hpp"
int main(int argc, char** argv){
cv::Mat in_img;
if(argc < 3){
printf("opencv_test [input files] [output files]\n");
exit(0);
}
in_img = cv::imread(argv[1], 1);
cv::imwrite(argv[2], in_img);
return(0);
}
# Declare the variable SOURCE_CORDE and enter the value opencv_test.
# Can be overwritten with cmake -D SOURCE_CODE = (source name)
set(SOURCE_CODE opencv_test CACHE NAME "Target object name")
cmake_minimum_required(VERSION 2.8)
project( ${SOURCE_CODE} )
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
add_executable( ${SOURCE_CODE} ${SOURCE_CODE}.cpp )
target_link_libraries( ${SOURCE_CODE} ${OpenCV_LIBS} )
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |