Realm

oa::image::flood_fill

Floating-range flood fill per plane, following floodFill: the pixel at (seed_x, seed_y) takes value, and each unmarked pixel joins the region when a connected neighbor already belongs and the candidate’s original value lies within [neighbor - lo_diff, neighbor + up_diff] of that neighbor’s original value. Propagation runs a fixed number of relaxation passes (zero selects height + width); regions whose flood diameter exceeds the bound fill partially. The output is a filled copy of the input; unmarked pixels keep their values. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, the seed is in bounds, and value, lo_diff, and up_diff are finite with lo_diff >= 0 and up_diff >= 0.

FnRust public API

Function Documentation

pub fn flood_fill( input: &Image, seed_x: u32, seed_y: u32, value: f32, lo_diff: f32, up_diff: f32, connectivity: Connectivity, propagation_passes: u32 ) -> Result<Image>
Floating-range flood fill per plane, following floodFill: the pixel at (seed_x, seed_y) takes value, and each unmarked pixel joins the region when a connected neighbor already belongs and the candidate’s original value lies within [neighbor - lo_diff, neighbor + up_diff] of that neighbor’s original value. Propagation runs a fixed number of relaxation passes (zero selects height + width); regions whose flood diameter exceeds the bound fill partially. The output is a filled copy of the input; unmarked pixels keep their values. Errors Returns an error unless the image is a nonempty FP32 NCHW/CHW image, the seed is in bounds, and value, lo_diff, and up_diff are finite with lo_diff >= 0 and up_diff >= 0.