You are not logged in.

> The forum rules have been updated. Please take a moment to read them.


#1 2012-06-05 23:36:57

Duffer
Member
Registered: 2012-05-02
Posts: 22

PHP Script to convert Equatorial image to image pyramid

Hi there, I am looking for a PHP script that will take an Equatorial image (360deg X 180deg) and convert it into and Image Pyramid structure sutable for using with krPano viewer.

Has any one seen or tried this? Does it exist?

Thanks.

Offline

 

#2 2012-06-06 00:02:34

mediavets
Moderator
From: Isleham, Cambridgeshire, UK.
Registered: 2007-11-14
Posts: 9714
Website

Re: PHP Script to convert Equatorial image to image pyramid

Why does it have to be a PHP script?


Andrew Stephens
Nikon D40, Nikkor 10.5mm fisheye, Sigma 8mm f3.5 fisheye, Nikkor 18-55/50/35mm lenses, Nodal Ninja 5 Lite, Nodal Ninja 4 with R-D16, Agno's MrotatorTCS short.
Nikon P5100, CP5000, CP995, FC-E8, WC-E63,WC-E68, TC-E2, Kaidan Kiwi 995, Bophoto pano bracket, Agno's MrotatorA.
Merlin/Orion robotic pano head + Papywizard on Nokia 770/N800/N810 and Windows 8/XP/2K.

Offline

 

#3 2012-06-06 05:18:24

Duffer
Member
Registered: 2012-05-02
Posts: 22

Re: PHP Script to convert Equatorial image to image pyramid

No does not have to be php but I am looking for a server based solutions that will run on a *nix based system.

Offline

 

#4 2012-06-08 08:42:49

Duffer
Member
Registered: 2012-05-02
Posts: 22

Re: PHP Script to convert Equatorial image to image pyramid

OK Some progress.

Code:

<?
    $path = "/test/test.jpg";
    //$preview = str_replace("http://dev.circularworlds.com/",$_DOCUMENT_ROOT ,$path);
    $preview = $_SERVER['DOCUMENT_ROOT'] .$path;
    //$preview = "http://dev.circularworlds.com/" .$path;
    $thisfile = str_replace(".jpg","_b.jpg",$preview);
    echo "Shell exec is run by " .exec('whoami') . "<br>";
    //we check if the cubes are not already created, if not then, call krtransform
    if (!file_exists($thisfile)) {
        echo "Workign on ". $preview. "<br>";
        $output = array();
        $return_var = 0;
        
        if(file_exists($_SERVER['DOCUMENT_ROOT']."/test/krpanotools/ktransform")){
            $cmd = $_SERVER['DOCUMENT_ROOT']."/test/krpanotools/ktransform cube6 $preview $preview -jpegoptimize";
            echo $cmd. "<br>";
            exec($cmd, $output, $return_var);
        }else{
            echo "ktransform not found <br> ";
        }
        print_r($output);
    }else{
        echo "File already there";
        
    }
?>

But sadly this is not workign from me.
If I try to run ktransform from the comand line I get the error "/lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by ...."

If I run /lib/libc.so.6 it shows that my server runs version 2.3.6 :-(

I guess since krpano does not build a version of krtransform for older versions of GLIBC I am out of luck... at least on this server setup (Media Temple GS)

Can any one offer any advise?

Offline

 

#5 2012-06-08 20:16:29

Duffer
Member
Registered: 2012-05-02
Posts: 22

Re: PHP Script to convert Equatorial image to image pyramid

SUCCESS! Figured since I could not update the GLIBC on the server I was testing on I would try older versions of PanoTools.

Had to try a few befor I found one that worked..
ktransform 1.0.1 (krpano.com - krpanotools 1.0.6)

For actual production I am sure I will have more control of server side, but Figured I would post this here incase any others are looking for a simmilar solution!

Any other ideas or solutions more than welcome!!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson