<!--
{
  "documentType" : "article",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/original-objective-c-and-swift-api",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Original Objective-C and Swift API"
}
-->

# Original Objective-C and Swift API

## Topics

### Essentials

[Building a feature-rich app for sports analysis](/documentation/Vision/building-a-feature-rich-app-for-sports-analysis)

Detect and classify human activity in real time using computer vision and machine learning.

### Still-image analysis

[Detecting Objects in Still Images](/documentation/Vision/detecting-objects-in-still-images)

Locate and demarcate rectangles, faces, barcodes, and text in images using the Vision framework.

[Classifying images for categorization and search](/documentation/Vision/classifying-images-for-categorization-and-search)

Analyze and label images using a Vision classification request.

[Analyzing Image Similarity with Feature Print](/documentation/Vision/analyzing-image-similarity-with-feature-print)

Generate a feature print to compute distance between images.

[`VNRequest`](/documentation/Vision/VNRequest)

The abstract superclass for analysis requests.

[`VNImageBasedRequest`](/documentation/Vision/VNImageBasedRequest)

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

[`VNClassifyImageRequest`](/documentation/Vision/VNClassifyImageRequest)

A request to classify an image.

[`VNGenerateImageFeaturePrintRequest`](/documentation/Vision/VNGenerateImageFeaturePrintRequest)

An image-based request to generate feature prints from an image.

[`VNFeaturePrintObservation`](/documentation/Vision/VNFeaturePrintObservation)

An observation that provides the recognized feature print.

[`VNImageRequestHandler`](/documentation/Vision/VNImageRequestHandler)

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

[`VNObservation`](/documentation/Vision/VNObservation)

The abstract superclass for analysis results.

### Image sequence analysis

[Applying Matte Effects to People in Images and Video](/documentation/Vision/applying-matte-effects-to-people-in-images-and-video)

Generate image masks for people automatically by using semantic person-segmentation.

  <doc://com.apple.documentation/documentation/CreateML/detecting-human-actions-in-a-live-video-feed>

[Segmenting and colorizing individuals from a surrounding scene](/documentation/Vision/segmenting-and-colorizing-individuals-from-a-surrounding-scene)

Use the Vision framework to isolate and apply colors to people in an image.

[`VNStatefulRequest`](/documentation/Vision/VNStatefulRequest)

An abstract request type that builds evidence of a condition over time.

[`VNGeneratePersonSegmentationRequest`](/documentation/Vision/VNGeneratePersonSegmentationRequest)

An object that produces a matte image for a person it finds in the input image.

[`VNGeneratePersonInstanceMaskRequest`](/documentation/Vision/VNGeneratePersonInstanceMaskRequest)

An object that produces a mask of individual people it finds in the input image.

[`VNDetectDocumentSegmentationRequest`](/documentation/Vision/VNDetectDocumentSegmentationRequest)

An object that detects rectangular regions that contain text in the input image.

[`VNSequenceRequestHandler`](/documentation/Vision/VNSequenceRequestHandler)

An object that processes image-analysis requests for each frame in a sequence.

### Image aesthetics analysis

[`VNCalculateImageAestheticsScoresRequest`](/documentation/Vision/VNCalculateImageAestheticsScoresRequest)

An object that analyzes an image for aesthetically pleasing attributes.

### Saliency analysis

[Cropping Images Using Saliency](/documentation/Vision/cropping-images-using-saliency)

Isolate regions in an image that are most likely to draw people’s attention.

[Highlighting Areas of Interest in an Image Using Saliency](/documentation/Vision/highlighting-areas-of-interest-in-an-image-using-saliency)

Quantify and visualize where people are likely to look in an image.

[`VNGenerateAttentionBasedSaliencyImageRequest`](/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequest)

An object that produces a heat map that identifies the parts of an image most likely to draw attention.

[`VNGenerateObjectnessBasedSaliencyImageRequest`](/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequest)

A request that generates a heat map that identifies the parts of an image most likely to represent objects.

