Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] gil_function_requires( view that contains alpha )
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-12-05 15:58:13


Hi Eloi, thanks for your submissions. I have tested them and they are
working fine. One bug, so far, was in mergefunctors.hpp inside the
FunctorPlus. Here, you're returning the result value instead of
assigning it to the dst channel. Fix is simple and obvious. ;-)

I have so many things in my head right now. Mostly details that I'll
omit for now. Instead I would like to focus on the big picture.
Basically, where do you think such algorithms fit in the domain of
image processing? Are they more rgb/rgba algorithms or can one mix
color spaces?

Next thing is how to design such algorithms? The three functors you
are providing are probably ( I'm not an expert in the field ) a small
subset of all possibilities. I'm a big fan of the design of STL's
algorithms. Here, you have basic general algorithms such for_each,
transform, etc, where you add predicates ( functors ) as a parameters.
Do you think we should stick to such paradigm when designing
algorithmic gil extensions? GIL comes with transform_pixels which I
think we could utilize. What's your opinion?

Thanks again for your code. I like to see more of it!

Regards,
Christian

On Thu, Dec 3, 2009 at 10:02 AM, Eloi Du Bois <eloi.du.bois_at_[hidden]> wrote:
> Ok, thanks :) I was looking for a gil concept.
>
> You are right, I am trying to do some SFINAE, now it works well :)
> I am trying to do some channel merging with templated functors (one which
> uses alpha and another which doesn't).
> If you are interested by the code (LGPL) I have made, I can send you what I
> have done. Maybe are you interested by adding such functions in a future
> version of gil ?
> I give you two files that shows the principle. I don't know if that will be
> usefull to you, anyway I think it's an interesting feature to put in gil.
> (the files I give to you is subject of bugs: it is under development).
>
> Eloi.
>
> 2009/12/2 Christian Henning <chhenning_at_[hidden]>
>>
>> Eloi,
>>
>> >
>> > I would do something like that (not tested):
>> > BOOST_STATIC_ASSERT(mpl::contains<typename
>> > color_space_type<Pixel>::type,
>> > alpha_t>::value);
>>
>> This works just fine.
>>
>> >
>> > But I don't know if it is a good idea.
>> > Is there a way to do that with gil_function_requires ?
>>
>> You mean by adding a new concept to gil? I would just go with the
>> metafunction you provided above. What are you trying to do? Some
>> SFINAE?
>>
>>
>> Christian
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net