Struct visioncortex::Sampler [−][src]
pub struct Sampler {
pub image: BinaryImage,
}Expand description
For sampling and resizing binary images
Fields
image: BinaryImageImplementations
pub fn new_with_size_crop(
image: &BinaryImage,
sampler_size: usize,
crop: BoundingRect
) -> Samplerpub fn resample_square_image(
image: &BinaryImage,
crop: BoundingRect,
new_size: usize
) -> BinaryImage
pub fn resample_square_image(
image: &BinaryImage,
crop: BoundingRect,
new_size: usize
) -> BinaryImageResize an image of any size into a square image while keeping the aspect ratio of content. Would empty fill expanded area.
pub fn resample_image(
image: &BinaryImage,
new_width: usize,
new_height: usize
) -> BinaryImagepub fn resample_image_with_crop(
image: &BinaryImage,
crop: BoundingRect,
new_width: usize,
new_height: usize
) -> BinaryImagepub fn resample_image_with_crop_to_image(
src: &BinaryImage,
src_rect: BoundingRect,
dst: &mut BinaryImage,
dst_rect: BoundingRect
)pub fn resample_image_with_crop_to_image_overlay(
src: &BinaryImage,
src_rect: BoundingRect,
dst: &mut BinaryImage,
dst_rect: BoundingRect,
overlay: bool
)Auto Trait Implementations
impl RefUnwindSafe for Samplerimpl UnwindSafe for Sampler