Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Hi. Could use some help with a script to convert an image that is taken with a 360 degree camera into a rectilinear panoramic image. From a command line, the following ImageMagick command works wonderfully
I'd like to be able to create a web page, which runs that command on-the-fly to my original image and displays to the user the converted panoramic image. I believe I can do this using a php script, but I'm a relative newbie to writing php. Wonder if someone might be able to provide a simple php example script that would do this, that I can learn from??
If on Unix/Mac (or Windows w/Cygwin), you might like to see my script, fisheye2pano at the link below. It has a few more features, but is slower, since it was built before distort depolar.
Note that both distort depolar and my script require either a nadir (downlooking) or zenith (uplooking) fisheye view.
fmw42 wrote:
If on Unix/Mac (or Windows w/Cygwin), you might like to see my script, fisheye2pano at the link below. It has a few more features, but is slower, since it was built before distort depolar.
Thanks for this. I had actually tried your script previously. It's a bit too slow however for the "real-time" conversion I was hoping for. I will try playing around with the PHP exec option. Though I've never done any PHP scripting either, so I was hoping someone might be able to provide me with a basic script which I could learn from and build on possibly.
You can replace the input and output images with variables containing the image paths and lots of other things.
Check my website out below - I would use Imagemagick with the command line as the example above rather than Imagick which can be built into php. Imagick might be quicker but can be a pain to get working and is lacking in a lot of the options.
<?php
echo "<pre>";
system("type -a convert");
echo "</pre>";
?>
Most likely it will be at either /usr/bin/convert or /usr/local/bin/convert. Also you may find more than one version of PHP on shared servers. So you need to be sure you are using the correct one.
<?php
exec("/usr/bin/convert -version",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>
<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
foreach($out as $text)
{echo "$text<br>";}
?>