Framework

Vision

Apply high-performance image analysis and computer vision techniques to identify faces, detect features, and classify scenes in images and video.

Topics

First Steps

class VNImageRequestHandler

An object that processes one or more image analysis requests pertaining to a single image.

class VNSequenceRequestHandler

An object that processes image analysis requests pertaining to a sequence of multiple images.

Face Detection and Recognition

class VNDetectFaceRectanglesRequest

An image analysis request that finds faces within an image.

class VNDetectFaceLandmarksRequest

An image analysis request that finds facial features (such as the eyes and mouth) in an image.

class VNFaceObservation

Face or facial-feature information detected by an image analysis request.

Machine Learning Image Analysis

class VNCoreMLRequest

An image analysis request that uses a Core ML model to process images.

class VNClassificationObservation

Scene classification information produced by an image analysis request.

class VNPixelBufferObservation

An output image produced by a Core ML image analysis request.

class VNCoreMLFeatureValueObservation

A collection of key-value information produced by a Core ML image analysis request.

Barcode Detection

class VNDetectBarcodesRequest

An image analysis request that finds and recognizes barcodes in an image.

class VNBarcodeObservation

Barcode information detected by an image analysis request.

Image Alignment Analysis

class VNTranslationalImageRegistrationRequest

An image analysis request that determines the affine transform needed to align the content of two images.

class VNHomographicImageRegistrationRequest

An image analysis request that determines the perspective warp matrix needed to align the content of two images.

class VNImageRegistrationRequest

The abstract superclass for image analysis requests that align images based on their content.

class VNImageHomographicAlignmentObservation

Perspective warp information produced by an image alignment request.

class VNImageTranslationAlignmentObservation

Affine transform information produced by an image alignment request.

class VNImageAlignmentObservation

The abstract superclass for image analysis results that describe the relative alignment of two images.

Text Detection

class VNDetectTextRectanglesRequest

An image analysis request that finds regions of visible text in an image.

class VNTextObservation

Information about regions of text detected by an image analysis request.

Horizon Detection

class VNDetectHorizonRequest

An image analysis request that determines the horizon angle in an image.

class VNHorizonObservation

Horizon angle information detected by an image analysis request.

Object Detection and Tracking

class VNDetectRectanglesRequest

An image analysis request that finds projected rectangular regions in an image.

class VNTrackRectangleRequest

An image analysis request that tracks movement of a previously identified rectangular object across multiple images or video frames.

class VNTrackObjectRequest

An image analysis request that tracks movement of a previously identified arbitrary object across multiple images or video frames.

class VNRectangleObservation

Information about projected rectangular regions detected by an image analysis request.

class VNDetectedObjectObservation

An image analysis result that provides the position and extent of a detected image feature.

Supporting Types

class VNRequest

The abstract superclass for image analysis requests.

class VNObservation

The abstract superclass for image analysis results.

class VNImageBasedRequest

The abstract superclass for image analysis requests that focus on a specific part of an image.

class VNTargetedImageRequest

The abstract superclass for image analysis requests that operate on both the processed image and a secondary image.

class VNTrackingRequest

The abstract superclass for image analysis requests that track unique features across multiple images or video frames.

Errors

let VNErrorDomain: String

The domain for NSError objects produced by Vision framework methods.

enum VNErrorCode

Error codes in NSError objects produced by Vision framework methods.

Versions

var VNVisionVersionNumber: Double

The version number of the Vision framework.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software