This is a non-official Qt C++ implementation of the algorithm SPD-MEF in paper "Robust Multi-Exposure Image Fusion: A Structural Patch Decomposition Approach".
This implementation can only process GRAY scale images. This means if you input a series of 3-channel images, what you get is only a fused GRAY(1-channel) image.
- Build Environment This project is based on QT c++ and opencv3.4.16 and boost1.65.1, so make sure you have built this environment first.
- Generate the Fused Image
In
main.cpp
, change the path to your own image folder. Pay attention: the path must be end with '\'. Make sure your input is a folder.
- DoLinearAddAndMean(): N images each pixel add respectively then divide by N
- DoMertensMEF(): exposure fusion implementation
- DoSPDMEF(): SPD-MEF implementation
- DoGaussMEF(): N images fusion by calculating each pixel gauss weight
- GetImagesMat(): read images
- GetImagesGrayMat(): convert color images to gray images, maybe you should change this
- AdjustImageSize(): addjust images size
- MatchHistograms(): c++ implementation of matchHistograms function in skimage
- image_max_worh_size_:set the max size of width or height
- patch_size_: SPDMEF patch size
- step_size_: SPDMEF step
- Ts_: SPDMEF Ts
- Tm_: SPDMEF Tm
- global_gaussian_: SPDMEF σg
- local_gaussian_: SPDMEF σl
- float p_: SPDMEF p