Re: [boost] [GIL] kth_channel_view

#include <boost/gil/gil_all.hpp> ... kernel_1d<float> kernel2(gaussian_1,9,4); convolve_rows<rgb32f_pixel_t>(kth_channel_view<0>(const_view(img)),kernel2,kth_channel_view<0>(view(img))); jpeg_write_view("out-convolution2.jpg", view(img)); ...
This doesn't compile.
Does it compile when using view(img) instead of const_view(img)? Please provide a complete minimal code sample displaying your problem. Makes my life easier. ;-)
I'm really sorry, I just notice that it's a stupid mistake from me... I forgot to change the template parameter of the concolve_rows function ! If I use k_channel_view I manipulate a grayscale image... kernel_1d<float> kernel2(gaussian_1,9,4); convolve_rows<gray32f_pixel_t>(kth_channel_view<0>(const_view(img)),kernel2,kth_channel_view<0>(view(img))); jpeg_write_view("out-convolution2.jpg", view(img));

A good example of using kth_channel_view is this: rgb8_image_t img( 100, 100 ); typedef kth_channel_view_type< 0, const rgb8_view_t>::type view_t; view_t first = kth_channel_view<0>( const_view( img )); Christian On Wed, Jun 23, 2010 at 12:33 PM, <fabien.castan@free.fr> wrote:
#include <boost/gil/gil_all.hpp> ... kernel_1d<float> kernel2(gaussian_1,9,4); convolve_rows<rgb32f_pixel_t>(kth_channel_view<0>(const_view(img)),kernel2,kth_channel_view<0>(view(img))); jpeg_write_view("out-convolution2.jpg", view(img)); ...
This doesn't compile.
Does it compile when using view(img) instead of const_view(img)? Please provide a complete minimal code sample displaying your problem. Makes my life easier. ;-)
I'm really sorry, I just notice that it's a stupid mistake from me... I forgot to change the template parameter of the concolve_rows function ! If I use k_channel_view I manipulate a grayscale image...
kernel_1d<float> kernel2(gaussian_1,9,4); convolve_rows<gray32f_pixel_t>(kth_channel_view<0>(const_view(img)),kernel2,kth_channel_view<0>(view(img))); jpeg_write_view("out-convolution2.jpg", view(img)); _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Christian Henning
-
fabien.castan@free.fr