适配android

main
Matthew 9 months ago
parent 4184f36f99
commit 339ba786f9

@ -28,9 +28,13 @@ find_package( OpenCV 4 REQUIRED )
include_directories( BEFORE ${OpenCV_INCLUDE_DIRS} ) include_directories( BEFORE ${OpenCV_INCLUDE_DIRS} )
message(STATUS "Found OpenCV ${OpenCV_INCLUDE_DIRS} ${OpenCV_LIBS}") message(STATUS "Found OpenCV ${OpenCV_INCLUDE_DIRS} ${OpenCV_LIBS}")
# LibRaw-cmake include_directories( BEFORE "/home/matthew/jniLibs/include/")
find_library(LIBRAW_LIBRARY 0.20 NAMES raw raw_r) link_directories(/home/matthew/jniLibs/lib)
include_directories( BEFORE "/usr/local/include/") list(APPEND CMAKE_LIBRARY_PATH /home/matthew/jniLibs/lib/)
# LibRaw-cmake 0.20
# find_library(LIBRAW_LIBRARY raw /home/matthew/jniLibs/lib/)
message(STATUS "Found LIBRAW_LIBRARY to be ${LIBRAW_LIBRARY}" ) message(STATUS "Found LIBRAW_LIBRARY to be ${LIBRAW_LIBRARY}" )
# Exiv2 # Exiv2
@ -55,15 +59,15 @@ set( src_files
# Build runtime load dynamic shared library # Build runtime load dynamic shared library
# https://cmake.org/cmake/help/latest/command/add_library.html # https://cmake.org/cmake/help/latest/command/add_library.html
add_library(${PROJECT_NAME} SHARED ${src_files} ) add_library(${PROJECT_NAME} STATIC ${src_files} )
# and link it # and link it
# https://cmake.org/cmake/help/v3.0/command/target_link_libraries.html # https://cmake.org/cmake/help/v3.0/command/target_link_libraries.html
# use public because our .h / .hpp file include opencv .h / .hpp file # use public because our .h / .hpp file include opencv .h / .hpp file
target_link_libraries(${PROJECT_NAME} PUBLIC target_link_libraries(${PROJECT_NAME} PUBLIC
${OpenCV_LIBS} ${OpenCV_LIBS}
${LIBRAW_LIBRARY} # ${LIBRAW_LIBRARY}
exiv2lib raw exiv2lib lcms2
OpenMP::OpenMP_CXX ) OpenMP::OpenMP_CXX )
# example # example

@ -24,7 +24,7 @@ Platform: Ubuntu 20.x
step 4: `sudo make install` step 4: `sudo make install`
3. Install `exiv2` : `apt install libexiv2-dev` 3. Install `exiv2`(exiv2-0.27.3.tar.gz) : `apt install libexiv2-dev`
4. Run CMake to build 4. Run CMake to build

@ -0,0 +1,44 @@
#!/bin/bash
export INSTALL_DIR="`pwd`/jni/hdrplus"
export NDK=/usr/local/ndk/android-ndk-r25c
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export ABI=arm64-v8a
export MINSDKVERSION=24
export JNILIBS_DIR=/home/matthew/jniLibs
# export EXPAT_DIR=/home/matthew/exiv2ForAndroid-master/expat-2.2.2/jni/expat
mkdir -p $INSTALL_DIR
rm -rf build
mkdir -p build
cd build
#SET(EXPAT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/expat/include )
#SET(EXPAT_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/expat/lib/${ANDROID_ABI} )
cmake \
-DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=$ABI \
-DANDROID_NDK_ABI_NAME=$ABI \
-DANDROID_PLATFORM=android-$MINSDKVERSION \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DBUILD_SHARED_LIBS=OFF \
-DENABLE_EXAMPLES=OFF \
-DHDRPLUS_NO_DETAILED_OUTPUT=1 \
-DCMAKE_PREFIX_PATH=$JNILIBS_DIR/lib/$ABI/cmake \
-DOpenCV_DIR=$JNILIBS_DIR/opencv-mobile-4.9.0-android/sdk/native/jni \
-DLIBRAW_INCLUDE_DIR=$JNILIBS_DIR/include \
-DLIBRAW_DIR=$JNILIBS_DIR/lib/cmake \
-DJPEG_INCLUDE_DIR=$JNILIBS_DIR/include \
-DJPEG_LIBRARIES=$JNILIBS_DIR/lib/$ABI \
-Dexiv2_INCLUDE_DIR=$JNILIBS_DIR/include \
-Dexiv2_DIR=$JNILIBS_DIR/lib/cmake/exiv2 \
-DLCMS2_INCLUDE_DIR=$JNILIBS_DIR/include \
-DLCMS2_LIBRARY=$JNILIBS_DIR/lib/$ABI \
-DLCMS2_LIBRARIES=lcms2 \
..
make
# make install

@ -12,6 +12,8 @@ class burst
{ {
public: public:
explicit burst( const std::string& burst_path, const std::string& reference_image_path ); explicit burst( const std::string& burst_path, const std::string& reference_image_path );
explicit burst(const std::vector<std::string>& burst_paths, int reference_image_index);
~burst() = default; ~burst() = default;
// Reference image index in the array // Reference image index in the array

@ -4,6 +4,7 @@
#include <string> #include <string>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <iostream>
#include <unordered_map> #include <unordered_map>
#include <hdrplus/bayer_image.h> #include <hdrplus/bayer_image.h>
#include <dirent.h> #include <dirent.h>
@ -63,7 +64,7 @@ class finish
// finish pipeline func // finish pipeline func
// void process(std::string burstPath, cv::Mat mergedBayer,int refIdx); // void process(std::string burstPath, cv::Mat mergedBayer,int refIdx);
void process(const hdrplus::burst& burst_images); void process(const hdrplus::burst& burst_images, cv::Mat& finalOutputImage);
// replace Mat a with Mat b // replace Mat a with Mat b
void copy_mat_16U(cv::Mat& A, cv::Mat B); void copy_mat_16U(cv::Mat& A, cv::Mat B);

@ -19,6 +19,7 @@ class hdrplus_pipeline
public: public:
void run_pipeline( const std::string& burst_path, const std::string& reference_image_path ); void run_pipeline( const std::string& burst_path, const std::string& reference_image_path );
void run_pipeline( const std::vector<std::string>& burst_paths, int reference_image_index, cv::Mat& finalImg );
hdrplus_pipeline() = default; hdrplus_pipeline() = default;
~hdrplus_pipeline() = default; ~hdrplus_pipeline() = default;
}; };

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <string> #include <string>
#include <unordered_map>
#include <memory> // std::shared_ptr #include <memory> // std::shared_ptr
#include <opencv2/opencv.hpp> // all opencv header #include <opencv2/opencv.hpp> // all opencv header
#include <libraw/libraw.h> #include <libraw/libraw.h>

@ -1,5 +1,6 @@
#include <string> #include <string>
#include <cstdio> #include <cstdio>
#include <iostream>
#include <utility> // std::pair, std::makr_pair #include <utility> // std::pair, std::makr_pair
#include <memory> // std::shared_ptr #include <memory> // std::shared_ptr
#include <stdexcept> // std::runtime_error #include <stdexcept> // std::runtime_error

@ -101,4 +101,79 @@ burst::burst( const std::string& burst_path, const std::string& reference_image_
#endif #endif
} }
burst::burst( const std::vector<std::string>& bayer_image_paths, int reference_image_index )
{
// Number of images
num_images = bayer_image_paths.size();
// Find reference image path in input directory
// reference image path need to be absolute path
reference_image_idx = -1;
if ( reference_image_index > 0 && reference_image_index < bayer_image_paths.size() )
{
reference_image_idx = reference_image_index;
}
if ( reference_image_idx == -1 )
{
throw std::runtime_error("Error reference image index is out of range " );
}
#ifndef NDEBUG
for ( const auto& bayer_image_path_i : bayer_image_paths )
{
printf("%s::%s Find image %s\n", \
__FILE__, __func__, bayer_image_path_i.c_str());
}
printf("%s::%s reference image idx %d\n", \
__FILE__, __func__, reference_image_idx );
#endif
// Get source bayer image
// Downsample original bayer image by 2x2 box filter
for ( const auto& bayer_image_path_i : bayer_image_paths )
{
bayer_images.emplace_back( bayer_image_path_i );
}
// Pad information
int tile_size_bayer = 32;
int padding_top = tile_size_bayer / 2;
int padding_bottom = tile_size_bayer / 2 + \
( (bayer_images[ 0 ].height % tile_size_bayer) == 0 ? \
0 : tile_size_bayer - bayer_images[ 0 ].height % tile_size_bayer );
int padding_left = tile_size_bayer / 2;
int padding_right = tile_size_bayer / 2 + \
( (bayer_images[ 0 ].width % tile_size_bayer) == 0 ? \
0 : tile_size_bayer - bayer_images[ 0 ].width % tile_size_bayer );
padding_info_bayer = std::vector<int>{ padding_top, padding_bottom, padding_left, padding_right };
// Pad bayer image
for ( const auto& bayer_image_i : bayer_images )
{
cv::Mat bayer_image_pad_i;
cv::copyMakeBorder( bayer_image_i.raw_image, \
bayer_image_pad_i, \
padding_top, padding_bottom, padding_left, padding_right, \
cv::BORDER_REFLECT );
// cv::Mat use internal reference count
bayer_images_pad.emplace_back( bayer_image_pad_i );
grayscale_images_pad.emplace_back( box_filter_kxk<uint16_t, 2>( bayer_image_pad_i ) );
}
#ifndef NDEBUG
printf("%s::%s Pad bayer image from (%d, %d) -> (%d, %d)\n", \
__FILE__, __func__, \
bayer_images[ 0 ].height, \
bayer_images[ 0 ].width, \
bayer_images_pad[ 0 ].size().height, \
bayer_images_pad[ 0 ].size().width );
printf("%s::%s pad top %d, buttom %d, left %d, right %d\n", \
__FILE__, __func__, \
padding_top, padding_bottom, padding_left, padding_right );
#endif
}
} // namespace hdrplus } // namespace hdrplus

@ -1,3 +1,4 @@
#include <iostream>
#include <opencv2/opencv.hpp> // all opencv header #include <opencv2/opencv.hpp> // all opencv header
#include "hdrplus/finish.h" #include "hdrplus/finish.h"
#include "hdrplus/utility.h" #include "hdrplus/utility.h"
@ -554,23 +555,29 @@ namespace hdrplus
myfile.close(); myfile.close();
} }
void finish::process(const hdrplus::burst& burst_images){ void finish::process(const hdrplus::burst& burst_images, cv::Mat& finalOutputImage){
// copy mergedBayer to rawReference // copy mergedBayer to rawReference
std::cout<<"finish pipeline start ..."<<std::endl; std::cout<<"finish pipeline start ..."<<std::endl;
// save merged Image value // save merged Image value
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
writeCSV("merged.csv",burst_images.merged_bayer_image); writeCSV("merged.csv",burst_images.merged_bayer_image);
#endif
this->refIdx = burst_images.reference_image_idx; this->refIdx = burst_images.reference_image_idx;
// this->burstPath = burstPath; // this->burstPath = burstPath;
// std::cout<<"processMerged:"<<std::endl; // std::cout<<"processMerged:"<<std::endl;
// show20_20(mergedB); // show20_20(mergedB);
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
// this->mergedBayer = processMergedMat(mergedB,CV_16UC1);//loadFromCSV("merged.csv", CV_16UC1); // this->mergedBayer = processMergedMat(mergedB,CV_16UC1);//loadFromCSV("merged.csv", CV_16UC1);
// std::cout<<"processMerged:"<<std::endl; // std::cout<<"processMerged:"<<std::endl;
// show20_20(this->mergedBayer); // show20_20(this->mergedBayer);
this->mergedBayer = loadFromCSV("merged.csv", CV_16UC1); this->mergedBayer = loadFromCSV("merged.csv", CV_16UC1);
#else
this->mergedBayer = processMergedMat(burst_images.merged_bayer_image, CV_16UC1);
// std::cout<<"processMerged:"<<std::endl;
#endif
// std::cout<<"csv:"<<std::endl; // std::cout<<"csv:"<<std::endl;
// show20_20(this->mergedBayer); // show20_20(this->mergedBayer);
// load_rawPathList(burstPath); // load_rawPathList(burstPath);
@ -585,7 +592,8 @@ namespace hdrplus
std::cout<<"size ref: "<<processedRefImage.rows<<"*"<<processedRefImage.cols<<std::endl; std::cout<<"size ref: "<<processedRefImage.rows<<"*"<<processedRefImage.cols<<std::endl;
// write reference image // write reference image
if(params.flags["writeReferenceImage"]){ #ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeReferenceImage"]){
std::cout<<"writing reference img ..."<<std::endl; std::cout<<"writing reference img ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(processedRefImage.clone()); cv::Mat outputImg = convert16bit2_8bit_(processedRefImage.clone());
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
@ -593,8 +601,10 @@ namespace hdrplus
cv::imwrite("processedRef.jpg", outputImg); cv::imwrite("processedRef.jpg", outputImg);
// cv::waitKey(0); // cv::waitKey(0);
} }
#endif
// write gamma reference // write gamma reference
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeGammaReference"]){ if(params.flags["writeGammaReference"]){
std::cout<<"writing Gamma reference img ..."<<std::endl; std::cout<<"writing Gamma reference img ..."<<std::endl;
cv::Mat outputImg = gammasRGB(processedRefImage.clone(),true); cv::Mat outputImg = gammasRGB(processedRefImage.clone(),true);
@ -602,6 +612,7 @@ namespace hdrplus
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("processedRefGamma.jpg", outputImg); cv::imwrite("processedRefGamma.jpg", outputImg);
} }
#endif
// get the bayer_image of the merged image // get the bayer_image of the merged image
// bayer_image* mergedImg = new bayer_image(rawPathList[refIdx]); // bayer_image* mergedImg = new bayer_image(rawPathList[refIdx]);
@ -611,14 +622,17 @@ namespace hdrplus
cv::Mat processedMerge = postprocess(mergedImg->libraw_processor,params.rawpyArgs); cv::Mat processedMerge = postprocess(mergedImg->libraw_processor,params.rawpyArgs);
// write merged image // write merged image
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeMergedImage"]){ if(params.flags["writeMergedImage"]){
std::cout<<"writing Merged img ..."<<std::endl; std::cout<<"writing Merged img ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(processedMerge.clone()); cv::Mat outputImg = convert16bit2_8bit_(processedMerge.clone());
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("mergedImg.jpg", outputImg); cv::imwrite("mergedImg.jpg", outputImg);
} }
#endif
// write gamma merged image // write gamma merged image
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeMergedImage"]){ if(params.flags["writeMergedImage"]){
std::cout<<"writing Gamma Merged img ..."<<std::endl; std::cout<<"writing Gamma Merged img ..."<<std::endl;
cv::Mat outputImg = gammasRGB(processedMerge.clone(),true); cv::Mat outputImg = gammasRGB(processedMerge.clone(),true);
@ -626,6 +640,7 @@ namespace hdrplus
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("mergedImgGamma.jpg", outputImg); cv::imwrite("mergedImgGamma.jpg", outputImg);
} }
#endif
// step 5. HDR tone mapping // step 5. HDR tone mapping
// processedImage, gain, shortExposure, longExposure, fusedExposure = localToneMap(burstPath, processedImage, options) // processedImage, gain, shortExposure, longExposure, fusedExposure = localToneMap(burstPath, processedImage, options)
@ -635,27 +650,40 @@ namespace hdrplus
localToneMap(processedMerge, params.options,shortExposure,longExposure,fusedExposure,gain); localToneMap(processedMerge, params.options,shortExposure,longExposure,fusedExposure,gain);
std::cout<<"gain="<< gain<<std::endl; std::cout<<"gain="<< gain<<std::endl;
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeShortExposure"]){ if(params.flags["writeShortExposure"]){
std::cout<<"writing ShortExposure img ..."<<std::endl; std::cout<<"writing ShortExposure img ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(shortExposure); cv::Mat outputImg = convert16bit2_8bit_(shortExposure);
cv::imwrite("shortg.jpg", outputImg); cv::imwrite("shortg.jpg", outputImg);
} }
#endif
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeLongExposure"]){ if(params.flags["writeLongExposure"]){
std::cout<<"writing LongExposure img ..."<<std::endl; std::cout<<"writing LongExposure img ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(longExposure); cv::Mat outputImg = convert16bit2_8bit_(longExposure);
cv::imwrite("longg.jpg", outputImg); cv::imwrite("longg.jpg", outputImg);
} }
#endif
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeFusedExposure"]){ if(params.flags["writeFusedExposure"]){
std::cout<<"writing FusedExposure img ..."<<std::endl; std::cout<<"writing FusedExposure img ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(fusedExposure); cv::Mat outputImg = convert16bit2_8bit_(fusedExposure);
cv::imwrite("fusedg.jpg", outputImg); cv::imwrite("fusedg.jpg", outputImg);
} }
#endif
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeLTMImage"]){ if(params.flags["writeLTMImage"]){
std::cout<<"writing LTMImage ..."<<std::endl; std::cout<<"writing LTMImage ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(processedMerge.clone()); cv::Mat outputImg = convert16bit2_8bit_(processedMerge.clone());
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("ltmGain.jpg", outputImg); cv::imwrite("ltmGain.jpg", outputImg);
} }
#endif
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeLTMGamma"]){ if(params.flags["writeLTMGamma"]){
std::cout<<"writing LTMImage Gamma ..."<<std::endl; std::cout<<"writing LTMImage Gamma ..."<<std::endl;
cv::Mat outputImg = gammasRGB(processedMerge.clone(),true); cv::Mat outputImg = gammasRGB(processedMerge.clone(),true);
@ -663,6 +691,7 @@ namespace hdrplus
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("ltmGain_gamma.jpg", outputImg); cv::imwrite("ltmGain_gamma.jpg", outputImg);
} }
#endif
} }
// step 6 GTM: contrast enhancement / global tone mapping // step 6 GTM: contrast enhancement / global tone mapping
@ -675,22 +704,31 @@ namespace hdrplus
processedMerge = gammasRGB(processedMerge.clone(),true); processedMerge = gammasRGB(processedMerge.clone(),true);
std::cout<<"-- Apply Gamma"<<std::endl; std::cout<<"-- Apply Gamma"<<std::endl;
if(params.flags["writeGTMImage"]){ #ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeGTMImage"]) {
std::cout<<"writing GTMImage ..."<<std::endl; std::cout<<"writing GTMImage ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(processedMerge.clone()); cv::Mat outputImg = convert16bit2_8bit_(processedMerge.clone());
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("GTM_gamma.jpg", outputImg); cv::imwrite("GTM_gamma.jpg", outputImg);
} }
#endif
// Step 7: sharpen // Step 7: sharpen
cv::Mat processedImage = sharpenTriple(processedMerge.clone(), params.tuning, params.options); finalOutputImage = sharpenTriple(processedMerge.clone(), params.tuning, params.options);
cv::Mat& processedImage = finalOutputImage;
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeFinalImage"]){ if(params.flags["writeFinalImage"]){
std::cout<<"writing FinalImage ..."<<std::endl; std::cout<<"writing FinalImage ..."<<std::endl;
cv::Mat outputImg = convert16bit2_8bit_(processedImage.clone()); cv::Mat outputImg = convert16bit2_8bit_(processedImage.clone());
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("FinalImage.jpg", outputImg); cv::imwrite("FinalImage.jpg", outputImg);
} }
#endif
// write final ref // write final ref
#ifndef HDRPLUS_NO_DETAILED_OUTPUT
if(params.flags["writeReferenceFinal"]){ if(params.flags["writeReferenceFinal"]){
std::cout<<"writing Final Ref Image ..."<<std::endl; std::cout<<"writing Final Ref Image ..."<<std::endl;
if(params.options.ltmGain){ if(params.options.ltmGain){
@ -706,8 +744,10 @@ namespace hdrplus
processedRefImage = sharpenTriple(processedRefImage.clone(), params.tuning, params.options); processedRefImage = sharpenTriple(processedRefImage.clone(), params.tuning, params.options);
cv::Mat outputImg = convert16bit2_8bit_(processedRefImage.clone()); cv::Mat outputImg = convert16bit2_8bit_(processedRefImage.clone());
cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR); cv::cvtColor(outputImg, outputImg, cv::COLOR_RGB2BGR);
cv::imwrite("FinalReference.jpg", outputImg); cv::imwrite("FinalReference.jpg", outputImg);
} }
#endif
// End of finishing // End of finishing
} }

@ -28,7 +28,26 @@ void hdrplus_pipeline::run_pipeline( \
merge_module.process( burst_images, alignments ); merge_module.process( burst_images, alignments );
// Run finishing // Run finishing
finish_module.process( burst_images); cv::Mat finalImg;
finish_module.process( burst_images, finalImg);
}
void hdrplus_pipeline::run_pipeline( \
const std::vector<std::string>& burst_paths, \
int reference_image_index, cv::Mat& finalImg )
{
// Create burst of images
burst burst_images( burst_paths, reference_image_index );
std::vector<std::vector<std::vector<std::pair<int, int>>>> alignments;
// Run align
align_module.process( burst_images, alignments );
// Run merging
merge_module.process( burst_images, alignments );
// Run finishing
finish_module.process( burst_images, finalImg);
} }
} // namespace hdrplus } // namespace hdrplus

@ -1,3 +1,4 @@
#include <iostream>
#include <opencv2/opencv.hpp> // all opencv header #include <opencv2/opencv.hpp> // all opencv header
#include <hdrplus/params.h> #include <hdrplus/params.h>

Loading…
Cancel
Save