[`VNSaliencyImageObservation`](/documentation/Vision/VNSaliencyImageObservation)

An observation that contains a grayscale heat map of important areas across an image.

### Object tracking

[Tracking the User’s Face in Real Time](/documentation/Vision/tracking-the-user-s-face-in-real-time)

Detect and track faces from the selfie cam feed in real time.

[Tracking Multiple Objects or Rectangles in Video](/documentation/Vision/tracking-multiple-objects-or-rectangles-in-video)

Apply Vision algorithms to track objects or rectangles throughout a video.

[`VNTrackingRequest`](/documentation/Vision/VNTrackingRequest)

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

[`VNTrackRectangleRequest`](/documentation/Vision/VNTrackRectangleRequest)

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

[`VNTrackObjectRequest`](/documentation/Vision/VNTrackObjectRequest)

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

[`VNDetectedObjectObservation`](/documentation/Vision/VNDetectedObjectObservation)

An observation that provides the position and extent of an image feature that an image- analysis request detects.

### Rectangle detection

[`VNDetectRectanglesRequest`](/documentation/Vision/VNDetectRectanglesRequest)

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

### Face and body detection

[Selecting a selfie based on capture quality](/documentation/Vision/selecting-a-selfie-based-on-capture-quality)

Compare face-capture quality in a set of images by using Vision.

[`VNDetectFaceCaptureQualityRequest`](/documentation/Vision/VNDetectFaceCaptureQualityRequest)

A request that produces a floating-point number that represents the capture quality of a face in a photo.

[`VNDetectFaceLandmarksRequest`](/documentation/Vision/VNDetectFaceLandmarksRequest)

An image-analysis request that finds facial features like eyes and mouth in an image.

[`VNDetectFaceRectanglesRequest`](/documentation/Vision/VNDetectFaceRectanglesRequest)

A request that finds faces within an image.

[`VNDetectHumanRectanglesRequest`](/documentation/Vision/VNDetectHumanRectanglesRequest)

A request that finds rectangular regions that contain people in an image.

[`VNHumanObservation`](/documentation/Vision/VNHumanObservation)

An object that represents a person that the request detects.

### Body and hand pose detection

[Detecting Human Body Poses in Images](/documentation/Vision/detecting-human-body-poses-in-images)

Add the capability to detect human body poses to your app using the Vision framework.

[Detecting Hand Poses with Vision](/documentation/Vision/detecting-hand-poses-with-vision)

Create a virtual drawing app by using Vision’s capability to detect hand poses.

[`VNDetectHumanBodyPoseRequest`](/documentation/Vision/VNDetectHumanBodyPoseRequest)

A request that detects a human body pose.

[`VNDetectHumanHandPoseRequest`](/documentation/Vision/VNDetectHumanHandPoseRequest)

A request that detects a human hand pose.

[`VNRecognizedPointsObservation`](/documentation/Vision/VNRecognizedPointsObservation)

An observation that provides the points the analysis recognized.

[`VNHumanBodyPoseObservation`](/documentation/Vision/VNHumanBodyPoseObservation)

An observation that provides the body points the analysis recognized.

[`VNHumanHandPoseObservation`](/documentation/Vision/VNHumanHandPoseObservation)

An observation that provides the hand points the analysis recognized.

[`VNPoint`](/documentation/Vision/VNPoint)

An immutable object that represents a single 2D point in an image.

[`VNDetectedPoint`](/documentation/Vision/VNDetectedPoint)

An object that represents a normalized point in an image, along with a confidence value.

[`VNRecognizedPoint`](/documentation/Vision/VNRecognizedPoint)

An object that represents a normalized point in an image, along with an identifier label and a confidence value.

[`VNRecognizedPointKey`](/documentation/Vision/VNRecognizedPointKey)

The data type for all recognized point keys.

[`VNRecognizedPointGroupKey`](/documentation/Vision/VNRecognizedPointGroupKey)

