pub struct OcrFrame {
pub nx: f64,
pub ny: f64,
pub w: f64,
pub h: f64,
}Expand description
Normalized OCR bounding box returned by
HttpRunnerClient::find_text_by_ocr. Coordinates are normalized to
[0, 1] in UIKit coord space (top-left origin, y-down). Apple Vision’s
native bbox is bottom-left origin + y-up — the swift handler converts
before returning so all consumers see UIKit coords.
Fields§
§nx: f64Top-left x in [0, 1].
ny: f64Top-left y in [0, 1].
w: f64Width in [0, 1].
h: f64Height in [0, 1].
Implementations§
Trait Implementations§
impl Copy for OcrFrame
Source§impl<'de> Deserialize<'de> for OcrFrame
impl<'de> Deserialize<'de> for OcrFrame
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OcrFrame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OcrFrame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for OcrFrame
impl Serialize for OcrFrame
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for OcrFrame
Auto Trait Implementations§
impl Freeze for OcrFrame
impl RefUnwindSafe for OcrFrame
impl Send for OcrFrame
impl Sync for OcrFrame
impl Unpin for OcrFrame
impl UnsafeUnpin for OcrFrame
impl UnwindSafe for OcrFrame
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
Mutably borrows from an owned value. Read more