pub trait BoolVisionOps: Backend {
// Provided methods
fn connected_components(
img: BoolTensor<Self>,
connectivity: Connectivity,
) -> IntTensor<Self> { ... }
fn connected_components_with_stats(
img: BoolTensor<Self>,
connectivity: Connectivity,
opts: ConnectedStatsOptions,
) -> (IntTensor<Self>, ConnectedStatsPrimitive<Self>) { ... }
fn bool_erode(
input: BoolTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Bool>,
) -> BoolTensor<Self> { ... }
fn bool_dilate(
input: BoolTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Bool>,
) -> BoolTensor<Self> { ... }
}Expand description
Vision ops on bool tensors
Provided Methods§
Sourcefn connected_components(
img: BoolTensor<Self>,
connectivity: Connectivity,
) -> IntTensor<Self>
fn connected_components( img: BoolTensor<Self>, connectivity: Connectivity, ) -> IntTensor<Self>
Computes the connected components labeled image of boolean image with 4 or 8 way connectivity - returns a tensor of the component label of each pixel.
img- The boolean image tensor in the format [batches, height, width]
Sourcefn connected_components_with_stats(
img: BoolTensor<Self>,
connectivity: Connectivity,
opts: ConnectedStatsOptions,
) -> (IntTensor<Self>, ConnectedStatsPrimitive<Self>)
fn connected_components_with_stats( img: BoolTensor<Self>, connectivity: Connectivity, opts: ConnectedStatsOptions, ) -> (IntTensor<Self>, ConnectedStatsPrimitive<Self>)
Computes the connected components labeled image of boolean image with 4 or 8 way connectivity and collects statistics on each component - returns a tensor of the component label of each pixel, along with stats collected for each component.
img- The boolean image tensor in the format [batches, height, width]
Sourcefn bool_erode(
input: BoolTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Bool>,
) -> BoolTensor<Self>
fn bool_erode( input: BoolTensor<Self>, kernel: BoolTensor<Self>, opts: MorphOptions<Self, Bool>, ) -> BoolTensor<Self>
Erodes an input tensor with the specified kernel.
Sourcefn bool_dilate(
input: BoolTensor<Self>,
kernel: BoolTensor<Self>,
opts: MorphOptions<Self, Bool>,
) -> BoolTensor<Self>
fn bool_dilate( input: BoolTensor<Self>, kernel: BoolTensor<Self>, opts: MorphOptions<Self, Bool>, ) -> BoolTensor<Self>
Dilates an input tensor with the specified kernel.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.