[ptx] VIGRA and alpha channel

Pablo d'Angelo pablo.dangelo at web.de
Wed May 5 18:26:18 BST 2004


On Sun, 02 May 2004, Andrew C Mihal wrote:

> Hi,
>     I've been looking at porting enblend to use VIGRA for image import and 
> export, so that we can work with 16-bit images and the other formats that 
> are available. Oddly, support for RGB + Alpha images seems to be absent 
> from vigra (I've been looking in tiff.hxx).

True, vigra doesn't have an RGBA Image type. one could use a
TinyVector<type,4> for RGBA images. However its tiff reader will choke on
these images.. I tend to use separate mask images, and this is how most
algorithms in vigra work.

> I suppose that a full set of 
> RGBA accessors, iterators, etc. would be necessary. Has anyone made these 
> already? Is there a better way to do this?

I have started extending the impex module, so that it can report properties
of any type (simply by using a string based std::map, map<string,string>).

Additionally I'll add an importImageWithAlpha(RGBImage,MaskImage), which
will then be used to import the alpha layer properly.

Unfortunately, I think it'll take a week until its ready (lots of other
stuff to do as well).

btw. I have converted your nearestFeatureTransform to a vigra compatible
function that works with mask images, it's in the hugin source,
src/include/vigra_ext/NearestFeatureTransform.h

Maybe this can be of some help.

ciao
  Pablo


More information about the ptX mailing list