Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2006-11-02 13:53:12


Matt Gruenke wrote:
> Fernando Cacciola wrote:
>
>> Now, off the pixel/color topic.
>> rom the Quicktime format disccusion: is it possible to supersample
>> (rather than subsample) an image? That is, to take two or more
>> consequtive pixels in a row and pretend is just one pixel?
>>
>
> You're talking about a subsampling (or decimating) iterator,

No, but I can see how the way I expressed it looked like that.

> instead-
> of
> an interpolating iterator?

Exactly. The idea was not to skip even or odd pixels (which subsampling
does) but to combine them.
The actual N-1 mapping would be defined by the iterator: it could
interpolate, add and clobber, concatenate or whatever makes sense.

> I believe the code structures necessary
> for
> both of these tasks are largely identical - once you've worked out how
> to do one, the other should be quite straight forward.
>
> However, for most purposes where this is desirable, it is probably
> more efficient to write a routine that resamples entire rows and
> columns at a time.

Which is what Ulrich said. It would be interesting the benchmark it though.

> You'd be discarding information, though. The reason chroma has half
> the sampling frequency, in this case, is because it has been
> band-limited to
> half the bandwidth of luma (a perceptual optimization). If you
> decimate luma, you're going to loose information (given no
> assumptions about the
> input data). So, it's fails as a simplification, because it's not
> equivalent.
>
The above corresponds to a subsampling/decimating iterator right?
I was referring to "combining" iterator. Would that work?

Best

-- 
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com/ 

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