diff --git a/src/finish.cpp b/src/finish.cpp index 3b6b406..fb397a9 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -546,24 +546,27 @@ namespace hdrplus } } - void finish::process(std::string burstPath, cv::Mat mergedBayer,int refIdx){ + void finish::process(const hdrplus::burst& burst_images){ // copy mergedBayer to rawReference std::cout<<"finish pipeline start ..."<refIdx = refIdx; - this->burstPath = burstPath; - // this->mergedBayer = processMergedMat(mergedBayer,CV_16UC1);//loadFromCSV("merged.csv", CV_16UC1); + this->refIdx = burst_images.reference_image_idx; + // this->burstPath = burstPath; + // std::cout<<"processMerged:"<mergedBayer = processMergedMat(mergedB,CV_16UC1);//loadFromCSV("merged.csv", CV_16UC1); // std::cout<<"processMerged:"<mergedBayer); this->mergedBayer = loadFromCSV("merged.csv", CV_16UC1); std::cout<<"csv:"<mergedBayer); - load_rawPathList(burstPath); + // show20_20(this->mergedBayer); + // load_rawPathList(burstPath); // read in ref img - bayer_image* ref = new bayer_image(rawPathList[refIdx]); + // bayer_image* ref = new bayer_image(rawPathList[refIdx]); + bayer_image* ref = new bayer_image(burst_images.bayer_images[this->refIdx]); cv::Mat processedRefImage = postprocess(ref->libraw_processor,params.rawpyArgs); std::cout<<"size ref: "<refIdx]); mergedImg->libraw_processor->imgdata.rawdata.raw_image = (uint16_t*)this->mergedBayer.data; // copy_mat_16U_3(mergedImg->libraw_processor->imgdata.rawdata.raw_image,this->mergedBayer); cv::Mat processedMerge = postprocess(mergedImg->libraw_processor,params.rawpyArgs); diff --git a/src/hdrplus_pipeline.cpp b/src/hdrplus_pipeline.cpp index e064487..906ac07 100644 --- a/src/hdrplus_pipeline.cpp +++ b/src/hdrplus_pipeline.cpp @@ -34,23 +34,12 @@ void hdrplus_pipeline::run_pipeline( \ // Run merging merge_module.process( burst_images, alignments ); - cv::Mat mergedBayer = burst_images.merged_bayer_image.clone(); - - std::cout<