I currently have an image of the type boost::gil::rgb8c_view_t
. I need to pass it to a function with this prototype:
void function(const boost::gil::rgb8c_view_t& input, const int index, const boost::gil::rgb8c_view_t::view_t &output)
I have created an output image by using the following syntax:
boost::gil::rgb8c_view_t::view_t output(input._dynamic_cast<boost::gil::rgb8c_view_t::view_t>());
At this point, the compiler accepts the image output
as input for the function. However, I need the image back to the boost::gil::rgb8c_view_t
type. The question is:
- Is it a correct way to allocate the image
output
? - How do I transform it back to the type
boost::gil::rgb8c_view_t
?
Thank you in advance, Néstor
I am not sure if I understand your question correctly (see comments above), but to create an output image with the same size as your input image, you could use a call like the following:
And get a mutable view like this:
Of course you can also get a constant/immutable view like this: