Libpano



  • Hello, everyone. I'm thinking about this: a software, that will use libpano (or hugin + libpano) to stitch photos together, making some sort of panorama.
    I am using Qt 5.4 and Ubuntu. I installed libpano packages from repository. Also, I installed libpano from sources.
    And now I have no idea of how to use it. Any ideas? I look forward to each project exmple or documentation.



  • i was thinking about something similar...
    and i decided to do using the console tools, not free time yet so i dont have anything, but seems the easier way (my opinion)

    if you get something that you can publish, i would be interested in, i wanted build a panorama capturer usign a couple of cheap webcams.



  • Moved thread to 3rd party. This question is not about Qt, it is about Libpano.

    I'd start with looking at the documentation and examples of that library.



  • [quote author="bnogal" date="1422951690"]and i decided to do using the console tools[/quote]

    What tools did you try? Those tools let you stitch photos or they only mark similar regions?



  • Well, i didnt start yet, just some minutes of google searching before i start anything.

    http://wiki.panotools.org/Panorama_scripting_in_a_nutshell

    My plan is to capture pictures from webcams (cheap version) using Qt, show a "preview" without merging them, and when the capture is done, call these scripts to do the magic, then show the result.

    I guess it exists already... or can be done just by scripts, but i need a nice interface so people can use on an event i am organizing.



  • I wrote a simple program to merge two photos:

    @void Viewer::slotStitch()
    {
    QString projectName("template.pto");
    /** Creating Hugin project /
    QString input;
    input.append("pto_gen -o ").append(projectName).append(" ");
    for (int i = 0; i < images.size(); i++)
    {
    input.append(images.at(i));
    input.append(" ");
    }
    system(input.toStdString().c_str());
    input.clear();
    /
    * Generating control points /
    input.append("cpfind --multirow -o ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    /
    * Cleanup /
    input.append("celeste_standalone -i ").append(projectName).append(" -o ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    input.append("ptoclean -v --output ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    /
    * Vertical lines search /
    input.append("linefind -o ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    /
    * Optimise /
    input.append("autooptimiser -a -l -s -m -o ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    /
    * Optimise /
    input.append("pto_var --opt y,p,r -o ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    input.append("autooptimiser -n -o ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    /
    * Flatten /
    input.append("autooptimiser -n -o ").append(projectName).append(" ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    system("pano_modify --canvas=AUTO --crop=AUTO -o template.pto template.pto");
    /
    * Remap /
    input.append("nona -m TIFF_m -o template ").append(projectName);
    system(input.toStdString().c_str());
    input.clear();
    /
    * Final stitch */
    system("enblend -o template.tif template0000.tif template0001.tif");
    }@

    It looks like hell, but works.



  • Finally, I managed to install all the stuff and now figuring out how it works... Anyway, the process on Ubuntu 14.04 LTS is this:

    • qt-sdk

    • libpano

    • hugin-tools

    • enblend

    Right now I included libpano like this: LIBS += -lpano13
    Method panoJPEGRead is working, looking forward to create a panorama image using libpano.
    Must include libpano headers like this:
    extern "C" {
    #include <pano13/PTcommon.h>
    }


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.