Struct tesseract::Tesseract[][src]

pub struct Tesseract(_);

Implementations

impl Tesseract[src]

pub fn new(
    datapath: Option<&str>,
    language: Option<&str>
) -> Result<Self, InitializeError>
[src]

pub fn new_with_oem(
    datapath: Option<&str>,
    language: Option<&str>,
    oem: OcrEngineMode
) -> Result<Self, InitializeError>
[src]

pub fn set_image(self, filename: &str) -> Result<Self, SetImageError>[src]

pub fn set_frame(
    self,
    frame_data: &[u8],
    width: i32,
    height: i32,
    bytes_per_pixel: i32,
    bytes_per_line: i32
) -> Result<Self, TessBaseAPISetImageSafetyError>
[src]

pub fn set_image_from_mem(self, img: &[u8]) -> Result<Self, PixReadMemError>[src]

pub fn set_source_resolution(self, ppi: i32) -> Self[src]

pub fn set_variable(
    self,
    name: &str,
    value: &str
) -> Result<Self, SetVariableError>
[src]

pub fn recognize(self) -> Result<Self, TessBaseAPIRecogniseError>[src]

pub fn get_text(&mut self) -> Result<String, TessBaseAPIGetUTF8TextError>[src]

pub fn get_hocr_text(
    &mut self,
    page: c_int
) -> Result<String, TessBaseAPIGetHOCRTextError>
[src]

Get the text encoded as HTML with bounding box tags

See img.html for an example.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.