Struct visioncortex::Sampler
source · [−]pub struct Sampler {
pub image: BinaryImage,
}
Expand description
For sampling and resizing binary images
Fields
image: BinaryImage
Implementations
pub fn new_with_size_crop(
image: &BinaryImage,
sampler_size: usize,
crop: BoundingRect
) -> Sampler
pub fn resample_square_image(
image: &BinaryImage,
crop: BoundingRect,
new_size: usize
) -> BinaryImage
pub fn resample_square_image(
image: &BinaryImage,
crop: BoundingRect,
new_size: usize
) -> BinaryImage
Resize an image of any size into a square image while keeping the aspect ratio of content. Would empty fill expanded area.