pub struct ImageAnalyzer { /* private fields */ }Expand description
Wraps the VisionKit ImageAnalyzer counterpart.
Implementations§
Source§impl ImageAnalyzer
impl ImageAnalyzer
Sourcepub fn new() -> Result<Self, VisionKitError>
pub fn new() -> Result<Self, VisionKitError>
Creates the VisionKit ImageAnalyzer wrapper.
Sourcepub fn is_supported() -> bool
pub fn is_supported() -> bool
Returns whether the VisionKit ImageAnalyzer counterpart is supported on this system.
Sourcepub fn supported_text_recognition_languages() -> Result<Vec<String>, VisionKitError>
pub fn supported_text_recognition_languages() -> Result<Vec<String>, VisionKitError>
Returns the text-recognition languages supported by VisionKit on this system.
Sourcepub fn analyze_image_at_path<P: AsRef<Path>>(
&self,
path: P,
orientation: ImageOrientation,
configuration: &ImageAnalyzerConfiguration,
) -> Result<ImageAnalysis, VisionKitError>
pub fn analyze_image_at_path<P: AsRef<Path>>( &self, path: P, orientation: ImageOrientation, configuration: &ImageAnalyzerConfiguration, ) -> Result<ImageAnalysis, VisionKitError>
Runs the matching VisionKit analyze image at path operation.
Sourcepub fn analyze_ns_image_at_path<P: AsRef<Path>>(
&self,
path: P,
orientation: ImageOrientation,
configuration: &ImageAnalyzerConfiguration,
) -> Result<ImageAnalysis, VisionKitError>
pub fn analyze_ns_image_at_path<P: AsRef<Path>>( &self, path: P, orientation: ImageOrientation, configuration: &ImageAnalyzerConfiguration, ) -> Result<ImageAnalysis, VisionKitError>
Runs the matching VisionKit analyze ns image at path operation.
Sourcepub fn analyze_cg_image_at_path<P: AsRef<Path>>(
&self,
path: P,
orientation: ImageOrientation,
configuration: &ImageAnalyzerConfiguration,
) -> Result<ImageAnalysis, VisionKitError>
pub fn analyze_cg_image_at_path<P: AsRef<Path>>( &self, path: P, orientation: ImageOrientation, configuration: &ImageAnalyzerConfiguration, ) -> Result<ImageAnalysis, VisionKitError>
Runs the matching VisionKit analyze cg image at path operation.
Sourcepub fn analyze_ci_image_at_path<P: AsRef<Path>>(
&self,
path: P,
orientation: ImageOrientation,
configuration: &ImageAnalyzerConfiguration,
) -> Result<ImageAnalysis, VisionKitError>
pub fn analyze_ci_image_at_path<P: AsRef<Path>>( &self, path: P, orientation: ImageOrientation, configuration: &ImageAnalyzerConfiguration, ) -> Result<ImageAnalysis, VisionKitError>
Runs the matching VisionKit analyze ci image at path operation.
Sourcepub fn analyze_pixel_buffer_at_path<P: AsRef<Path>>(
&self,
path: P,
orientation: ImageOrientation,
configuration: &ImageAnalyzerConfiguration,
) -> Result<ImageAnalysis, VisionKitError>
pub fn analyze_pixel_buffer_at_path<P: AsRef<Path>>( &self, path: P, orientation: ImageOrientation, configuration: &ImageAnalyzerConfiguration, ) -> Result<ImageAnalysis, VisionKitError>
Runs the matching VisionKit analyze pixel buffer at path operation.
Trait Implementations§
Source§impl Drop for ImageAnalyzer
impl Drop for ImageAnalyzer
Auto Trait Implementations§
impl Freeze for ImageAnalyzer
impl RefUnwindSafe for ImageAnalyzer
impl !Send for ImageAnalyzer
impl !Sync for ImageAnalyzer
impl Unpin for ImageAnalyzer
impl UnsafeUnpin for ImageAnalyzer
impl UnwindSafe for ImageAnalyzer
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