The data type for all recognized-point group keys.

### 3D body pose detection

[Identifying 3D human body poses in images](/documentation/Vision/identifying-3d-human-body-poses-in-images)

Detect three-dimensional human body poses using the Vision framework.

[Detecting human body poses in 3D with Vision](/documentation/Vision/detecting-human-body-poses-in-3d-with-vision)

Render skeletons of 3D body pose points in a scene overlaying the input image.

[`VNDetectHumanBodyPose3DRequest`](/documentation/Vision/VNDetectHumanBodyPose3DRequest)

A request that detects points on human bodies in 3D space, relative to the camera.

[`VNHumanBodyPose3DObservation`](/documentation/Vision/VNHumanBodyPose3DObservation)

An observation that provides the 3D body points the request recognizes.

[`VNRecognizedPoints3DObservation`](/documentation/Vision/VNRecognizedPoints3DObservation)

An observation that provides the 3D points for a request.

[`VNHumanBodyRecognizedPoint3D`](/documentation/Vision/VNHumanBodyRecognizedPoint3D)

A recognized 3D point that includes a parent joint.

[`VNPoint3D`](/documentation/Vision/VNPoint3D)

An object that represents a 3D point in an image.

[`VNRecognizedPoint3D`](/documentation/Vision/VNRecognizedPoint3D)

A 3D point that includes an identifier to the point.

[`JointName`](/documentation/Vision/VNHumanBodyPose3DObservation/JointName)

The joint names for a 3D body pose.

[`JointsGroupName`](/documentation/Vision/VNHumanBodyPose3DObservation/JointsGroupName)

The joint group names for a 3D body pose.

### Animal detection

[`VNRecognizeAnimalsRequest`](/documentation/Vision/VNRecognizeAnimalsRequest)

A request that recognizes animals in an image.

### Animal body pose detection

[Detecting animal body poses with Vision](/documentation/Vision/detecting-animal-body-poses-with-vision)

Draw the skeleton of an animal by using Vision’s capability to detect animal body poses.

[`VNDetectAnimalBodyPoseRequest`](/documentation/Vision/VNDetectAnimalBodyPoseRequest)

A request that detects an animal body pose.

[`VNAnimalBodyPoseObservation`](/documentation/Vision/VNAnimalBodyPoseObservation)

An observation that provides the animal body points the analysis recognizes.

### Trajectory detection

[Identifying Trajectories in Video](/documentation/Vision/identifying-trajectories-in-video)

Gain new insights into your video data by using Vision to detect trajectories.

[Detecting moving objects in a video](/documentation/Vision/detecting-moving-objects-in-a-video)

Identify the trajectory of a thrown object by using Vision.

[`VNDetectTrajectoriesRequest`](/documentation/Vision/VNDetectTrajectoriesRequest)

A request that detects the trajectories of shapes moving along a parabolic path.

### Contour detection

[`VNDetectContoursRequest`](/documentation/Vision/VNDetectContoursRequest)

A request that detects the contours of the edges of an image.

### Optical flow

[`VNGenerateOpticalFlowRequest`](/documentation/Vision/VNGenerateOpticalFlowRequest)

An object that generates directional change vectors for each pixel in the targeted image.

[`VNTrackOpticalFlowRequest`](/documentation/Vision/VNTrackOpticalFlowRequest)

An object that determines the direction change of vectors for each pixel from a previous to current image.

### Barcode detection

[`VNDetectBarcodesRequest`](/documentation/Vision/VNDetectBarcodesRequest)

A request that detects barcodes in an image.

[`VNBarcodeCompositeType`](/documentation/Vision/VNBarcodeCompositeType)

Composite types for barcode requests.

### Text detection

[`VNDetectTextRectanglesRequest`](/documentation/Vision/VNDetectTextRectanglesRequest)

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

[`VNTextObservation`](/documentation/Vision/VNTextObservation)

Information about regions of text that an image-analysis request detects.

### Text recognition

[Recognizing Text in Images](/documentation/Vision/recognizing-text-in-images)

Add text-recognition features to your app using the Vision framework.

  <doc://com.apple.documentation/documentation/VisionKit/structuring-recognized-text-on-a-document>

[Extracting phone numbers from text in images](/documentation/Vision/extracting-phone-numbers-from-text-in-images)

Analyze and filter phone numbers from text in live capture by using Vision.

[Locating and displaying recognized text](/documentation/Vision/locating-and-displaying-recognized-text)

Perform text recognition on a photo using the Vision framework’s text-recognition request.

[`VNRecognizeTextRequest`](/documentation/Vision/VNRecognizeTextRequest)

An image-analysis request that finds and recognizes text in an image.

[`VNRecognizedTextObservation`](/documentation/Vision/VNRecognizedTextObservation)

A request that detects and recognizes regions of text in an image.

### Object recognition

[Recognizing Objects in Live Capture](/documentation/Vision/recognizing-objects-in-live-capture)

Apply Vision algorithms to identify objects in real-time video.

  <doc://com.apple.documentation/documentation/CoreML/understanding-a-dice-roll-with-vision-and-object-detection>

[`VNRecognizedObjectObservation`](/documentation/Vision/VNRecognizedObjectObservation)

A detected object observation with an array of classification labels that classify the recognized object.

### Request progress tracking

[`VNRequestProgressProviding`](/documentation/Vision/VNRequestProgressProviding)

A protocol for providing progress information on long-running tasks in Vision.

[`VNRequestProgressHandler`](/documentation/Vision/VNRequestProgressHandler)

A block executed at intervals during the processing of a Vision request.

### Horizon detection

[`VNDetectHorizonRequest`](/documentation/Vision/VNDetectHorizonRequest)

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

[`VNHorizonObservation`](/documentation/Vision/VNHorizonObservation)

The horizon angle information that an image-analysis request detects.

### Image alignment

[Aligning Similar Images](/documentation/Vision/aligning-similar-images)

Construct a composite image from images that capture the same scene.

[`VNTargetedImageRequest`](/documentation/Vision/VNTargetedImageRequest)

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

[`VNImageRegistrationRequest`](/documentation/Vision/VNImageRegistrationRequest)

The abstract superclass for image-analysis requests that align images according to their content.

[`VNTranslationalImageRegistrationRequest`](/documentation/Vision/VNTranslationalImageRegistrationRequest)

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

[`VNTrackTranslationalImageRegistrationRequest`](/documentation/Vision/VNTrackTranslationalImageRegistrationRequest)

An image-analysis request, as a stateful request you track over time, that determines the affine transform necessary to align the content of two images.

[`VNHomographicImageRegistrationRequest`](/documentation/Vision/VNHomographicImageRegistrationRequest)

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

[`VNTrackHomographicImageRegistrationRequest`](/documentation/Vision/VNTrackHomographicImageRegistrationRequest)

An image-analysis request, as a stateful request you track over time, that determines the perspective warp matrix necessary to align the content of two images.

[`VNImageAlignmentObservation`](/documentation/Vision/VNImageAlignmentObservation)

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

[`VNImageTranslationAlignmentObservation`](/documentation/Vision/VNImageTranslationAlignmentObservation)

Affine transform information that an image-alignment request produces.

[`VNImageHomographicAlignmentObservation`](/documentation/Vision/VNImageHomographicAlignmentObservation)

An object that represents a perspective warp transformation.

### Image background removal

[Applying visual effects to foreground subjects](/documentation/Vision/applying-visual-effects-to-foreground-subjects)

Segment the foreground subjects of an image and composite them to a new background with visual effects.

[`VNInstanceMaskObservation`](/documentation/Vision/VNInstanceMaskObservation)

An observation that contains an instance mask that labels instances in the mask.

[`VNGenerateForegroundInstanceMaskRequest`](/documentation/Vision/VNGenerateForegroundInstanceMaskRequest)

A request that generates an instance mask of noticable objects to separate from the background.

[`VNGenerateForegroundInstanceMaskRequestRevision1`](/documentation/Vision/VNGenerateForegroundInstanceMaskRequestRevision1)

A constant for specifying the first revision of the foreground instance mask request.

### Machine learning image analysis

  <doc://com.apple.documentation/documentation/CoreML/classifying-images-with-vision-and-core-ml>

[Training a Create ML Model to Classify Flowers](/documentation/Vision/training-a-create-ml-model-to-classify-flowers)

Train a flower classifier using Create ML in Swift Playgrounds, and apply the resulting model to real-time image classification using Vision.

[`VNCoreMLRequest`](/documentation/Vision/VNCoreMLRequest)

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

[`VNClassificationObservation`](/documentation/Vision/VNClassificationObservation)

An object that represents classification information that an image-analysis request produces.

[`VNPixelBufferObservation`](/documentation/Vision/VNPixelBufferObservation)

An object that represents an image that an image-analysis request produces.

[`VNCoreMLFeatureValueObservation`](/documentation/Vision/VNCoreMLFeatureValueObservation)

An object that represents a collection of key-value information that a Core ML image-analysis request produces.

### Coordinate conversion

[`VNImagePointForNormalizedPoint`](/documentation/Vision/VNImagePointForNormalizedPoint(_:_:_:))

Projects a point in normalized coordinates into image coordinates.

[`VNNormalizedPointForImagePoint`](/documentation/Vision/VNNormalizedPointForImagePoint(_:_:_:))

Projects a point from image coordinates into normalized coordinates.

[`VNImagePointForNormalizedPointUsingRegionOfInterest`](/documentation/Vision/VNImagePointForNormalizedPointUsingRegionOfInterest(_:_:_:_:))

Projects a point from a region of interest within the normalized coordinates into image coordinates.

[`VNNormalizedPointForImagePointUsingRegionOfInterest`](/documentation/Vision/VNNormalizedPointForImagePointUsingRegionOfInterest(_:_:_:_:))

Projects a point from a region of interest within the image coordinates into normalized coordinates.

[`VNImageRectForNormalizedRect`](/documentation/Vision/VNImageRectForNormalizedRect(_:_:_:))

Projects a rectangle from normalized coordinates into image coordinates.

[`VNNormalizedRectForImageRect`](/documentation/Vision/VNNormalizedRectForImageRect(_:_:_:))

Projects a rectangle from image coordinates into normalized coordinates.

[`VNImageRectForNormalizedRectUsingRegionOfInterest`](/documentation/Vision/VNImageRectForNormalizedRectUsingRegionOfInterest(_:_:_:_:))

Projects a rectangle from a region of interest within the normalized coordinates into image coordinates.

[`VNNormalizedRectForImageRectUsingRegionOfInterest`](/documentation/Vision/VNNormalizedRectForImageRectUsingRegionOfInterest(_:_:_:_:))

Projects a rectangle from a region of interest within the image coordinates space into normalized coordinates.

[`VNNormalizedIdentityRect`](/documentation/Vision/VNNormalizedIdentityRect)

A normalized identity rectangle with an origin of zero and unit length and width.

[`VNNormalizedRectIsIdentityRect`](/documentation/Vision/VNNormalizedRectIsIdentityRect(_:))

Returns a Boolean value that indicates whether the rectangle has an origin of zero and unit length and width.

[`VNImagePointForFaceLandmarkPoint`](/documentation/Vision/VNImagePointForFaceLandmarkPoint(_:_:_:_:))

Returns the image coordinates of a specified face landmark point.

[`VNNormalizedFaceBoundingBoxPointForLandmarkPoint`](/documentation/Vision/VNNormalizedFaceBoundingBoxPointForLandmarkPoint(_:_:_:_:))

Returns the coordinates of a specified face landmark point, in bounding box coordinates.

### Utilities

[`VNComputeStage`](/documentation/Vision/VNComputeStage)

Types that represent the compute stage.

[`VNGeometryUtils`](/documentation/Vision/VNGeometryUtils)

Utility methods to determine the geometries of various Vision types.

[`VNVideoProcessor`](/documentation/Vision/VNVideoProcessor)

An object that performs offline analysis of video content.

[`VNVideoProcessingOption`](/documentation/Vision/VNVideoProcessingOption)

Options to pass to the video processor when adding requests.

### Common data types

[`VNCircle`](/documentation/Vision/VNCircle)

An immutable 2D circle represented by its center point and radius.

[`VNVector`](/documentation/Vision/VNVector)

An immutable 2D vector represented by its x-axis and y-axis projections.

### Errors

[`VNErrorDomain`](/documentation/Vision/VNErrorDomain)

The domain of errors that the framework generates.

[`VNErrorCode`](/documentation/Vision/VNErrorCode)

Constants that identify errors from the framework.

### Version and revision numbers

[`VNVisionVersionNumber`](/documentation/Vision/VNVisionVersionNumber)

The current version number of the Vision framework.

[`VNDetectAnimalBodyPoseRequestRevision1`](/documentation/Vision/VNDetectAnimalBodyPoseRequestRevision1)

A value that indicates the first revision for an animal body-pose request.

[`VNDetectHumanBodyPose3DRequestRevision1`](/documentation/Vision/VNDetectHumanBodyPose3DRequestRevision1)

A value that indicates the first revision for a human 3D body pose request.

[`VNTrackHomographicImageRegistrationRequestRevision1`](/documentation/Vision/VNTrackHomographicImageRegistrationRequestRevision1)

A value that indicates the first revision for a homographic image-registration request.

[`VNTrackTranslationalImageRegistrationRequestRevision1`](/documentation/Vision/VNTrackTranslationalImageRegistrationRequestRevision1)

A value that indicates the first revision for a translational image-registration request.

[`VNTrackOpticalFlowRequestRevision1`](/documentation/Vision/VNTrackOpticalFlowRequestRevision1)

A value that indicates the first revision for an optial-flow request.

[`VNClassifyImageRequestRevision1`](/documentation/Vision/VNClassifyImageRequestRevision1)

A constant for specifying the first revision of the image-classification request.

[`VNClassifyImageRequestRevision2`](/documentation/Vision/VNClassifyImageRequestRevision2)

A value that indicates the second revision for an image-classification request.

[`VNGenerateObjectnessBasedSaliencyImageRequestRevision2`](/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequestRevision2)

A value that indicates the second revision for an image-classification request.

[`VNGenerateAttentionBasedSaliencyImageRequestRevision2`](/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequestRevision2)

A value that indicates the second revision for an attention-saliency image request.

[`VNGenerateImageFeaturePrintRequestRevision1`](/documentation/Vision/VNGenerateImageFeaturePrintRequestRevision1)

A constant for specifying the first revision of the feature-print request.

[`VNGenerateImageFeaturePrintRequestRevision2`](/documentation/Vision/VNGenerateImageFeaturePrintRequestRevision2)

A value that indicates the second revision for a feature-print request.

[`VNDetectFaceCaptureQualityRequestRevision3`](/documentation/Vision/VNDetectFaceCaptureQualityRequestRevision3)

A value that indicates the third revision for a face capture-quality request.

[`VNDetectBarcodesRequestRevision4`](/documentation/Vision/VNDetectBarcodesRequestRevision4)

A value that indicates the fourth revision for a barcode request.

[`VNCalculateImageAestheticsScoresRequestRevision1`](/documentation/Vision/VNCalculateImageAestheticsScoresRequestRevision1)

A value that indicates the first revision for an aesthetics scores request.

[`VNRequestRevisionUnspecified`](/documentation/Vision/VNRequestRevisionUnspecified)

A constant for specifying an unspecified request revision.

### Macros

[Macros](/documentation/Vision/Vision-macros)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)