SVG enblend input

This is an experimental technique for preparing panoramic blending masks.

The usual technique for editing masks is to open the TIFF files used as input for enblend and modify the alpha channel. This is laborious and results in what would normally be temporary data becoming work that has to be saved.

enblend-mask introduced the possibility of using external mask files, this lets you delete the (potentially huge) temporary TIFF files, but involves much pasting in an image editor like the gimp.

Here we are using another feature of enblend-mask, which is that input can be any image filetype including SVG (Scalable Vector Graphics). SVG files can mix bitmap and vector data which is just what we need.

Original photos

Dsc 0538

Dsc 0539

Dsc 0540

Dsc 0541

Unknown File Type Hugin project file (2kB)

Remapped photos

These are the four photos remapped by hugin into equirectangular space:

Dsc 0538 Dsc 05410000

Dsc 0538 Dsc 05410001

Dsc 0538 Dsc 05410002

Dsc 0538 Dsc 05410003

These are not much use for blending, they are JPEG files, so they don’t have an alpha channel mask required by enblend to position the seam. You could use enblend-mask to store the mask as a separate TIFF file, but such mask files are not easily editable once created.

Remapped photos as SVG

So here we are going to include the JPEG files in SVG (Scalable Vector Graphics) files. This is interesting for two reasons:

These SVG files are really simple, here is what one looks like inside:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   width="6636" height="3318" version="1.0">
  <image y="0" x="0" id="image2167" height="3318" width="6636"
       xlink:href="mypicture.jpg" />
</svg>

Here are some SVG files created in Inkscape that reference the JPEG images above (note the small file size, if you are using firefox you can click on them and view them at full resolution):

Unknown File Type Dsc 0538 Dsc 05410000 (3kB)

Unknown File Type Dsc 0538 Dsc 05410001 (3kB)

Unknown File Type Dsc 0538 Dsc 05410002 (3kB)

Unknown File Type Dsc 0538 Dsc 05410003 (3kB)

Here are some thumbnails showing how the SVG files look, notice that the mask has been adjusted to removed unwanted details:

Dsc 0538 Dsc 05410000 Small

Dsc 0538 Dsc 05410001 Small

Dsc 0538 Dsc 05410002 Small

Dsc 0538 Dsc 05410003 Small

Blended output

..and finally, these SVG files can be blended in enblend using enblend-mask just like normal TIFF input:

enblend-mask -o dsc-0538-dsc-0541.tif -w *.svg

Here is the result:

Dsc 0538 Dsc 0541