You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

1

Sunday, September 6th 2015, 10:27pm

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: http://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

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Tuesday, September 15th 2015, 1:03am

Try first without any scripts that fly blind and do it all in DOS where you can see the output..
or a shell will also work..
also don't forget to register your krpanotools first under the user that will be running your tiles.. that's a common failure for scripters.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Douglas Rhiner

Intermediate

  • "Douglas Rhiner" started this thread

Posts: 137

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

3

Sunday, September 20th 2015, 1:19am

Sachagriffin,

Thanks for the pointers!
It was pilot error on my part. Got this clipping along just fine now.

Similar threads