Hi All,
The following code is straight out of the tutorial about making function generic. Can anyone suggest how I might determine the layout of DstView here so that I can build an image of the same layout? In this example they hardcode gray_layout_t and I’m not seeing any metafunctions that return the layout.
template <typename SrcView, typename DstView>
void x_luminosity_gradient(const SrcView& src, const DstView& dst) {
typedef typename channel_type<DstView>::type d_channel_t;
typedef typename channel_convert_to_unsigned<d_channel_t>::type channel_t;
typedef typename image_type<channel_t, gray_layout_t>::type gray_image_t;
typedef typename gray_image_t::value_type gray_pixel_t;
gray_image_t ccv_image(src.dimensions());
copy_and_convert_pixels(src, view(ccv_image));
x_gradient(const_view(ccv_image), dst);
}
Thanks,
Mark