preprocess

Function preprocess 

Source
pub fn preprocess(
    image: &DynamicImage,
    options: &PreprocessOptions,
) -> Result<GrayImage>
Expand description

Main preprocessing function with configurable options

§Arguments

  • image - Input image to preprocess
  • options - Preprocessing configuration options

§Returns

Preprocessed grayscale image ready for OCR

§Example

use image::open;
use ruvector_scipix::preprocess::{preprocess, PreprocessOptions};

let img = open("document.jpg").unwrap();
let options = PreprocessOptions::default();
let processed = preprocess(&img, &options).unwrap();