Boost logo

Boost :

From: Thorsten Behrens (th.behrens_at_[hidden])
Date: 2006-10-25 01:35:57


On Mon, Oct 23, 2006 at 03:06:44PM -0700, Lubomir Bourdev wrote:
> As a user of GIL I don't see why you should care if it internally uses
> DataAccessor/Iterator or STL-style iterators. All you should care about
> is how easy it is to use and extend GIL. In particular, if you have a
> DataAccessor+Iterator can you make easily from it a GIL iterator and
> image view?
>
> For immutable DataAccessors, it is trivial. You can think of GIL's
> PixelDereferenceAdaptor almost like a DataAccessor.
>
> [snip]
>
> Adapting a mutable DataAccessor requires a bit more work, and we can
> certainly add some utilities to make it easier, but I am having a hard
> time thinking of a practical example where you need this.
>
Hi Lubomir,

I agree with your first point, and gave an example for the second
(removing much of the boilerplate from your packed pixel
implementation). To the user, GIL's iterators can stay exactly as they
are - to the inside, they are composed of an iterator and (optionally) a
DataAccessor. See it as a way to ease addition of new in-memory pixel
representations.

> Please don't forget that computer vision is a niche domain. There is a
> much broader domain of basic image manipulation, like loading an image
> from file and converting it to a format that your window manager can
> display, or making a thumbnail out of an image.
>
True as well - but there's a large grey area between the two, and your
last example already touches one. Generating a nicely downscaled
thumbnail requires low-pass filtering, transforming an image generally
requires interpolation. For both tasks, Vigra contains a whole family of
algorithms (recursive filters and convolution; linear, B-spline, Catmull-
Rom, and CosCot interpolation).

> Far more people need basic utilities like the above. People like you who
> need a Canny edge detector, or even know what it means, are a minority.
>
Admittedly, the Canny edge detector was a bad example. But I'm otherwise
totally convinced that with languages like SVG, UIs like Aqua or Vista,
stuff like blurring, convolution, turbulence or morphological operations
are bread-and-butter effects for today's graphics programmers (c.f. SVG's
filters).

And you probably know very well that stuff like OCR, semi-automatic
segmentation and face recognition is going down-market (not that Vigra
provides much of that yet - but there's non-linear diffusion) - all of
that is computer vision at it's best. ;-)

So, really, I don't see the issue here - GIL provides the sound
foundations, Vigra a wealth of algorithms. Looks like a perfect fit to
me.

Cheers,

-- Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk