|
Boost : |
Subject: Re: [boost] [GIL] image rescale algorithms
From: Est (esteban_at_[hidden])
Date: 2009-09-09 06:26:21
Hi Nicolas,
I used your code in Ramen (http://sourceforge.net/projects/ramenhdr/)
It works great. Thank you.
And now, some feedback...
I think filters should be a small separate GIL extension.
They are useful also for other image resampling algorithms.
In clamp_channel_fn I added an overload like this:
template <typename SrcChannel, typename T, typename S, typename U>
void operator()(const SrcChannel& src, scoped_channel_value<T,S,U>& dst)
{
typedef typename channel_traits<scoped_channel_value<T,S,U>>::value_type
dst_value_t;
dst = dst_value_t( src);
}
to avoid clamping floating point channels. Another option would be to
clamp only negative values.
I think
template <typename PixelType>
struct create_accum_pixel_type : public
create_accum_pixel_type<PixelType> {};
can be replaced with
template <typename PixelType>
struct create_accum_pixel_type {};
I had to add some typenames in front of accum_pixel_t in rescale_rows,
rescale_cols and rescale to build with gcc.
and I made a parallel version using Intel TBB. It's here:
http://ramenhdr.svn.sourceforge.net/viewvc/ramenhdr/trunk/extern/gil/extension/parallel_rescale.hpp?view=log
Est.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk