Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bounding_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use serde::Serialize;
use crate::ffi::RawBBox;

/// This `Point` struct represents a point in 2D space with X and Y coordinates.
#[derive(Debug, Clone, Copy, Default, Serialize)]
#[derive(Debug, Clone, Copy, Default, Serialize, PartialEq)]
pub struct Point {
pub x: f32,
pub y: f32,
Expand All @@ -16,7 +16,7 @@ impl std::fmt::Display for Point {
}

/// This `BoundingBox` struct represents a bounding box in 2D space, used for OCR to tightly enclose detected text.
#[derive(Debug, Clone, Copy, Default, Serialize)]
#[derive(Debug, Clone, Copy, Default, Serialize, PartialEq)]
pub struct BoundingBox {
pub top_left: Point,
pub top_right: Point,
Expand Down
4 changes: 2 additions & 2 deletions src/ocr_options.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// A simple width×height pair.
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Resolution {
pub width: i32,
pub height: i32,
}

/// Configuration for OCR processing behavior.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct OcrOptions {
/// The maximum number of lines that can be recognized.
/// Default is 100, range is 0-1000.
Expand Down
2 changes: 1 addition & 1 deletion src/ocr_word.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::check_ocr_call;

/// The `OcrWord` struct represents a word recognized by the OCR engine.
/// It contains the recognized word, its confidence score, and its bounding box.
#[derive(Debug, Serialize)]
#[derive(Debug, Clone, Serialize, PartialEq)]
pub struct OcrWord {
pub text: String,
pub confidence: f32,
Expand Down
Loading