|
Boost Users : |
Subject: Re: [Boost-users] [gil] get raw data from picture
From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2009-02-22 07:38:33
Am Samstag, 21. Februar 2009 23:56:24 schrieb Christian Henning:
> 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.
Hi Christian,
essentially I got the situation where I'll need to look at given images that
come in via files (such as in the jpeg example) or mem blocks (raw rgb) as
YCbCr planes. These planes need to be fed into a C encoder lib, so I need them
as raw mem blocks. What I did now is create a gil rgb8_t view and iterate over
the whole image. Now I wrote my own converter routine (yet untested). Looking
at all the different views gil offers I came to wonder if it would be possible
to have a YV12 view similar to the RGB or CMYK views. From such a view I would
then need all single channels as raw mem blocks. The nth_channel_view may be
what I need then as long as I can get some void* out of it I can memcpy into
the libs buffer. I know, it's kinda special situation but maybe it would be
useful within gil since ther's already several other view types. Also I fear
my own converter (using the pixel iterators) may not be as fast as a gil
internal could be. Unfortunately performance is very important here.
Best regards...
Stephan
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