[−][src]Struct tesseract::plumbing::TessBaseAPI
Wrapper around tesseract::TessBaseAPI
Implementations
impl TessBaseAPI
[src]
pub fn new() -> TessBaseAPI
[src]
pub fn init_2(
&mut self,
datapath: Option<&CStr>,
language: Option<&CStr>
) -> Result<(), TessBaseAPIInitError>
[src]
&mut self,
datapath: Option<&CStr>,
language: Option<&CStr>
) -> Result<(), TessBaseAPIInitError>
Wrapper for Init-2
and TessBaseAPIInit3
Start tesseract
pub fn set_image_2(&mut self, pix: &Pix)
[src]
Wrapper for SetImage-2
pub fn set_image_1(
&mut self,
image_data: &[u8],
width: c_int,
height: c_int,
bytes_per_pixel: c_int,
bytes_per_line: c_int
) -> Result<(), TessBaseAPISetImageSafetyError>
[src]
&mut self,
image_data: &[u8],
width: c_int,
height: c_int,
bytes_per_pixel: c_int,
bytes_per_line: c_int
) -> Result<(), TessBaseAPISetImageSafetyError>
Wrapper for SetImage-1
pub fn set_source_resolution(&mut self, ppi: c_int)
[src]
Wrapper for SetSourceResolution
pub fn set_variable(
&mut self,
name: &CStr,
value: &CStr
) -> Result<(), TessBaseAPISetVariableError>
[src]
&mut self,
name: &CStr,
value: &CStr
) -> Result<(), TessBaseAPISetVariableError>
Wrapper for SetVariable
pub fn recognize(&mut self) -> Result<(), TessBaseAPIRecogniseError>
[src]
Wrapper for Recognize
Recognize the image. Returns Ok(())
on success and Err(())
otherwise.
It is currently unclear to me what would make it error.
It could take a progress argument (monitor
). If there is appetite for this, let me know and I could try and implement it.
pub fn get_utf8_text(
&mut self
) -> Result<TesseractText, TessBaseAPIGetUTF8TextError>
[src]
&mut self
) -> Result<TesseractText, TessBaseAPIGetUTF8TextError>
Wrapper for GetUTF8Text
Get the text out of an image.
Can return an error (null pointer), but it is not clear to me what would cause this.
This will implicitly call recognize
if required.
Trait Implementations
impl Default for TessBaseAPI
[src]
impl Drop for TessBaseAPI
[src]
Auto Trait Implementations
impl RefUnwindSafe for TessBaseAPI
impl !Send for TessBaseAPI
impl !Sync for TessBaseAPI
impl Unpin for TessBaseAPI
impl UnwindSafe for TessBaseAPI
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,