Boost logo

Boost Users :

Subject: Re: [Boost-users] [gil] get raw data from picture
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-02-21 17:56:24


Hi Stephan, I'm not sure what you wanna do. Are your jpegs using the
YCbCr color space, meaning the images needs to read using the
JCS_YCbCr flag? If though, this color space hasn't been added yet. But
it should be fairly simple to add a YCC ( meaning YCbCr ) colorspace.
I can help here.

To access only one channel use kth_channel_view ( for compile time
creation ) or nth_channel_view ( for runtime creation ).

As you can see I'm not sure what you mean. Please send me more
information so I can help you out better.

Regards,
Christian

On Wed, Feb 18, 2009 at 2:43 PM, Stephan Menzel <stephan.menzel_at_gmx.eu> wrote:
> Am Mittwoch, 18. Februar 2009 16:41:46 schrieb Stephan Menzel:
>> Hi there,
>>
>> is there any way to get the raw YCbCr data out of a gil Image that has been
>> read with jpeg_read_image()?
>
> perhaps I should be a little more verbose.
> I intented to use gil to read images (in that case jpeg, or from raw RGB in
> Mem) to iterate over the pixels and convert them into yuv planes.
> I wanted to use a conversion formula for this.
> Those yuv planes shall be plain mem blocks where I need to store the data to
> feed them into a C function that expects such. So I need a way to either
> iterate over the pixels and get the red green and blue values to use the
> conversion algo upon them (or I was actually hoping GIL can do this job) and
> offer me a view where I can access those panes and simply copy them. Studying
> the docs I see this is not possible but maybe someone can give me some advice
> on how to access those RGB pixel iterators.
> I think the way to start is this:
>
> boost::gil::any_image< rgb16_image_t> img;
> boost::gil::jpeg_read_image("image.jpg", img);
> boost::gil::any_image< rgb16_image_t>::view_t view(img);
>
> but what next?
>
> Thanks!
>
> Stephan
>
>
>
> _______________________________________________
> 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