WM Device Help : Seam Finder + Seam Remover

Howard Zhou



Current Version : WM2 (_2.dll 432 KB) (2008-09-21)
Previous Versions :
WM Pro Beta 8 (
_b8.dll 328 KB) (2008-02-03)
WM Pro Beta 5  (_b5.dll 256 KB) (2007-08-16)

  • merger_<ver>.dll
    WM plug-in device. save it into [$(WMDir)/plug-in/devices]

Example files (.zip 959 KB)

  • merger.release.tmd
    WM project file that shows an example including the use of both the seam finder and seam remover devices.
  • input1.png & input2.png
    16-bit PNG terrain files (parts of the Grand Canyon) to be used with the example project file.
  • mask1.png, mask2.png, mask3.png
    8-bit PNG mask files to be used with the example project file. play with different masks as you like
  • teaser.jpg
    teaser image for the device.

(.zip 1.5 MB) external DLLs required (Intel IPP 5.2), just drop it into the folder where the WM.exe resides or any system path.


Tool bar :

The buttons don't look attractive at all. I will make better ones when I have more time.


Flow chart :


Known Issues :

  1. Speed : Because the seam removal stage requires solving a large linear system, the time it takes is inversely proportional to the cubic square (roughly) of the number of pixels.  For 512 x 512 terrain, it takes about 1 minute on a Pentium-4 3.2 GHz machine. I have not tried this on any image of larger size yet.
    In the original implementation described in the paper (here), the seam finding and removal procedures were performed on much smaller patches (at around 150 x 150) and larger terrains were merged one small patch at a time. I will try to implement this feature in the future. Before that, I would not recommend to try these devices on terrain with size larger than 1000 x 1000 pixels.
  2. Progress report : I haven't implemented the progress report feature for these devices yet, which makes the speed issue even more annoying. I will try to put those in soon. Please bare with me.




Example :


Source terrain (Input 1)  
Input terrain (input 2)  

The mask for Seam Finder always consists of three different shades of gray. black pixels have to come from the source image and white pixels the input image. The gray pixels are left for the seam finder to decide. The output seam is the optimal seam with the height difference along the seam to be the least.



However, there may still be significant height difference along the seam (red circles in the above image).



These visible seams can removed by Seam Remover. In the end, what you get are two heightfields seamlessly merged together. 




Additional Examples :



Although a good mask is the key to a good result, the mask is optional to Seam Finder. When a mask is not supplied, the seam finder generates a mask internally. It looks like the one shown above. 



Neither the source nor the input areas need to be connected. You can be quite creative with the design of a mask. Just remember: black pixels are from the source and white pixels are from the input, and the Seam Finder gets to decide the rest.





Last updated on 2008-09-23 21:16:02