Here a basic example:

int main(int argc, char *argv[])
    typedef boost::mpl::vector< gray8_image_t
                              , rgb8_image_t
                              >::type my_img_types;

    any_image< my_img_types > runtime_image;
    rgb8_image_t& img = runtime_image._dynamic_cast< rgb8_image_t >();

    unsigned char* data = interleaved_view_get_raw_data( view( img ) );

The variant class which any_image is derived from contains a _dynamic_cast member. This member can be used to retrieve the image type to then subsequently have access to the buffer using interleaved_view_get_raw_data.