37[[nodiscard]] MAYAFLUX_API std::vector<float>
rgba_to_gray(
38 std::span<const float> rgba, uint32_t w, uint32_t
h);
51MAYAFLUX_API
void rgba_to_gray(std::span<const float> rgba, std::span<float> dst, uint32_t w, uint32_t
h);
65[[nodiscard]] MAYAFLUX_API std::vector<float>
rgba_to_hsv(
66 std::span<const float> rgba, uint32_t w, uint32_t
h);
79MAYAFLUX_API
void rgba_to_hsv(std::span<const float> rgba, std::span<float> dst, uint32_t w, uint32_t
h);
91[[nodiscard]] MAYAFLUX_API std::vector<float>
gray_to_rgba(
92 std::span<const float> gray, uint32_t w, uint32_t
h);
101MAYAFLUX_API
void gray_to_rgba(std::span<const float> gray, std::span<float> dst, uint32_t w, uint32_t
h);
114[[nodiscard]] MAYAFLUX_API std::vector<float>
threshold(
115 std::span<const float> gray,
float value);
124MAYAFLUX_API
void threshold(std::span<const float> gray, std::span<float> dst,
float value);
140 std::span<const float> gray, uint32_t w, uint32_t
h,
166 std::span<const float> gray);
177MAYAFLUX_API
void threshold_otsu(std::span<const float> gray, std::span<float> dst);
218 std::span<const float> src,
219 uint32_t w, uint32_t
h,
220 uint32_t& new_w, uint32_t& new_h);
233 std::span<const float> src,
234 std::span<float> dst,
235 uint32_t w, uint32_t
h,
236 uint32_t& new_w, uint32_t& new_h);
253 std::span<const float> src,
254 std::span<float> dst,
255 uint32_t w, uint32_t
h,
257 uint32_t& new_w, uint32_t& new_h);
void normalize_range_inplace(std::span< float > data, float lo, float hi)
Clamp and remap values from [lo, hi] to [0, 1] in-place.
void rgba_to_gray(std::span< const float > rgba, std::span< float > dst, uint32_t w, uint32_t h)
Convert RGBA to luminance gray using BT.601 coefficients.
void normalize_inplace(std::span< float > data)
Stretch values to fill [0, 1] using the span's observed min and max.
void gray_to_rgba(std::span< const float > gray, std::span< float > dst, uint32_t w, uint32_t h)
Global threshold writing into caller-supplied buffer.
void rgba_to_hsv(std::span< const float > rgba, std::span< float > dst, uint32_t w, uint32_t h)
Convert RGBA to HSV writing into caller-supplied buffer.
void threshold_otsu(std::span< const float > gray, std::span< float > dst)
Otsu threshold writing into caller-supplied buffer.
void threshold_adaptive(std::span< const float > gray, std::span< float > dst, uint32_t w, uint32_t h, uint32_t block_size, float offset)
Adaptive threshold writing into caller-supplied buffer.
void downsample_2x(std::span< const float > src, std::span< float > dst, uint32_t w, uint32_t h, uint32_t &new_w, uint32_t &new_h)
2x box-filter downsample writing into a caller-supplied buffer.