cnr-isti-vclab / piccante

The hottest High Dynamic Range (HDR) Library

Home Page:http://vcg.isti.cnr.it/piccante/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can‘t merge hdr image

straywriter opened this issue · comments

There was a problem when I used your program to synthesize these three pictures,

image:

window1
window2
window3

code:

#define PIC_DISABLE_OPENGL

#include "piccante.hpp"

int main(int argc, char *argv[])
{
    printf("Adding file names to the merger... ");
    pic::HDRMerger merger;
    // merger.addFile("../data/input/stack_alignment/IMG_4209.jpg");
    // merger.addFile("../data/input/stack_alignment/IMG_4210.jpg");
    // merger.addFile("../data/input/stack_alignment/IMG_4211.jpg");
    merger.addFile("../data/input/Multi-exposure/window1.jpg");
    merger.addFile("../data/input/Multi-exposure/window2.jpg");
    merger.addFile("../data/input/Multi-exposure/window3.jpg");
    printf("Ok\n");

    merger.update(pic::CW_DEB97, pic::HRD_LOG, pic::HA_MTB, NULL);

    printf("Merging LDR images into an HDR image... ");
    pic::Image *imgOut = merger.execute(NULL);
    printf("Ok\n");

    if (imgOut != NULL)
    {
        if (imgOut->isValid())
        {
            imgOut->Write("../data/output/image_aligned.hdr");
            pic::Image *imgTmo = pic::ReinhardTMO::executeGlobal1(imgOut, NULL);
            imgTmo->Write("../data/output/image_aligned_tmo1.png", pic::LT_NOR_GAMMA);
            delete imgTmo;
            delete imgOut;
        }
    }

    return 0;
}

result:
image_aligned_tmo1

The problem is that these images do not have EXIF information, therefore the program cannot extract shutter speed, ISO value, and F-Number. In order to generate radiance maps, you need to provide this information manually if they are not present in the EXIF file. Alternatively, you may merge them using exposure fusion that creates a tone-mapped image.
Note that the third image is gray-scale and it should not be used.

thank you