Makepano Multires Python wowes....

  • I’m having a heck of a time getting krpanotools makepano to “work” via Python scripting.

    I’m performing this all under OS X 10.10.4, Python 2.7.6


    My scripting “watches” a folder for new equis and process accordingly.

    Two paths are set; One to the equi to be processed (originalPath) and one pointing to the destination directory (newPath)


    I can create the new destination directory via:

    os.makedirs(panoPath)


    I can create cube faces via:

    os.system(krpanotools + " sphere2cube cube " + originalPath + " " + newPath + ".jpg -config=convert.config")


    And then create a preview-strip via:

    os.system(krpanotools + " makepreview " + faces + " -cs")


    I can then remove the original equi via:

    os.remove(originalPath)


    So, everything I just described fires off - no issue.


    However, when it comes to creating the tiles, no go.

    If I remove the sphere2cube, makepreview and os.remove steps and insert the code below in its place nothing happens except for the new directory creation; i.e. os.makedirs(panoPath).

    Obviously this is pilot/coder error on my part and not a krpanotools error since I can seem to get cube faces and preview strips created.
    I'm pretty sure that "paths" are not the issue since they seem to be working just fine when invoking sphere2cube( but I could be in error ).

    I am using the krpanotools that came with the 1.19-pr3 version of KRPano.

    I’m looking to produce just images and tile directory structure. No html, no xml.


    ANY insight as to what I’m doing wrong would be very much appreciated!


    CODE I’M TRYING TO UTILIZE:


    My scripting for “makepano” is the following:

    os.system(krpanotools + " makepano -config=multires.config tilepath=" + newPath + “the.tiles/[mres_c/]l%Al/%Av/l%Al[_c]_%Av_%Ah.jpg previewpath=" + newPath + “the.tiles/preview.jpg customimage[mobile].path=" + newPath + “the.tiles/mobile_%s.jpg " + originalPath)


    My multires.config file contains:


    # Multi-Resolution Panos

    # Skin with Default Buttons

    # Documentation: https://krpano.com/tools/kmakemultires/config?version=118

    # krpano 1.18


    # basic settings

    panotype=autodetect

    hfov=360


    # output

    flash=false

    html5=false


    # convert spherical/cylindrical to cubical

    converttocube=true

    converttocubelimit=360x45


    # multiresolution settings

    multires=true

    tilesize=512

    levels=auto

    levelstep=2

    maxsize=auto

    maxcubesize=auto

    leveldownload=auto


    # preview pano settings

    preview=true

    graypreview=false

    previewsmooth=25


    # generate smaller mobile images

    customimage[mobile].size=1024

    customimage[mobile].imagesettings=jpegquality=85 jpegsubsamp=444 jpegoptimize=true

    customimage[mobile].xml=<mobile>[NL][TAB]<cube url="[PATH]" />[NL]</mobile>


    # xml output

    xml=false


    # html output/template

    html=false


    # compression settings (note - no jpegoptimize for extreme big panos, this could cause too much memory usage during building)

    jpegquality=82

    jpegsubsamp=422

    jpegoptimize=false

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!