Talk:Smartblend on Mac
Copy from google cache
Running Smartblend with PTGui Natively on OS X
Here we are going to discuss how to configure PTGui to run Smartblend natively on OS X
About Smartblend and PTGui
Smartblend is a panoramic image blending application designed to be used as a plug-in for panorama stitching applications. It is capable of dealing with moving objects and parallax better than other blending solutions.
For example, when you photograph a bridge with heavy traffic, in most cases you are going to end up with ghosts of partially rendered cars. In other situations, you might end up with people's hands or legs cut off in your panorama. Smartblend was designed to keep objects together, or entirely remove them from the picture.
PTGui is an advanced photo stitching software, which can be configured to use Smartblend as a blending application.
Smartblend on OS X
Smartblend is currently only available for the Windows platform. The general consensus is that it cannot be run natively on OS X.
However, there is a workaround. It does not require you to install Windows or run any virtual machine. The solution is based on the 100% free and open-source Wine.
Note: My solution is for Intel Macs only. It does not work on PowerPC hardware.
Wine is a community-developed application for running Windows applications on Unix-like computers with Intel x86 processor. It was developed completely independently from Microsoft, and contains no code from Windows. Wine implements a very thin compatibility layer on top of Linux, BSD, or OS X, which allows Smartblend to execute natively on an Intel Mac.
Note that Wine is completely legal and has nothing to do with Microsoft. It does not require that you purchase Microsoft Windows. Wine is a very small and lightweight package. It is not an operating system, just a thin interface that translates Windows operations into OS X. It is a lot faster than VMWare or Parallels, and costs no money at all.
The following instructions come with no warranty of any kind. Use it at your own risk. I shall not be responsible for any damages that may occur while following these steps.
Here are the steps to install Smartblend on OS X with the purpose of using it from PTGui.
- <a href="http://www.kronenberg.org/darwine/">Download Darwine</a>, a special build of Wine designed for Mac OS X. (The regular version of Wine was built for Linux).
- Open the Darwine-x86-1.0.1.dmg disk image, and drag and drop the Darwine folder into Applications. That is all you need to install this distribution of Wine.
- <a href="http://wiki.panotools.org/wiki/images/3/37/Smartblend_1_2_5.zip">Download Smartblend</a> from <a href="http://wiki.panotools.org/SmartBlend">http://wiki.panotools.org/SmartBlend</a>.
- Double click on the Smartblend_1_2_5.zip file to uncompress it.
- Optionally, rename "Smartblend_1_2_5.zip Folder" to something simpler, such as Smartblend, and move it to a convenient location where you are going to find it. For example, /Users/yourname/Smartblend. This is not necessary, as you can have it anywhere on your hard drive, as long as you know its location.
Congratulations, you have installed Smartblend on OS X!
Note that you could use other Wine distributions. However, Darwine is so easy to install that it does not require any Linux expertise. If you use a different version of Wine, you know who you are and what you are doing.
The next step is to let PTGui know where Smartblend is located. Note that you should use the OS X version of PTGui.
- Run PTGui. From the menu bar, select PTGui -> Preferences...
- Switch to the Plugins tab, scroll down to the bottom, and specify the following settings:
Smartblend application: /Applications/Darwine/Wine.bundle/Contents/bin/wine(Note: in the second line you must specify the actual path where smartblend.exe is located. Ignore the red warning that tells you it only works on Windows.)
Command line parameters: /Users/yourname/Smartblend/smartblend.exe
- Close the preferences dialog, and switch PTGui into advanced mode by clicking the "Advanced >>" button in the main window.
- Before you create your panorama, switch to the Create Panorama tab, and select Blend using: Smartblend plugin.
You can do all this with the evaluation version of PTGui, just to make sure it works for you before you purchase. Smartblend and Darwine are free of charge.
What About Hugin?
Hugin is a free panorama stitching program. It is much slower than PTGui, but produces very good images. However, it is currently not compatible with Smartblend, as far as I know.
I have attempted to get it to work. The first hurdle was that Hugin passes parameters that Smartblend does not understand. Therefore I wrote a shell script to filter them out:
#!/bin/bash # SMARTBLEND=/Users/tamas/Smartblend/smartblend.exe SMARTBLENDARGS=`echo $* \ | sed "s/--compression NONE //" \ | sed "s/--compression PACKBITS //" \ | sed "s/--compression LZW //" \ | sed "s/--compression DEFLATE //" \ | sed "s/-f *[0-9][0-9]*x[0-9][0-9]* //" \ | sed "s/-l *[0-9][0-9]* //"` /Applications/Darwine/Wine.bundle/Contents/bin/wine $SMARTBLEND $SMARTBLENDARGS exit 0
(Credit: <a href="http://email@example.com/msg00256.html">Bob Bright</a>)
I saved this to a file called smartblend, and made it executable by running "chmod +x smartblend" from the terminal.
This way Hugin was successfully executing Smartblend. However, this did not work out, because the latest version of Smartblend requires the -xofs -yofs parameters, otherwise the output is complete garbage. I was unable to convince Hugin to generate the offsets. Smartblend currently only works with applications that support it. Someone else might have better luck, or Hugin might include Smartblend support in the future. I'm not saying it's impossible to get Hugin to work with Smartblend, I just couldn't do it myself.</div>