pub struct OAROCRResult {
pub input_path: Arc<str>,
pub index: usize,
pub input_img: Arc<RgbImage>,
pub text_regions: Vec<TextRegion>,
pub orientation_angle: Option<f32>,
pub rectified_img: Option<Arc<RgbImage>>,
pub error_metrics: ErrorMetrics,
}Expand description
Result of the OAROCR pipeline execution.
This struct contains all the results from processing an image through the OCR pipeline, including detected text boxes, recognized text, and any intermediate processing results.
Fields§
§input_path: Arc<str>Path to the input image file.
index: usizeIndex of the image in a batch (0 for single image processing).
input_img: Arc<RgbImage>The input image.
text_regions: Vec<TextRegion>Structured text regions containing detection and recognition results. This is the modern, preferred way to access OCR results as it groups related data together.
orientation_angle: Option<f32>Document orientation angle (if orientation classification was used).
rectified_img: Option<Arc<RgbImage>>Rectified image (if document unwarping was used).
error_metrics: ErrorMetricsError metrics for data quality monitoring.
Implementations§
Source§impl OAROCRResult
impl OAROCRResult
Sourcepub fn recognized_text_regions(&self) -> impl Iterator<Item = &TextRegion>
pub fn recognized_text_regions(&self) -> impl Iterator<Item = &TextRegion>
Returns an iterator over text regions that have recognized text.
Sourcepub fn confident_text_regions(&self) -> impl Iterator<Item = &TextRegion>
pub fn confident_text_regions(&self) -> impl Iterator<Item = &TextRegion>
Returns an iterator over text regions with both text and confidence scores.
Sourcepub fn concatenated_text(&self, separator: &str) -> String
pub fn concatenated_text(&self, separator: &str) -> String
Returns all recognized text concatenated with the specified separator.
Sourcepub fn recognized_text_count(&self) -> usize
pub fn recognized_text_count(&self) -> usize
Returns the number of text regions that have recognized text.
Sourcepub fn average_confidence(&self) -> Option<f32>
pub fn average_confidence(&self) -> Option<f32>
Returns the average confidence score of all recognized text regions.
Trait Implementations§
Source§impl Clone for OAROCRResult
impl Clone for OAROCRResult
Source§fn clone(&self) -> OAROCRResult
fn clone(&self) -> OAROCRResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OAROCRResult
impl Debug for OAROCRResult
Auto Trait Implementations§
impl Freeze for OAROCRResult
impl RefUnwindSafe for OAROCRResult
impl Send for OAROCRResult
impl Sync for OAROCRResult
impl Unpin for OAROCRResult
impl UnwindSafe for OAROCRResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.