MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / rearrange_image

Function rearrange_image

examples/pde/bhrt.cpp:893–899  ·  view source on GitHub ↗

* @brief Transform the array of pixels to the correct image format to display * * @param image * @param width * @param height * @return af::array */

Source from the content-addressed store, hash-verified

891 * @return af::array
892 */
893af::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

Callers 1

generate_imageFunction · 0.85

Calls 5

moddimsFunction · 0.85
asMethod · 0.80
TMethod · 0.80
clampFunction · 0.50
dim4Class · 0.50

Tested by

no test coverage detected