* @brief Transform the array of pixels to the correct image format to display * * @param image * @param width * @param height * @return af::array */
| 891 | * @return af::array |
| 892 | */ |
| 893 | af::array rearrange_image(const af::array& image, uint32_t width, |
| 894 | uint32_t height) { |
| 895 | return af::clamp(af::moddims(image, af::dim4(width, height, 3)).T(), 0.0, |
| 896 | 255.0) |
| 897 | .as(f32) / |
| 898 | 255.f; |
| 899 | } |
| 900 | |
| 901 | /** |
| 902 | * @brief Returns an rgb image containing the raytraced black hole from the |