#include #include #include #include #include #include #include #include #include #include #include #include #include "hdr.h" int main( int argc, char** argv ) { if (argc != 7) { return -1; } std::string outputPath = argv[1]; std::string tmpFilePath = argv[2]; std::vector times; times.push_back((double)(atoi(argv[3])) / 1000000000.0); times.push_back((double)(atoi(argv[5])) / 1000000000.0); std::vector paths; paths.push_back(std::string(argv[4])); paths.push_back(std::string(argv[6])); std::vector images; images.resize(2); printf("Start Decode"); #pragma omp parallel for num_threads(2) for (int idx = 0; idx < 2; idx++) { images[idx] = cv::imread(paths[idx].c_str()); } printf("End Decode"); cv::Mat rgb; printf("Start MakeHDR3"); makeHdr(times, images, rgb); printf("End MakeHDR3"); std::vector params; params.push_back(cv::IMWRITE_JPEG_QUALITY); params.push_back(100); if (cv::imwrite(outputPath.c_str(), rgb, params)) { printf("End HDR3"); return JNI_TRUE; } return 0; }