Cuda HOG computed , conversion To image

the cpu hog OpenCV can return hog features and images that visualize the features , but Cuda returns only the features , so I need to code and to save the features as gray image .