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

VNImageRequestHandler

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

VNSequenceRequestHandler

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

Face Detection and Recognition

VNDetectFaceRectanglesRequest

An image analysis request that finds faces within an image.

VNDetectFaceLandmarksRequest

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

VNFaceObservation

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

Machine Learning Image Analysis

Classifying Images with Vision and Core ML

Preprocess photos using the Vision framework and classify them with a Core ML model.

VNCoreMLRequest

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

VNClassificationObservation

Scene classification information produced by an image analysis request.

VNPixelBufferObservation

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

VNCoreMLFeatureValueObservation

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

Barcode Detection

VNDetectBarcodesRequest

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

VNBarcodeObservation

Barcode information detected by an image analysis request.

Image Alignment Analysis

VNTranslationalImageRegistrationRequest

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

VNHomographicImageRegistrationRequest

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

VNImageRegistrationRequest

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

VNImageHomographicAlignmentObservation

Perspective warp information produced by an image alignment request.

VNImageTranslationAlignmentObservation

Affine transform information produced by an image alignment request.

VNImageAlignmentObservation

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

Text Detection

VNDetectTextRectanglesRequest

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

VNTextObservation

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

Horizon Detection

VNDetectHorizonRequest

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

VNHorizonObservation

Horizon angle information detected by an image analysis request.

Object Detection and Tracking

VNDetectRectanglesRequest

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

VNTrackRectangleRequest

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

VNTrackObjectRequest

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

VNRectangleObservation

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

VNDetectedObjectObservation

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

Supporting Types

VNRequest

The abstract superclass for image analysis requests.

VNObservation

The abstract superclass for image analysis results.

VNImageBasedRequest

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

VNTargetedImageRequest

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

VNTrackingRequest

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

Errors

VNErrorDomain

The domain for NSError objects produced by Vision framework methods.

VNErrorCode

Error codes in NSError objects produced by Vision framework methods.

Versions

VNVisionVersionNumber

The version number of the Vision framework.

Advanced Topics

Using Vision in Real Time with ARKit

Manage Vision resources for efficient execution of a Core ML image classifier, and use SpriteKit to display image classifier output in AR.