Boost logo

Boost :

From: Ullrich Koethe (u.koethe_at_[hidden])
Date: 2001-11-15 11:41:23


Michiel Salters wrote:
>
> > -----Original Message-----
> > From: Ullrich Koethe [mailto:u.koethe_at_[hidden]]
> > Sent: Wednesday, November 14, 2001 9:44 AM
> > To: boost_at_[hidden]
> > Subject: Re: [boost] VIGRA - Image processing for boost
> >
> >
> > Michiel Salters wrote:
> > > In the list of common image types, perhaps the most common
> > >pixel type is missing: bool.
> > > However, given the annoyance caused by std::vector<bool>,
> > > this is a type we should give
> > > proper attention. Here I can't come up with an easy fix.
>
> > I think that the savings in memory consumption don't justify the extra
> > trouble. I'm using BasicImage<unsigned char> for binary data
> > as well and haven't had problems. But different applications may
> > certainly change the picture.
> >
> > Regards
> > Ulli
>
> I know some of the people within the image processing group were working on
> 1<<28 bits of map data (B/W); having to use 1<<28 bytes wouldn't be fun.
> I don't want to say that because of their needs, image<bool> should be
> packed;
> but if it isn't that should be clearly stated.
> Perhaps there should be two image types ?
>

Providing two image types would be easy, but I have doubts whether it
will buy much. Consider the possibilities:

* Image<bool> is unpacked. Than you can just as well use Image<byte>
* Image<bool> is packed. Then you will very likely want to use
algorithms optimized for packed data, e.g. filters that process 32 bit
in parallel. However, I haven't found a way to provide this optimization
generically. And rewriting all algorithms would be a lot of work. Of
course, you could process the data bit-by-bit with the existing
algorithms, but this might be slower than using unpacked data.

Any ideas?

Ulli
 ________________________________________________________________
| |
| Ullrich Koethe Universität Hamburg / University of Hamburg |
| FB Informatik / Dept. of Computer Science |
| AB Kognitive Systeme / Cognitive Systems Group |
| |
| Phone: +49 (0)40 42883-2573 Vogt-Koelln-Str. 30 |
| Fax: +49 (0)40 42883-2572 D - 22527 Hamburg |
| Email: u.koethe_at_[hidden] Germany |
| koethe_at_[hidden] |
| WWW: http://kogs-www.informatik.uni-hamburg.de/~koethe/ |
|________________________________________________________________|


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