[][src]Struct leptess::tesseract::TessApi

pub struct TessApi {
    pub raw: *mut TessBaseAPI,
    pub data_path_cptr: *mut c_char,
}

Fields

raw: *mut TessBaseAPIdata_path_cptr: *mut c_char

Methods

impl TessApi[src]

pub fn new<'a>(
    data_path: Option<&'a str>,
    lang: &'a str
) -> Result<TessApi, TessInitError>
[src]

pub fn destroy(&mut self)[src]

pub fn set_image(&mut self, img: &Pix)[src]

pub fn recognize(&self) -> i32[src]

pub fn set_rectangle(&mut self, b: &Box)[src]

pub fn get_utf8_text(&self) -> Result<String, Utf8Error>[src]

pub fn mean_text_conf(&self) -> i32[src]

pub fn get_regions(&self) -> Option<Boxa>[src]

pub fn get_component_images(
    &self,
    level: TessPageIteratorLevel,
    text_only: bool
) -> Option<Boxa>
[src]

Get the given level kind of components (block, textline, word etc.) as a leptonica-style Boxa, in reading order.If text_only is true, then only text components are returned.

Trait Implementations

impl Drop for TessApi[src]

impl PartialEq<TessApi> for TessApi[src]

impl Debug for TessApi[src]

Auto Trait Implementations

impl !Sync for TessApi

impl Unpin for TessApi

impl !Send for TessApi

impl RefUnwindSafe for TessApi

impl UnwindSafe for TessApi

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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