Documentation
¶
Overview ¶
Package vision provides Go bindings for the Vision framework.
Apply computer vision algorithms to perform a variety of tasks on input images and videos.
The Vision framework combines machine learning technologies and Swift’s concurrency features to perform computer vision tasks in your app. Use the Vision framework to analyze images for a variety of purposes:
Text and document analysis ¶
- Locating and displaying recognized text: Perform text recognition on a photo using the Vision framework’s text-recognition request.
- Recognizing tables within a document: Scan a document that contains a table and extract its content in a formatted way.
- DetectBarcodesRequest: A request that detects barcodes in an image. ([BarcodeObservation], [BarcodeSymbology])
- DetectDocumentSegmentationRequest: A request that detects rectangular regions that contain text in the input image.
- DetectTextRectanglesRequest: An image-analysis request that finds regions of visible text in an image. ([TextObservation])
- RecognizeDocumentsRequest: An image-analysis request to scan an image of a document and provide information about its structure.
- RecognizeTextRequest: An image-analysis request that recognizes text in an image. ([RecognizedTextObservation])
Facial analysis ¶
- Analyzing a selfie and visualizing its content: Calculate face-capture quality and visualize facial features for a collection of images using the Vision framework.
- DetectFaceCaptureQualityRequest: A request that produces a floating-point number that represents the capture quality of a face in a photo. ([FaceObservation])
- DetectFaceLandmarksRequest: An image-analysis request that finds facial features like eyes and mouth in an image. ([FaceObservation])
- DetectFaceRectanglesRequest: A request that finds faces within an image. ([FaceObservation])
Image segmentation and subject lifting ¶
- GenerateForegroundInstanceMaskRequest: A request that generates an instance mask of noticeable objects to separate from the background. ([InstanceMaskObservation])
- GeneratePersonInstanceMaskRequest: A request that produces a mask of individual people it finds in the input image. ([InstanceMaskObservation])
- GeneratePersonSegmentationRequest: A request that produces a matte image for a person it finds in the input image. ([PixelBufferObservation])
Pose analysis ¶
- DetectAnimalBodyPoseRequest: A request that detects an animal body pose. ([AnimalBodyPoseObservation])
- DetectHumanBodyPose3DRequest: A request that detects points on human bodies in 3D space, relative to the camera. ([HumanBodyPose3DObservation])
- DetectHumanBodyPoseRequest: A request that detects a human body pose. ([HumanBodyPoseObservation])
- DetectHumanHandPoseRequest: A request that detects a human hand pose. ([HumanHandPoseObservation])
- Supporting Pose Types: Types you use when working with pose analysis. ([Chirality])
Image classification and recognition ¶
- Classifying images for categorization and search: Analyze and label images using a Vision classification request.
- ClassifyImageRequest: A request to classify an image. ([ClassificationObservation])
- DetectHumanRectanglesRequest: A request that finds rectangular regions that contain people in an image. ([HumanObservation])
- RecognizeAnimalsRequest: A request that recognizes animals in an image. ([RecognizedObjectObservation])
Shape and edge detection ¶
- DetectContoursRequest: A request that detects the contours of the edges of an image. ([ContoursObservation])
- DetectHorizonRequest: An image-analysis request that determines the horizon angle in an image. ([HorizonObservation])
- DetectRectanglesRequest: An image-analysis request that finds projected rectangular regions in an image. ([RectangleObservation])
Image quality and saliency analysis ¶
- Generating high-quality thumbnails from videos: Identify the most visually pleasing frames in a video by using the image-aesthetics scores request.
- CalculateImageAestheticsScoresRequest: A request that analyzes an image for aesthetically pleasing attributes. ([ImageAestheticsScoresObservation])
- DetectLensSmudgeRequest: A request that detects a smudge on a lens from an image or video frame capture.
- GenerateAttentionBasedSaliencyImageRequest: An object that produces a heat map that identifies the parts of an image most likely to draw attention. ([SaliencyImageObservation])
- GenerateObjectnessBasedSaliencyImageRequest: A request that generates a heat map that identifies the parts of an image most likely to represent objects. ([SaliencyImageObservation])
Motion and object tracking ¶
- DetectTrajectoriesRequest: A request that detects the trajectories of shapes moving along a parabolic path. ([TrajectoryObservation])
- TrackObjectRequest: An image-analysis request that tracks the movement of a previously identified object across multiple images or video frames. ([DetectedObjectObservation])
- TrackOpticalFlowRequest: A request that determines the direction change of vectors for each pixel from a previous to current image.
- TrackRectangleRequest: An image-analysis request that tracks movement of a previously identified rectangular object across multiple images or video frames. ([RectangleObservation])
Image registration and comparison ¶
- GenerateImageFeaturePrintRequest: An image-based request to generate feature prints from an image. ([FeaturePrintObservation])
- TrackHomographicImageRegistrationRequest: An image-analysis request that you track over time to determine the perspective warp matrix necessary to align the content of two images. ([ImageHomographicAlignmentObservation])
- TrackTranslationalImageRegistrationRequest: An image-analysis request that you track over time to determine the affine transform necessary to align the content of two images. ([ImageTranslationAlignmentObservation], [ComputeStage])
Custom Core ML integration ¶
- CoreMLRequest: An image-analysis request that uses a Core ML model to process images. ([PixelBufferObservation], [ClassificationObservation], [CoreMLFeatureValueObservation], [ComputeStage])
Protocols ¶
- ImageProcessingRequest: A type for image-analysis requests that focus on a specific part of an image.
- PoseProviding: An observation that provides a collection of joints that make up a pose.
- StatefulRequest: The protocol for a type that builds evidence of a condition over time.
- TargetedRequest: A type for analyzing two images together.
- VisionObservation: A type for objects produced by image-analysis requests.
- VisionRequest: A type for image-analysis requests. ([ComputeStage])
Request handlers ¶
- ImageRequestHandler: An object that processes one or more image-analysis requests pertaining to a single image.
- TargetedImageRequestHandler: An object that performs image-analysis requests on two images.
- VideoProcessor: An object that performs offline analysis of video content.
Image locations and regions ¶
- NormalizedPoint: A point in a 2D coordinate system.
- NormalizedRect: The location and dimensions of a rectangle.
- NormalizedRegion: A polygon composed of normalized points.
- NormalizedCircle: The center point and radius of a 2D circle.
- BoundingBoxProviding: A protocol for objects that have a bounding box.
- BoundingRegionProviding: A protocol for objects that have a defined boundary in an image.
- QuadrilateralProviding: A protocol for objects that have a bounding quadrilateral.
- CoordinateOrigin: The origin of a coordinate system relative to an image.
Errors ¶
- VisionError: The errors that the framework produces.
Legacy API ¶
- Original Objective-C and Swift API (VNRequest, VNImageBasedRequest, VNClassifyImageRequest, VNGenerateImageFeaturePrintRequest, VNFeaturePrintObservation)
Key Types ¶
- VNGenerateOpticalFlowRequest - An object that generates directional change vectors for each pixel in the targeted image.
- VNHomographicImageRegistrationRequest - An image-analysis request that determines the perspective warp matrix necessary to align the content of two images.
- VNTranslationalImageRegistrationRequest - An image-analysis request that determines the affine transform necessary to align the content of two images.
- VNImageRegistrationRequest - The abstract superclass for image-analysis requests that align images according to their content.
- VNTargetedImageRequest - The abstract superclass for image analysis requests that operate on both the processed image and a secondary image.
- VNFaceLandmarks2D - A collection of facial features that a request detects.
- VNRecognizeTextRequest - An image-analysis request that finds and recognizes text in an image.
- VNBarcodeObservation - An object that represents barcode information that an image analysis request detects.
- VNImageRequestHandler - An object that processes one or more image-analysis request pertaining to a single image.
- VNRequest - The abstract superclass for analysis requests.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func NewErrorBlock(handler ErrorHandler) (objc.ID, func())
- func VNElementTypeSize(elementType VNElementType) uint
- func VNImagePointForFaceLandmarkPoint(faceLandmarkPoint uintptr, faceBoundingBox corefoundation.CGRect, ...) corefoundation.CGPoint
- func VNImagePointForNormalizedPoint(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, ...) corefoundation.CGPoint
- func VNImagePointForNormalizedPointUsingRegionOfInterest(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, ...) corefoundation.CGPoint
- func VNImageRectForNormalizedRect(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGRect
- func VNImageRectForNormalizedRectUsingRegionOfInterest(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, ...) corefoundation.CGRect
- func VNNormalizedFaceBoundingBoxPointForLandmarkPoint(faceLandmarkPoint uintptr, faceBoundingBox corefoundation.CGRect, ...) corefoundation.CGPoint
- func VNNormalizedPointForImagePoint(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
- func VNNormalizedPointForImagePointUsingRegionOfInterest(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr, ...) corefoundation.CGPoint
- func VNNormalizedRectForImageRect(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGRect
- func VNNormalizedRectForImageRectUsingRegionOfInterest(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, ...) corefoundation.CGRect
- func VNNormalizedRectIsIdentityRect(normalizedRect corefoundation.CGRect) bool
- type ErrorHandler
- type IVNAnimalBodyPoseObservation
- type IVNBarcodeObservation
- type IVNCalculateImageAestheticsScoresRequest
- type IVNCircle
- type IVNClassificationObservation
- type IVNClassifyImageRequest
- type IVNContour
- type IVNContoursObservation
- type IVNCoreMLFeatureValueObservation
- type IVNCoreMLModel
- type IVNCoreMLRequest
- type IVNDetectAnimalBodyPoseRequest
- type IVNDetectBarcodesRequest
- type IVNDetectContoursRequest
- type IVNDetectDocumentSegmentationRequest
- type IVNDetectFaceCaptureQualityRequest
- type IVNDetectFaceLandmarksRequest
- type IVNDetectFaceRectanglesRequest
- type IVNDetectHorizonRequest
- type IVNDetectHumanBodyPose3DRequest
- type IVNDetectHumanBodyPoseRequest
- type IVNDetectHumanHandPoseRequest
- type IVNDetectHumanRectanglesRequest
- type IVNDetectRectanglesRequest
- type IVNDetectTextRectanglesRequest
- type IVNDetectTrajectoriesRequest
- type IVNDetectedObjectObservation
- type IVNDetectedPoint
- type IVNFaceLandmarkRegion
- type IVNFaceLandmarkRegion2D
- type IVNFaceLandmarks
- type IVNFaceLandmarks2D
- type IVNFaceObservation
- type IVNFeaturePrintObservation
- type IVNGenerateAttentionBasedSaliencyImageRequest
- type IVNGenerateForegroundInstanceMaskRequest
- type IVNGenerateImageFeaturePrintRequest
- type IVNGenerateObjectnessBasedSaliencyImageRequest
- type IVNGenerateOpticalFlowRequest
- type IVNGeneratePersonInstanceMaskRequest
- type IVNGeneratePersonSegmentationRequest
- type IVNGeometryUtils
- type IVNHomographicImageRegistrationRequest
- type IVNHorizonObservation
- type IVNHumanBodyPose3DObservation
- type IVNHumanBodyPoseObservation
- type IVNHumanBodyRecognizedPoint3D
- type IVNHumanHandPoseObservation
- type IVNHumanObservation
- type IVNImageAestheticsScoresObservation
- type IVNImageAlignmentObservation
- type IVNImageBasedRequest
- type IVNImageHomographicAlignmentObservation
- type IVNImageRegistrationRequest
- type IVNImageRequestHandler
- type IVNImageTranslationAlignmentObservation
- type IVNInstanceMaskObservation
- type IVNObservation
- type IVNPixelBufferObservation
- type IVNPoint
- type IVNPoint3D
- type IVNRecognizeAnimalsRequest
- type IVNRecognizeTextRequest
- type IVNRecognizedObjectObservation
- type IVNRecognizedPoint
- type IVNRecognizedPoint3D
- type IVNRecognizedPoints3DObservation
- type IVNRecognizedPointsObservation
- type IVNRecognizedText
- type IVNRecognizedTextObservation
- type IVNRectangleObservation
- type IVNRequest
- type IVNSaliencyImageObservation
- type IVNSequenceRequestHandler
- type IVNStatefulRequest
- type IVNTargetedImageRequest
- type IVNTextObservation
- type IVNTrackHomographicImageRegistrationRequest
- type IVNTrackObjectRequest
- type IVNTrackOpticalFlowRequest
- type IVNTrackRectangleRequest
- type IVNTrackTranslationalImageRegistrationRequest
- type IVNTrackingRequest
- type IVNTrajectoryObservation
- type IVNTranslationalImageRegistrationRequest
- type IVNVector
- type IVNVideoProcessor
- type IVNVideoProcessorCadence
- type IVNVideoProcessorFrameRateCadence
- type IVNVideoProcessorRequestProcessingOptions
- type IVNVideoProcessorTimeIntervalCadence
- type VNAnimalBodyPoseObservation
- func (a VNAnimalBodyPoseObservation) Autorelease() VNAnimalBodyPoseObservation
- func (a VNAnimalBodyPoseObservation) AvailableJointGroupNames() []string
- func (a VNAnimalBodyPoseObservation) AvailableJointNames() []string
- func (a VNAnimalBodyPoseObservation) Init() VNAnimalBodyPoseObservation
- func (a VNAnimalBodyPoseObservation) RecognizedPointForJointNameError(jointName VNAnimalBodyPoseObservationJointName) (IVNRecognizedPoint, error)
- func (a VNAnimalBodyPoseObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNAnimalBodyPoseObservationJointsGroupName) (foundation.INSDictionary, error)
- type VNAnimalBodyPoseObservationClass
- type VNAnimalBodyPoseObservationJointName
- type VNAnimalBodyPoseObservationJointsGroupName
- type VNAnimalIdentifier
- type VNAspectRatio
- type VNBarcodeCompositeType
- type VNBarcodeObservation
- func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNBarcodeObservation
- func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNBarcodeObservation
- func NewBarcodeObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNBarcodeObservation
- func NewBarcodeObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNBarcodeObservation
- func NewVNBarcodeObservation() VNBarcodeObservation
- func VNBarcodeObservationFromID(id objc.ID) VNBarcodeObservation
- func (b VNBarcodeObservation) Autorelease() VNBarcodeObservation
- func (b VNBarcodeObservation) BarcodeDescriptor() coreimage.CIBarcodeDescriptor
- func (b VNBarcodeObservation) Init() VNBarcodeObservation
- func (b VNBarcodeObservation) IsColorInverted() bool
- func (b VNBarcodeObservation) IsGS1DataCarrier() bool
- func (b VNBarcodeObservation) PayloadData() foundation.INSData
- func (b VNBarcodeObservation) PayloadStringValue() string
- func (b VNBarcodeObservation) SupplementalCompositeType() VNBarcodeCompositeType
- func (b VNBarcodeObservation) SupplementalPayloadData() foundation.INSData
- func (b VNBarcodeObservation) SupplementalPayloadString() string
- func (b VNBarcodeObservation) Symbology() VNBarcodeSymbology
- type VNBarcodeObservationClass
- type VNBarcodeSymbology
- type VNCalculateImageAestheticsScoresRequest
- func NewCalculateImageAestheticsScoresRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNCalculateImageAestheticsScoresRequest
- func NewVNCalculateImageAestheticsScoresRequest() VNCalculateImageAestheticsScoresRequest
- func VNCalculateImageAestheticsScoresRequestFromID(id objc.ID) VNCalculateImageAestheticsScoresRequest
- type VNCalculateImageAestheticsScoresRequestClass
- type VNChirality
- type VNCircle
- func (c VNCircle) Autorelease() VNCircle
- func (c VNCircle) Center() IVNPoint
- func (c VNCircle) ContainsPoint(point IVNPoint) bool
- func (c VNCircle) ContainsPointInCircumferentialRingOfWidth(point IVNPoint, ringWidth float64) bool
- func (c VNCircle) Diameter() float64
- func (c VNCircle) EncodeWithCoder(coder foundation.INSCoder)
- func (c VNCircle) Init() VNCircle
- func (c VNCircle) InitWithCenterDiameter(center IVNPoint, diameter float64) VNCircle
- func (c VNCircle) InitWithCenterRadius(center IVNPoint, radius float64) VNCircle
- func (c VNCircle) Radius() float64
- type VNCircleClass
- type VNClassificationObservation
- func (c VNClassificationObservation) Autorelease() VNClassificationObservation
- func (c VNClassificationObservation) HasMinimumPrecisionForRecall(minimumPrecision float32, recall float32) bool
- func (c VNClassificationObservation) HasMinimumRecallForPrecision(minimumRecall float32, precision float32) bool
- func (c VNClassificationObservation) HasPrecisionRecallCurve() bool
- func (c VNClassificationObservation) Identifier() string
- func (c VNClassificationObservation) Init() VNClassificationObservation
- func (c VNClassificationObservation) ModelDescription() coreml.MLModelDescription
- func (c VNClassificationObservation) PredictedFeatureName() string
- func (c VNClassificationObservation) SetModelDescription(value coreml.MLModelDescription)
- func (c VNClassificationObservation) SetPredictedFeatureName(value string)
- type VNClassificationObservationClass
- type VNClassifyImageRequest
- type VNClassifyImageRequestClass
- type VNComputeStage
- type VNConfidence
- type VNContour
- func (c VNContour) AspectRatio() float32
- func (c VNContour) Autorelease() VNContour
- func (c VNContour) ChildContourAtIndexError(childContourIndex uint) (IVNContour, error)
- func (c VNContour) ChildContourCount() int
- func (c VNContour) ChildContours() []VNContour
- func (c VNContour) ContourCount() int
- func (c VNContour) IndexPath() objc.ID
- func (c VNContour) Init() VNContour
- func (c VNContour) NormalizedPath() coregraphics.CGPathRef
- func (c VNContour) NormalizedPoints() objectivec.IObject
- func (c VNContour) PointCount() int
- func (c VNContour) PolygonApproximationWithEpsilonError(epsilon float32) (IVNContour, error)
- func (c VNContour) RequestRevision() uint
- func (c VNContour) SetContourCount(value int)
- func (c VNContour) SetTopLevelContourCount(value int)
- func (c VNContour) SetTopLevelContours(value IVNContour)
- func (c VNContour) TopLevelContourCount() int
- func (c VNContour) TopLevelContours() IVNContour
- type VNContourClass
- type VNContoursObservation
- func (c VNContoursObservation) Autorelease() VNContoursObservation
- func (c VNContoursObservation) ContourAtIndexError(contourIndex int) (IVNContour, error)
- func (c VNContoursObservation) ContourAtIndexPathError(indexPath objectivec.IObject) (IVNContour, error)
- func (c VNContoursObservation) ContourCount() int
- func (c VNContoursObservation) Init() VNContoursObservation
- func (c VNContoursObservation) NormalizedPath() coregraphics.CGPathRef
- func (c VNContoursObservation) Results() IVNContoursObservation
- func (c VNContoursObservation) SetResults(value IVNContoursObservation)
- func (c VNContoursObservation) TopLevelContourCount() int
- func (c VNContoursObservation) TopLevelContours() []VNContour
- type VNContoursObservationClass
- type VNCoreMLFeatureValueObservation
- func (c VNCoreMLFeatureValueObservation) Autorelease() VNCoreMLFeatureValueObservation
- func (c VNCoreMLFeatureValueObservation) FeatureName() string
- func (c VNCoreMLFeatureValueObservation) FeatureValue() coreml.MLFeatureValue
- func (c VNCoreMLFeatureValueObservation) Init() VNCoreMLFeatureValueObservation
- func (c VNCoreMLFeatureValueObservation) ModelDescription() coreml.MLModelDescription
- func (c VNCoreMLFeatureValueObservation) OutputDescriptionsByName() coreml.MLFeatureDescription
- func (c VNCoreMLFeatureValueObservation) PredictedFeatureName() string
- func (c VNCoreMLFeatureValueObservation) SetModelDescription(value coreml.MLModelDescription)
- func (c VNCoreMLFeatureValueObservation) SetOutputDescriptionsByName(value coreml.MLFeatureDescription)
- func (c VNCoreMLFeatureValueObservation) SetPredictedFeatureName(value string)
- type VNCoreMLFeatureValueObservationClass
- type VNCoreMLModel
- func (c VNCoreMLModel) Autorelease() VNCoreMLModel
- func (c VNCoreMLModel) FeatureProvider() coreml.MLFeatureProvider
- func (c VNCoreMLModel) Init() VNCoreMLModel
- func (c VNCoreMLModel) InputImageFeatureName() string
- func (c VNCoreMLModel) Model() IVNCoreMLModel
- func (c VNCoreMLModel) SetFeatureProvider(value coreml.MLFeatureProvider)
- func (c VNCoreMLModel) SetInputImageFeatureName(value string)
- func (c VNCoreMLModel) SetModel(value IVNCoreMLModel)
- type VNCoreMLModelClass
- type VNCoreMLRequest
- func NewCoreMLRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNCoreMLRequest
- func NewCoreMLRequestWithModel(model IVNCoreMLModel) VNCoreMLRequest
- func NewCoreMLRequestWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestCompletionHandler) VNCoreMLRequest
- func NewVNCoreMLRequest() VNCoreMLRequest
- func VNCoreMLRequestFromID(id objc.ID) VNCoreMLRequest
- func (c VNCoreMLRequest) Autorelease() VNCoreMLRequest
- func (c VNCoreMLRequest) Confidence() VNConfidence
- func (c VNCoreMLRequest) ImageCropAndScaleOption() VNImageCropAndScaleOption
- func (c VNCoreMLRequest) Init() VNCoreMLRequest
- func (c VNCoreMLRequest) InitWithModel(model IVNCoreMLModel) VNCoreMLRequest
- func (c VNCoreMLRequest) InitWithModelCompletionHandler(model IVNCoreMLModel, completionHandler ErrorHandler) VNCoreMLRequest
- func (c VNCoreMLRequest) Model() IVNCoreMLModel
- func (c VNCoreMLRequest) ModelDescription() coreml.MLModelDescription
- func (c VNCoreMLRequest) PredictedFeatureName() string
- func (c VNCoreMLRequest) SetConfidence(value VNConfidence)
- func (c VNCoreMLRequest) SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
- func (c VNCoreMLRequest) SetModelDescription(value coreml.MLModelDescription)
- func (c VNCoreMLRequest) SetPredictedFeatureName(value string)
- func (c VNCoreMLRequest) VNCoreMLRequestRevision1() int
- type VNCoreMLRequestClass
- type VNDegrees
- type VNDetectAnimalBodyPoseRequest
- func (d VNDetectAnimalBodyPoseRequest) Autorelease() VNDetectAnimalBodyPoseRequest
- func (d VNDetectAnimalBodyPoseRequest) Init() VNDetectAnimalBodyPoseRequest
- func (d VNDetectAnimalBodyPoseRequest) SetSupportedJointNames(value VNAnimalBodyPoseObservationJointName)
- func (d VNDetectAnimalBodyPoseRequest) SetSupportedJointsGroupNames(value VNAnimalBodyPoseObservationJointsGroupName)
- func (d VNDetectAnimalBodyPoseRequest) SupportedJointNames() VNAnimalBodyPoseObservationJointName
- func (d VNDetectAnimalBodyPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNames() VNAnimalBodyPoseObservationJointsGroupName
- func (d VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- type VNDetectAnimalBodyPoseRequestClass
- type VNDetectBarcodesRequest
- func (d VNDetectBarcodesRequest) Autorelease() VNDetectBarcodesRequest
- func (d VNDetectBarcodesRequest) CoalesceCompositeSymbologies() bool
- func (d VNDetectBarcodesRequest) Init() VNDetectBarcodesRequest
- func (d VNDetectBarcodesRequest) SetCoalesceCompositeSymbologies(value bool)
- func (d VNDetectBarcodesRequest) SetSymbologies(value []string)
- func (d VNDetectBarcodesRequest) SupportedSymbologiesAndReturnError() ([]string, error)
- func (d VNDetectBarcodesRequest) Symbologies() []string
- func (d VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision1() int
- func (d VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision2() int
- func (d VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision3() int
- type VNDetectBarcodesRequestClass
- type VNDetectContoursRequest
- func (d VNDetectContoursRequest) Autorelease() VNDetectContoursRequest
- func (d VNDetectContoursRequest) ContrastAdjustment() float32
- func (d VNDetectContoursRequest) ContrastPivot() foundation.NSNumber
- func (d VNDetectContoursRequest) DetectsDarkOnLight() bool
- func (d VNDetectContoursRequest) Init() VNDetectContoursRequest
- func (d VNDetectContoursRequest) MaximumImageDimension() uint
- func (d VNDetectContoursRequest) SetContrastAdjustment(value float32)
- func (d VNDetectContoursRequest) SetContrastPivot(value foundation.NSNumber)
- func (d VNDetectContoursRequest) SetDetectsDarkOnLight(value bool)
- func (d VNDetectContoursRequest) SetMaximumImageDimension(value uint)
- func (d VNDetectContoursRequest) VNDetectContourRequestRevision1() int
- type VNDetectContoursRequestClass
- type VNDetectDocumentSegmentationRequest
- func NewDetectDocumentSegmentationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectDocumentSegmentationRequest
- func NewVNDetectDocumentSegmentationRequest() VNDetectDocumentSegmentationRequest
- func VNDetectDocumentSegmentationRequestFromID(id objc.ID) VNDetectDocumentSegmentationRequest
- type VNDetectDocumentSegmentationRequestClass
- type VNDetectFaceCaptureQualityRequest
- func NewDetectFaceCaptureQualityRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectFaceCaptureQualityRequest
- func NewVNDetectFaceCaptureQualityRequest() VNDetectFaceCaptureQualityRequest
- func VNDetectFaceCaptureQualityRequestFromID(id objc.ID) VNDetectFaceCaptureQualityRequest
- func (d VNDetectFaceCaptureQualityRequest) Autorelease() VNDetectFaceCaptureQualityRequest
- func (d VNDetectFaceCaptureQualityRequest) FaceCaptureQuality() float32
- func (d VNDetectFaceCaptureQualityRequest) Init() VNDetectFaceCaptureQualityRequest
- func (d VNDetectFaceCaptureQualityRequest) InputFaceObservations() []VNFaceObservation
- func (d VNDetectFaceCaptureQualityRequest) SetFaceCaptureQuality(value float32)
- func (d VNDetectFaceCaptureQualityRequest) SetInputFaceObservations(value []VNFaceObservation)
- func (d VNDetectFaceCaptureQualityRequest) VNDetectFaceCaptureQualityRequestRevision1() int
- func (d VNDetectFaceCaptureQualityRequest) VNDetectFaceCaptureQualityRequestRevision2() int
- type VNDetectFaceCaptureQualityRequestClass
- type VNDetectFaceLandmarksRequest
- func (d VNDetectFaceLandmarksRequest) Autorelease() VNDetectFaceLandmarksRequest
- func (d VNDetectFaceLandmarksRequest) Constellation() VNRequestFaceLandmarksConstellation
- func (d VNDetectFaceLandmarksRequest) Init() VNDetectFaceLandmarksRequest
- func (d VNDetectFaceLandmarksRequest) InputFaceObservations() IVNFaceObservation
- func (d VNDetectFaceLandmarksRequest) SetConstellation(value VNRequestFaceLandmarksConstellation)
- func (d VNDetectFaceLandmarksRequest) SetInputFaceObservations(value IVNFaceObservation)
- func (d VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision1() int
- func (d VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision2() int
- func (d VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision3() int
- type VNDetectFaceLandmarksRequestClass
- type VNDetectFaceRectanglesRequest
- func (d VNDetectFaceRectanglesRequest) Autorelease() VNDetectFaceRectanglesRequest
- func (d VNDetectFaceRectanglesRequest) Init() VNDetectFaceRectanglesRequest
- func (d VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision1() int
- func (d VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision2() int
- func (d VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision3() int
- type VNDetectFaceRectanglesRequestClass
- type VNDetectHorizonRequest
- type VNDetectHorizonRequestClass
- type VNDetectHumanBodyPose3DRequest
- func NewDetectHumanBodyPose3DRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectHumanBodyPose3DRequest
- func NewDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNDetectHumanBodyPose3DRequest
- func NewVNDetectHumanBodyPose3DRequest() VNDetectHumanBodyPose3DRequest
- func VNDetectHumanBodyPose3DRequestFromID(id objc.ID) VNDetectHumanBodyPose3DRequest
- func (d VNDetectHumanBodyPose3DRequest) Autorelease() VNDetectHumanBodyPose3DRequest
- func (d VNDetectHumanBodyPose3DRequest) Init() VNDetectHumanBodyPose3DRequest
- func (d VNDetectHumanBodyPose3DRequest) SetSupportedJointNames(value VNHumanBodyPose3DObservationJointName)
- func (d VNDetectHumanBodyPose3DRequest) SetSupportedJointsGroupNames(value VNHumanBodyPose3DObservationJointsGroupName)
- func (d VNDetectHumanBodyPose3DRequest) SupportedJointNames() VNHumanBodyPose3DObservationJointName
- func (d VNDetectHumanBodyPose3DRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNames() VNHumanBodyPose3DObservationJointsGroupName
- func (d VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- type VNDetectHumanBodyPose3DRequestClass
- type VNDetectHumanBodyPoseRequest
- func (d VNDetectHumanBodyPoseRequest) Autorelease() VNDetectHumanBodyPoseRequest
- func (d VNDetectHumanBodyPoseRequest) Init() VNDetectHumanBodyPoseRequest
- func (d VNDetectHumanBodyPoseRequest) SetSupportedJointNames(value VNHumanBodyPoseObservationJointName)
- func (d VNDetectHumanBodyPoseRequest) SetSupportedJointsGroupNames(value VNHumanBodyPoseObservationJointsGroupName)
- func (d VNDetectHumanBodyPoseRequest) SupportedJointNames() VNHumanBodyPoseObservationJointName
- func (d VNDetectHumanBodyPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanBodyPoseRequest) SupportedJointsGroupNames() VNHumanBodyPoseObservationJointsGroupName
- func (d VNDetectHumanBodyPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanBodyPoseRequest) VNDetectHumanBodyPoseRequestRevision1() int
- type VNDetectHumanBodyPoseRequestClass
- type VNDetectHumanHandPoseRequest
- func (d VNDetectHumanHandPoseRequest) Autorelease() VNDetectHumanHandPoseRequest
- func (d VNDetectHumanHandPoseRequest) Init() VNDetectHumanHandPoseRequest
- func (d VNDetectHumanHandPoseRequest) MaximumHandCount() uint
- func (d VNDetectHumanHandPoseRequest) SetMaximumHandCount(value uint)
- func (d VNDetectHumanHandPoseRequest) SetSupportedJointNames(value VNHumanHandPoseObservationJointName)
- func (d VNDetectHumanHandPoseRequest) SetSupportedJointsGroupNames(value VNHumanHandPoseObservationJointsGroupName)
- func (d VNDetectHumanHandPoseRequest) SupportedJointNames() VNHumanHandPoseObservationJointName
- func (d VNDetectHumanHandPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanHandPoseRequest) SupportedJointsGroupNames() VNHumanHandPoseObservationJointsGroupName
- func (d VNDetectHumanHandPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanHandPoseRequest) VNDetectHumanHandPoseRequestRevision1() int
- type VNDetectHumanHandPoseRequestClass
- type VNDetectHumanRectanglesRequest
- func (d VNDetectHumanRectanglesRequest) Autorelease() VNDetectHumanRectanglesRequest
- func (d VNDetectHumanRectanglesRequest) Init() VNDetectHumanRectanglesRequest
- func (d VNDetectHumanRectanglesRequest) SetUpperBodyOnly(value bool)
- func (d VNDetectHumanRectanglesRequest) UpperBodyOnly() bool
- func (d VNDetectHumanRectanglesRequest) VNDetectHumanRectanglesRequestRevision1() int
- func (d VNDetectHumanRectanglesRequest) VNDetectHumanRectanglesRequestRevision2() int
- type VNDetectHumanRectanglesRequestClass
- type VNDetectRectanglesRequest
- func (d VNDetectRectanglesRequest) Autorelease() VNDetectRectanglesRequest
- func (d VNDetectRectanglesRequest) Init() VNDetectRectanglesRequest
- func (d VNDetectRectanglesRequest) MaximumAspectRatio() VNAspectRatio
- func (d VNDetectRectanglesRequest) MaximumObservations() uint
- func (d VNDetectRectanglesRequest) MinimumAspectRatio() VNAspectRatio
- func (d VNDetectRectanglesRequest) MinimumConfidence() VNConfidence
- func (d VNDetectRectanglesRequest) MinimumSize() float32
- func (d VNDetectRectanglesRequest) QuadratureTolerance() VNDegrees
- func (d VNDetectRectanglesRequest) SetMaximumAspectRatio(value VNAspectRatio)
- func (d VNDetectRectanglesRequest) SetMaximumObservations(value uint)
- func (d VNDetectRectanglesRequest) SetMinimumAspectRatio(value VNAspectRatio)
- func (d VNDetectRectanglesRequest) SetMinimumConfidence(value VNConfidence)
- func (d VNDetectRectanglesRequest) SetMinimumSize(value float32)
- func (d VNDetectRectanglesRequest) SetQuadratureTolerance(value VNDegrees)
- func (d VNDetectRectanglesRequest) VNDetectRectanglesRequestRevision1() int
- type VNDetectRectanglesRequestClass
- type VNDetectTextRectanglesRequest
- func (d VNDetectTextRectanglesRequest) Autorelease() VNDetectTextRectanglesRequest
- func (d VNDetectTextRectanglesRequest) Init() VNDetectTextRectanglesRequest
- func (d VNDetectTextRectanglesRequest) ReportCharacterBoxes() bool
- func (d VNDetectTextRectanglesRequest) SetReportCharacterBoxes(value bool)
- func (d VNDetectTextRectanglesRequest) VNDetectTextRectanglesRequestRevision1() int
- type VNDetectTextRectanglesRequestClass
- type VNDetectTrajectoriesRequest
- func NewDetectTrajectoriesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectTrajectoriesRequest
- func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNDetectTrajectoriesRequest
- func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing objectivec.IObject, trajectoryLength int, ...) VNDetectTrajectoriesRequest
- func NewVNDetectTrajectoriesRequest() VNDetectTrajectoriesRequest
- func VNDetectTrajectoriesRequestFromID(id objc.ID) VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) Autorelease() VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) Init() VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing objectivec.IObject, trajectoryLength int, ...) VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) ObjectMaximumNormalizedRadius() float32
- func (d VNDetectTrajectoriesRequest) ObjectMinimumNormalizedRadius() float32
- func (d VNDetectTrajectoriesRequest) SetObjectMaximumNormalizedRadius(value float32)
- func (d VNDetectTrajectoriesRequest) SetObjectMinimumNormalizedRadius(value float32)
- func (d VNDetectTrajectoriesRequest) SetTargetFrameTime(value objectivec.IObject)
- func (d VNDetectTrajectoriesRequest) TargetFrameTime() objectivec.IObject
- func (d VNDetectTrajectoriesRequest) TrajectoryLength() int
- func (d VNDetectTrajectoriesRequest) VNDetectTrajectoriesRequestRevision1() int
- type VNDetectTrajectoriesRequestClass
- type VNDetectedObjectObservation
- func NewDetectedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNDetectedObjectObservation
- func NewDetectedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNDetectedObjectObservation
- func NewVNDetectedObjectObservation() VNDetectedObjectObservation
- func VNDetectedObjectObservationFromID(id objc.ID) VNDetectedObjectObservation
- func (d VNDetectedObjectObservation) Autorelease() VNDetectedObjectObservation
- func (d VNDetectedObjectObservation) BoundingBox() corefoundation.CGRect
- func (d VNDetectedObjectObservation) GlobalSegmentationMask() IVNPixelBufferObservation
- func (d VNDetectedObjectObservation) Init() VNDetectedObjectObservation
- type VNDetectedObjectObservationClass
- type VNDetectedPoint
- type VNDetectedPointClass
- type VNElementType
- type VNErrorCode
- type VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) Autorelease() VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) EncodeWithCoder(coder foundation.INSCoder)
- func (f VNFaceLandmarkRegion) Init() VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) Landmarks() IVNFaceLandmarks2D
- func (f VNFaceLandmarkRegion) PointCount() uint
- func (f VNFaceLandmarkRegion) RequestRevision() uint
- func (f VNFaceLandmarkRegion) SetLandmarks(value IVNFaceLandmarks2D)
- type VNFaceLandmarkRegion2D
- func (f VNFaceLandmarkRegion2D) Autorelease() VNFaceLandmarkRegion2D
- func (f VNFaceLandmarkRegion2D) Init() VNFaceLandmarkRegion2D
- func (f VNFaceLandmarkRegion2D) NormalizedPoints() *corefoundation.CGPoint
- func (f VNFaceLandmarkRegion2D) PointsClassification() VNPointsClassification
- func (f VNFaceLandmarkRegion2D) PointsInImageOfSize(imageSize corefoundation.CGSize) *corefoundation.CGPoint
- func (f VNFaceLandmarkRegion2D) PrecisionEstimatesPerPoint() []foundation.NSNumber
- type VNFaceLandmarkRegion2DClass
- type VNFaceLandmarkRegionClass
- type VNFaceLandmarks
- func (f VNFaceLandmarks) Autorelease() VNFaceLandmarks
- func (f VNFaceLandmarks) Confidence() VNConfidence
- func (f VNFaceLandmarks) EncodeWithCoder(coder foundation.INSCoder)
- func (f VNFaceLandmarks) Init() VNFaceLandmarks
- func (f VNFaceLandmarks) Landmarks() IVNFaceLandmarks2D
- func (f VNFaceLandmarks) RequestRevision() uint
- func (f VNFaceLandmarks) SetLandmarks(value IVNFaceLandmarks2D)
- type VNFaceLandmarks2D
- func (f VNFaceLandmarks2D) AllPoints() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) Autorelease() VNFaceLandmarks2D
- func (f VNFaceLandmarks2D) BoundingBox() corefoundation.CGRect
- func (f VNFaceLandmarks2D) FaceContour() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) Init() VNFaceLandmarks2D
- func (f VNFaceLandmarks2D) InnerLips() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) LeftEye() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) LeftEyebrow() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) LeftPupil() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) MedianLine() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) Nose() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) NoseCrest() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) OuterLips() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) RightEye() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) RightEyebrow() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) RightPupil() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) SetBoundingBox(value corefoundation.CGRect)
- type VNFaceLandmarks2DClass
- type VNFaceLandmarksClass
- type VNFaceObservation
- func NewFaceObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNFaceObservation
- func NewFaceObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNFaceObservation
- func NewFaceObservationWithRequestRevisionBoundingBoxRollYawPitch(requestRevision uint, boundingBox corefoundation.CGRect, ...) VNFaceObservation
- func NewVNFaceObservation() VNFaceObservation
- func VNFaceObservationFromID(id objc.ID) VNFaceObservation
- func (f VNFaceObservation) Autorelease() VNFaceObservation
- func (f VNFaceObservation) FaceCaptureQuality() foundation.NSNumber
- func (f VNFaceObservation) Init() VNFaceObservation
- func (f VNFaceObservation) Landmarks() IVNFaceLandmarks2D
- func (f VNFaceObservation) Pitch() foundation.NSNumber
- func (f VNFaceObservation) Results() IVNFaceObservation
- func (f VNFaceObservation) Roll() foundation.NSNumber
- func (f VNFaceObservation) SetResults(value IVNFaceObservation)
- func (f VNFaceObservation) Yaw() foundation.NSNumber
- type VNFaceObservationAccepting
- type VNFaceObservationAcceptingObject
- type VNFaceObservationClass
- type VNFeaturePrintObservation
- func (f VNFeaturePrintObservation) Autorelease() VNFeaturePrintObservation
- func (f VNFeaturePrintObservation) ComputeDistanceToFeaturePrintObservationError(featurePrint VNFeaturePrintObservation) (float32, error)
- func (f VNFeaturePrintObservation) Data() foundation.INSData
- func (f VNFeaturePrintObservation) ElementCount() uint
- func (f VNFeaturePrintObservation) ElementType() VNElementType
- func (f VNFeaturePrintObservation) Init() VNFeaturePrintObservation
- type VNFeaturePrintObservationClass
- type VNGenerateAttentionBasedSaliencyImageRequest
- func NewGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateAttentionBasedSaliencyImageRequest
- func NewVNGenerateAttentionBasedSaliencyImageRequest() VNGenerateAttentionBasedSaliencyImageRequest
- func VNGenerateAttentionBasedSaliencyImageRequestFromID(id objc.ID) VNGenerateAttentionBasedSaliencyImageRequest
- func (g VNGenerateAttentionBasedSaliencyImageRequest) Autorelease() VNGenerateAttentionBasedSaliencyImageRequest
- func (g VNGenerateAttentionBasedSaliencyImageRequest) Init() VNGenerateAttentionBasedSaliencyImageRequest
- func (g VNGenerateAttentionBasedSaliencyImageRequest) VNGenerateAttentionBasedSaliencyImageRequestRevision1() int
- type VNGenerateAttentionBasedSaliencyImageRequestClass
- type VNGenerateForegroundInstanceMaskRequest
- func NewGenerateForegroundInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateForegroundInstanceMaskRequest
- func NewVNGenerateForegroundInstanceMaskRequest() VNGenerateForegroundInstanceMaskRequest
- func VNGenerateForegroundInstanceMaskRequestFromID(id objc.ID) VNGenerateForegroundInstanceMaskRequest
- func (g VNGenerateForegroundInstanceMaskRequest) Autorelease() VNGenerateForegroundInstanceMaskRequest
- func (g VNGenerateForegroundInstanceMaskRequest) Init() VNGenerateForegroundInstanceMaskRequest
- func (g VNGenerateForegroundInstanceMaskRequest) VNGenerateForegroundInstanceMaskRequestRevision1() int
- type VNGenerateForegroundInstanceMaskRequestClass
- type VNGenerateImageFeaturePrintRequest
- func NewGenerateImageFeaturePrintRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateImageFeaturePrintRequest
- func NewVNGenerateImageFeaturePrintRequest() VNGenerateImageFeaturePrintRequest
- func VNGenerateImageFeaturePrintRequestFromID(id objc.ID) VNGenerateImageFeaturePrintRequest
- func (g VNGenerateImageFeaturePrintRequest) Autorelease() VNGenerateImageFeaturePrintRequest
- func (g VNGenerateImageFeaturePrintRequest) ImageCropAndScaleOption() VNImageCropAndScaleOption
- func (g VNGenerateImageFeaturePrintRequest) Init() VNGenerateImageFeaturePrintRequest
- func (g VNGenerateImageFeaturePrintRequest) SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
- func (g VNGenerateImageFeaturePrintRequest) VNGenerateImageFeaturePrintRequestRevision1() int
- type VNGenerateImageFeaturePrintRequestClass
- type VNGenerateObjectnessBasedSaliencyImageRequest
- func NewGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateObjectnessBasedSaliencyImageRequest
- func NewVNGenerateObjectnessBasedSaliencyImageRequest() VNGenerateObjectnessBasedSaliencyImageRequest
- func VNGenerateObjectnessBasedSaliencyImageRequestFromID(id objc.ID) VNGenerateObjectnessBasedSaliencyImageRequest
- func (g VNGenerateObjectnessBasedSaliencyImageRequest) Autorelease() VNGenerateObjectnessBasedSaliencyImageRequest
- func (g VNGenerateObjectnessBasedSaliencyImageRequest) Init() VNGenerateObjectnessBasedSaliencyImageRequest
- func (g VNGenerateObjectnessBasedSaliencyImageRequest) VNGenerateObjectnessBasedSaliencyImageRequestRevision1() int
- type VNGenerateObjectnessBasedSaliencyImageRequestClass
- type VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequest() VNGenerateOpticalFlowRequest
- func VNGenerateOpticalFlowRequestFromID(id objc.ID) VNGenerateOpticalFlowRequest
- func (g VNGenerateOpticalFlowRequest) Autorelease() VNGenerateOpticalFlowRequest
- func (g VNGenerateOpticalFlowRequest) ComputationAccuracy() VNGenerateOpticalFlowRequestComputationAccuracy
- func (g VNGenerateOpticalFlowRequest) Init() VNGenerateOpticalFlowRequest
- func (g VNGenerateOpticalFlowRequest) KeepNetworkOutput() bool
- func (g VNGenerateOpticalFlowRequest) OutputPixelFormat() uint32
- func (g VNGenerateOpticalFlowRequest) SetComputationAccuracy(value VNGenerateOpticalFlowRequestComputationAccuracy)
- func (g VNGenerateOpticalFlowRequest) SetKeepNetworkOutput(value bool)
- func (g VNGenerateOpticalFlowRequest) SetOutputPixelFormat(value uint32)
- func (g VNGenerateOpticalFlowRequest) VNGenerateOpticalFlowRequestRevision1() int
- func (g VNGenerateOpticalFlowRequest) VNGenerateOpticalFlowRequestRevision2() int
- type VNGenerateOpticalFlowRequestClass
- type VNGenerateOpticalFlowRequestComputationAccuracy
- type VNGeneratePersonInstanceMaskRequest
- func NewGeneratePersonInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGeneratePersonInstanceMaskRequest
- func NewVNGeneratePersonInstanceMaskRequest() VNGeneratePersonInstanceMaskRequest
- func VNGeneratePersonInstanceMaskRequestFromID(id objc.ID) VNGeneratePersonInstanceMaskRequest
- type VNGeneratePersonInstanceMaskRequestClass
- type VNGeneratePersonSegmentationRequest
- func NewGeneratePersonSegmentationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGeneratePersonSegmentationRequest
- func NewGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNGeneratePersonSegmentationRequest
- func NewVNGeneratePersonSegmentationRequest() VNGeneratePersonSegmentationRequest
- func VNGeneratePersonSegmentationRequestFromID(id objc.ID) VNGeneratePersonSegmentationRequest
- func (g VNGeneratePersonSegmentationRequest) Autorelease() VNGeneratePersonSegmentationRequest
- func (g VNGeneratePersonSegmentationRequest) Init() VNGeneratePersonSegmentationRequest
- func (g VNGeneratePersonSegmentationRequest) OutputPixelFormat() uint32
- func (g VNGeneratePersonSegmentationRequest) QualityLevel() VNGeneratePersonSegmentationRequestQualityLevel
- func (g VNGeneratePersonSegmentationRequest) SetOutputPixelFormat(value uint32)
- func (g VNGeneratePersonSegmentationRequest) SetQualityLevel(value VNGeneratePersonSegmentationRequestQualityLevel)
- func (g VNGeneratePersonSegmentationRequest) SupportedOutputPixelFormatsAndReturnError() ([]foundation.NSNumber, error)
- func (g VNGeneratePersonSegmentationRequest) VNGeneratePersonSegmentationRequestRevision1() int
- type VNGeneratePersonSegmentationRequestClass
- type VNGeneratePersonSegmentationRequestQualityLevel
- type VNGeometryUtils
- type VNGeometryUtilsClass
- func (vc VNGeometryUtilsClass) Alloc() VNGeometryUtils
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) BoundingCircleForContourError(contour IVNContour) (VNCircle, error)
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) BoundingCircleForPointsError(points []VNPoint) (VNCircle, error)
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) BoundingCircleForSIMDPointsPointCountError(points objectivec.IObject, pointCount int) (VNCircle, error)
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) CalculateAreaForContourOrientedAreaError(contour VNContour, orientedArea bool) (float64, error)
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) CalculatePerimeterForContourError(contour VNContour) (float64, error)
- type VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequest() VNHomographicImageRegistrationRequest
- func VNHomographicImageRegistrationRequestFromID(id objc.ID) VNHomographicImageRegistrationRequest
- type VNHomographicImageRegistrationRequestClass
- type VNHorizonObservation
- func (h VNHorizonObservation) Angle() float64
- func (h VNHorizonObservation) Autorelease() VNHorizonObservation
- func (h VNHorizonObservation) Init() VNHorizonObservation
- func (h VNHorizonObservation) Transform() corefoundation.CGAffineTransform
- func (h VNHorizonObservation) TransformForImageWidthHeight(width uintptr, height uintptr) corefoundation.CGAffineTransform
- type VNHorizonObservationClass
- type VNHumanBodyPose3DObservation
- func (h VNHumanBodyPose3DObservation) Autorelease() VNHumanBodyPose3DObservation
- func (h VNHumanBodyPose3DObservation) AvailableJointNames() []string
- func (h VNHumanBodyPose3DObservation) AvailableJointsGroupNames() []string
- func (h VNHumanBodyPose3DObservation) BodyHeight() float32
- func (h VNHumanBodyPose3DObservation) CameraOriginMatrix() objectivec.IObject
- func (h VNHumanBodyPose3DObservation) GetCameraRelativePositionForJointNameError(modelPositionOut objectivec.IObject, ...) (bool, error)
- func (h VNHumanBodyPose3DObservation) HeightEstimation() VNHumanBodyPose3DObservationHeightEstimation
- func (h VNHumanBodyPose3DObservation) Init() VNHumanBodyPose3DObservation
- func (h VNHumanBodyPose3DObservation) ParentJointNameForJointName(jointName VNHumanBodyPose3DObservationJointName) VNHumanBodyPose3DObservationJointName
- func (h VNHumanBodyPose3DObservation) PointInImageForJointNameError(jointName VNHumanBodyPose3DObservationJointName) (IVNPoint, error)
- func (h VNHumanBodyPose3DObservation) RecognizedPointForJointNameError(jointName VNHumanBodyPose3DObservationJointName) (IVNHumanBodyRecognizedPoint3D, error)
- func (h VNHumanBodyPose3DObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanBodyPose3DObservationJointsGroupName) (foundation.INSDictionary, error)
- type VNHumanBodyPose3DObservationClass
- type VNHumanBodyPose3DObservationHeightEstimation
- type VNHumanBodyPose3DObservationJointName
- type VNHumanBodyPose3DObservationJointsGroupName
- type VNHumanBodyPoseObservation
- func (h VNHumanBodyPoseObservation) Autorelease() VNHumanBodyPoseObservation
- func (h VNHumanBodyPoseObservation) AvailableJointNames() []string
- func (h VNHumanBodyPoseObservation) AvailableJointsGroupNames() []string
- func (h VNHumanBodyPoseObservation) Init() VNHumanBodyPoseObservation
- func (h VNHumanBodyPoseObservation) RecognizedPointForJointNameError(jointName VNHumanBodyPoseObservationJointName) (IVNRecognizedPoint, error)
- func (h VNHumanBodyPoseObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanBodyPoseObservationJointsGroupName) (foundation.INSDictionary, error)
- type VNHumanBodyPoseObservationClass
- type VNHumanBodyPoseObservationJointName
- type VNHumanBodyPoseObservationJointsGroupName
- type VNHumanBodyRecognizedPoint3D
- func (h VNHumanBodyRecognizedPoint3D) Autorelease() VNHumanBodyRecognizedPoint3D
- func (h VNHumanBodyRecognizedPoint3D) Init() VNHumanBodyRecognizedPoint3D
- func (h VNHumanBodyRecognizedPoint3D) LocalPosition() objectivec.IObject
- func (h VNHumanBodyRecognizedPoint3D) ParentJoint() VNHumanBodyPose3DObservationJointName
- type VNHumanBodyRecognizedPoint3DClass
- type VNHumanHandPoseObservation
- func (h VNHumanHandPoseObservation) Autorelease() VNHumanHandPoseObservation
- func (h VNHumanHandPoseObservation) AvailableJointNames() []string
- func (h VNHumanHandPoseObservation) AvailableJointsGroupNames() []string
- func (h VNHumanHandPoseObservation) Chirality() VNChirality
- func (h VNHumanHandPoseObservation) Init() VNHumanHandPoseObservation
- func (h VNHumanHandPoseObservation) RecognizedPointForJointNameError(jointName VNHumanHandPoseObservationJointName) (IVNRecognizedPoint, error)
- func (h VNHumanHandPoseObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanHandPoseObservationJointsGroupName) (foundation.INSDictionary, error)
- type VNHumanHandPoseObservationClass
- type VNHumanHandPoseObservationJointName
- type VNHumanHandPoseObservationJointsGroupName
- type VNHumanObservation
- func NewHumanObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNHumanObservation
- func NewHumanObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNHumanObservation
- func NewVNHumanObservation() VNHumanObservation
- func VNHumanObservationFromID(id objc.ID) VNHumanObservation
- type VNHumanObservationClass
- type VNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) Autorelease() VNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) Init() VNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) IsUtility() bool
- func (i VNImageAestheticsScoresObservation) OverallScore() float32
- func (i VNImageAestheticsScoresObservation) Results() IVNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) SetResults(value IVNImageAestheticsScoresObservation)
- type VNImageAestheticsScoresObservationClass
- type VNImageAlignmentObservation
- type VNImageAlignmentObservationClass
- type VNImageBasedRequest
- type VNImageBasedRequestClass
- type VNImageCropAndScaleOption
- type VNImageHomographicAlignmentObservation
- type VNImageHomographicAlignmentObservationClass
- type VNImageOption
- type VNImageRegistrationRequest
- func NewImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequest() VNImageRegistrationRequest
- func VNImageRegistrationRequestFromID(id objc.ID) VNImageRegistrationRequest
- type VNImageRegistrationRequestClass
- type VNImageRequestHandler
- func NewImageRequestHandlerWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
- func NewImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithCIImageOptions(image coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
- func NewImageRequestHandlerWithCIImageOrientationOptions(image coreimage.CIImage, orientation objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer objectivec.IObject, depthData objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
- func NewImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
- func NewImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRequestHandler
- func NewImageRequestHandlerWithDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNImageRequestHandler
- func NewImageRequestHandlerWithURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRequestHandler
- func NewImageRequestHandlerWithURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNImageRequestHandler
- func NewVNImageRequestHandler() VNImageRequestHandler
- func VNImageRequestHandlerFromID(id objc.ID) VNImageRequestHandler
- func (i VNImageRequestHandler) Autorelease() VNImageRequestHandler
- func (i VNImageRequestHandler) Init() VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCIImageOptions(image coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCIImageOrientationOptions(image coreimage.CIImage, orientation objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer objectivec.IObject, depthData objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) PerformRequestsError(requests []VNRequest) (bool, error)
- type VNImageRequestHandlerClass
- type VNImageTranslationAlignmentObservation
- func (i VNImageTranslationAlignmentObservation) AlignmentTransform() corefoundation.CGAffineTransform
- func (i VNImageTranslationAlignmentObservation) Autorelease() VNImageTranslationAlignmentObservation
- func (i VNImageTranslationAlignmentObservation) Init() VNImageTranslationAlignmentObservation
- func (i VNImageTranslationAlignmentObservation) VNTranslationalImageRegistrationRequestRevision1() int
- type VNImageTranslationAlignmentObservationClass
- type VNInstanceMaskObservation
- func (i VNInstanceMaskObservation) AllInstances() foundation.NSIndexSet
- func (i VNInstanceMaskObservation) Autorelease() VNInstanceMaskObservation
- func (i VNInstanceMaskObservation) GenerateMaskForInstancesError(instances foundation.NSIndexSet) (corevideo.CVImageBufferRef, error)
- func (i VNInstanceMaskObservation) GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError(instances foundation.NSIndexSet, requestHandler IVNImageRequestHandler, ...) (corevideo.CVImageBufferRef, error)
- func (i VNInstanceMaskObservation) GenerateScaledMaskForImageForInstancesFromRequestHandlerError(instances foundation.NSIndexSet, requestHandler IVNImageRequestHandler) (corevideo.CVImageBufferRef, error)
- func (i VNInstanceMaskObservation) Init() VNInstanceMaskObservation
- func (i VNInstanceMaskObservation) InstanceMask() corevideo.CVImageBufferRef
- func (i VNInstanceMaskObservation) VNGenerateForegroundInstanceMaskRequestRevision1() int
- type VNInstanceMaskObservationClass
- type VNObservation
- func (o VNObservation) Autorelease() VNObservation
- func (o VNObservation) Confidence() VNConfidence
- func (o VNObservation) EncodeWithCoder(coder foundation.INSCoder)
- func (o VNObservation) Init() VNObservation
- func (o VNObservation) RequestRevision() uint
- func (o VNObservation) TimeRange() objectivec.IObject
- func (o VNObservation) Uuid() foundation.NSUUID
- type VNObservationClass
- type VNPixelBufferObservation
- func (p VNPixelBufferObservation) Autorelease() VNPixelBufferObservation
- func (p VNPixelBufferObservation) FeatureName() string
- func (p VNPixelBufferObservation) Init() VNPixelBufferObservation
- func (p VNPixelBufferObservation) ModelDescription() coreml.MLModelDescription
- func (p VNPixelBufferObservation) OutputDescriptionsByName() coreml.MLFeatureDescription
- func (p VNPixelBufferObservation) PixelBuffer() corevideo.CVImageBufferRef
- func (p VNPixelBufferObservation) SetModelDescription(value coreml.MLModelDescription)
- func (p VNPixelBufferObservation) SetOutputDescriptionsByName(value coreml.MLFeatureDescription)
- type VNPixelBufferObservationClass
- type VNPoint
- func (p VNPoint) Autorelease() VNPoint
- func (p VNPoint) DistanceToPoint(point IVNPoint) float64
- func (p VNPoint) EncodeWithCoder(coder foundation.INSCoder)
- func (p VNPoint) Init() VNPoint
- func (p VNPoint) InitWithLocation(location corefoundation.CGPoint) VNPoint
- func (p VNPoint) InitWithXY(x float64, y float64) VNPoint
- func (p VNPoint) Location() corefoundation.CGPoint
- func (p VNPoint) X() float64
- func (p VNPoint) Y() float64
- type VNPoint3D
- type VNPoint3DClass
- type VNPointClass
- type VNPointsClassification
- type VNRecognizeAnimalsRequest
- func (r VNRecognizeAnimalsRequest) Autorelease() VNRecognizeAnimalsRequest
- func (r VNRecognizeAnimalsRequest) Init() VNRecognizeAnimalsRequest
- func (r VNRecognizeAnimalsRequest) SupportedIdentifiersAndReturnError() ([]string, error)
- func (r VNRecognizeAnimalsRequest) VNRecognizeAnimalsRequestRevision1() int
- func (r VNRecognizeAnimalsRequest) VNRecognizeAnimalsRequestRevision2() int
- type VNRecognizeAnimalsRequestClass
- type VNRecognizeTextRequest
- func (r VNRecognizeTextRequest) AutomaticallyDetectsLanguage() bool
- func (r VNRecognizeTextRequest) Autorelease() VNRecognizeTextRequest
- func (r VNRecognizeTextRequest) CustomWords() []string
- func (r VNRecognizeTextRequest) Indeterminate() bool
- func (r VNRecognizeTextRequest) Init() VNRecognizeTextRequest
- func (r VNRecognizeTextRequest) MinimumTextHeight() float32
- func (r VNRecognizeTextRequest) ProgressHandler() VNRequestProgressHandler
- func (r VNRecognizeTextRequest) RecognitionLanguages() []string
- func (r VNRecognizeTextRequest) RecognitionLevel() VNRequestTextRecognitionLevel
- func (r VNRecognizeTextRequest) SetAutomaticallyDetectsLanguage(value bool)
- func (r VNRecognizeTextRequest) SetCustomWords(value []string)
- func (r VNRecognizeTextRequest) SetMinimumTextHeight(value float32)
- func (r VNRecognizeTextRequest) SetProgressHandler(value VNRequestProgressHandler)
- func (r VNRecognizeTextRequest) SetRecognitionLanguages(value []string)
- func (r VNRecognizeTextRequest) SetRecognitionLevel(value VNRequestTextRecognitionLevel)
- func (r VNRecognizeTextRequest) SetUsesLanguageCorrection(value bool)
- func (r VNRecognizeTextRequest) SupportedRecognitionLanguagesAndReturnError() ([]string, error)
- func (r VNRecognizeTextRequest) UsesLanguageCorrection() bool
- func (r VNRecognizeTextRequest) VNRecognizeTextRequestRevision1() int
- func (r VNRecognizeTextRequest) VNRecognizeTextRequestRevision2() int
- func (r VNRecognizeTextRequest) VNRecognizeTextRequestRevision3() int
- type VNRecognizeTextRequestClass
- type VNRecognizedObjectObservation
- func NewRecognizedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
- func NewRecognizedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
- func NewVNRecognizedObjectObservation() VNRecognizedObjectObservation
- func VNRecognizedObjectObservationFromID(id objc.ID) VNRecognizedObjectObservation
- type VNRecognizedObjectObservationClass
- type VNRecognizedPoint
- type VNRecognizedPoint3D
- type VNRecognizedPoint3DClass
- type VNRecognizedPointClass
- type VNRecognizedPointGroupKey
- type VNRecognizedPointKey
- type VNRecognizedPoints3DObservation
- func (r VNRecognizedPoints3DObservation) Autorelease() VNRecognizedPoints3DObservation
- func (r VNRecognizedPoints3DObservation) AvailableGroupKeys() []string
- func (r VNRecognizedPoints3DObservation) AvailableKeys() []string
- func (r VNRecognizedPoints3DObservation) Init() VNRecognizedPoints3DObservation
- func (r VNRecognizedPoints3DObservation) RecognizedPointForKeyError(pointKey VNRecognizedPointKey) (IVNRecognizedPoint3D, error)
- func (r VNRecognizedPoints3DObservation) RecognizedPointsForGroupKeyError(groupKey VNRecognizedPointGroupKey) (foundation.INSDictionary, error)
- type VNRecognizedPoints3DObservationClass
- type VNRecognizedPointsObservation
- func (r VNRecognizedPointsObservation) Autorelease() VNRecognizedPointsObservation
- func (r VNRecognizedPointsObservation) AvailableGroupKeys() []string
- func (r VNRecognizedPointsObservation) AvailableKeys() []string
- func (r VNRecognizedPointsObservation) Init() VNRecognizedPointsObservation
- func (r VNRecognizedPointsObservation) KeypointsMultiArrayAndReturnError() (coreml.MLMultiArray, error)
- func (r VNRecognizedPointsObservation) RecognizedPointForKeyError(pointKey VNRecognizedPointKey) (IVNRecognizedPoint, error)
- func (r VNRecognizedPointsObservation) RecognizedPointsForGroupKeyError(groupKey VNRecognizedPointGroupKey) (foundation.INSDictionary, error)
- type VNRecognizedPointsObservationClass
- type VNRecognizedText
- func (r VNRecognizedText) Autorelease() VNRecognizedText
- func (r VNRecognizedText) BoundingBoxForRangeError(range_ foundation.NSRange) (IVNRectangleObservation, error)
- func (r VNRecognizedText) Confidence() VNConfidence
- func (r VNRecognizedText) EncodeWithCoder(coder foundation.INSCoder)
- func (r VNRecognizedText) Init() VNRecognizedText
- func (r VNRecognizedText) RequestRevision() uint
- func (r VNRecognizedText) String() string
- type VNRecognizedTextClass
- type VNRecognizedTextObservation
- func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRecognizedTextObservation
- func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRecognizedTextObservation
- func NewRecognizedTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedTextObservation
- func NewRecognizedTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedTextObservation
- func NewVNRecognizedTextObservation() VNRecognizedTextObservation
- func VNRecognizedTextObservationFromID(id objc.ID) VNRecognizedTextObservation
- type VNRecognizedTextObservationClass
- type VNRectangleObservation
- func NewRectangleObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRectangleObservation
- func NewRectangleObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRectangleObservation
- func NewRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRectangleObservation
- func NewRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRectangleObservation
- func NewVNRectangleObservation() VNRectangleObservation
- func VNRectangleObservationFromID(id objc.ID) VNRectangleObservation
- func (r VNRectangleObservation) Autorelease() VNRectangleObservation
- func (r VNRectangleObservation) BottomLeft() corefoundation.CGPoint
- func (r VNRectangleObservation) BottomRight() corefoundation.CGPoint
- func (r VNRectangleObservation) Init() VNRectangleObservation
- func (r VNRectangleObservation) Results() IVNRectangleObservation
- func (r VNRectangleObservation) SetResults(value IVNRectangleObservation)
- func (r VNRectangleObservation) TopLeft() corefoundation.CGPoint
- func (r VNRectangleObservation) TopRight() corefoundation.CGPoint
- type VNRectangleObservationClass
- type VNRequest
- func (r VNRequest) Autorelease() VNRequest
- func (r VNRequest) Cancel()
- func (r VNRequest) CompletionHandler() VNRequestCompletionHandler
- func (r VNRequest) ComputeDeviceForComputeStage(computeStage VNComputeStage) coreml.MLComputeDeviceProtocol
- func (r VNRequest) Init() VNRequest
- func (r VNRequest) InitWithCompletionHandler(completionHandler ErrorHandler) VNRequest
- func (r VNRequest) PreferBackgroundProcessing() bool
- func (r VNRequest) Results() []VNObservation
- func (r VNRequest) Revision() uint
- func (r VNRequest) SetComputeDeviceForComputeStage(computeDevice coreml.MLComputeDeviceProtocol, computeStage VNComputeStage)
- func (r VNRequest) SetPreferBackgroundProcessing(value bool)
- func (r VNRequest) SetRevision(value uint)
- func (r VNRequest) SetSupportedComputeStageDevices(value objectivec.IObject)
- func (r VNRequest) SetUsesCPUOnly(value bool)
- func (r VNRequest) SupportedComputeStageDevices() objectivec.IObject
- func (r VNRequest) SupportedComputeStageDevicesAndReturnError() (foundation.INSDictionary, error)
- func (r VNRequest) UsesCPUOnly() bool
- type VNRequestClass
- type VNRequestCompletionHandler
- type VNRequestFaceLandmarksConstellation
- type VNRequestProgressHandler
- type VNRequestProgressProviding
- type VNRequestProgressProvidingObject
- func (o VNRequestProgressProvidingObject) BaseObject() objectivec.Object
- func (o VNRequestProgressProvidingObject) Indeterminate() bool
- func (o VNRequestProgressProvidingObject) ProgressHandler() VNRequestProgressHandler
- func (o VNRequestProgressProvidingObject) SetProgressHandler(value VNRequestProgressHandler)
- type VNRequestRevisionProviding
- type VNRequestRevisionProvidingObject
- type VNRequestTextRecognitionLevel
- type VNRequestTrackingLevel
- type VNSaliencyImageObservation
- type VNSaliencyImageObservationClass
- type VNSequenceRequestHandler
- func (s VNSequenceRequestHandler) Autorelease() VNSequenceRequestHandler
- func (s VNSequenceRequestHandler) Init() VNSequenceRequestHandler
- func (s VNSequenceRequestHandler) PerformRequestsOnCGImageError(requests []VNRequest, image coregraphics.CGImageRef) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCGImageOrientationError(requests []VNRequest, image coregraphics.CGImageRef, ...) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCIImageError(requests []VNRequest, image coreimage.CIImage) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCIImageOrientationError(requests []VNRequest, image coreimage.CIImage, orientation objectivec.IObject) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferError(requests []VNRequest, sampleBuffer objectivec.IObject) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferOrientationError(requests []VNRequest, sampleBuffer objectivec.IObject, ...) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferOrientationError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef, ...) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageDataError(requests []VNRequest, imageData foundation.INSData) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageDataOrientationError(requests []VNRequest, imageData foundation.INSData, ...) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageURLError(requests []VNRequest, imageURL foundation.INSURL) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageURLOrientationError(requests []VNRequest, imageURL foundation.INSURL, ...) (bool, error)
- type VNSequenceRequestHandlerClass
- type VNStatefulRequest
- func NewStatefulRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNStatefulRequest
- func NewStatefulRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNStatefulRequest
- func NewVNStatefulRequest() VNStatefulRequest
- func VNStatefulRequestFromID(id objc.ID) VNStatefulRequest
- func (s VNStatefulRequest) Autorelease() VNStatefulRequest
- func (s VNStatefulRequest) FrameAnalysisSpacing() objectivec.IObject
- func (s VNStatefulRequest) Init() VNStatefulRequest
- func (s VNStatefulRequest) InitWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler ErrorHandler) VNStatefulRequest
- func (s VNStatefulRequest) MinimumLatencyFrameCount() int
- type VNStatefulRequestClass
- type VNTargetedImageRequest
- func NewTargetedImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequest() VNTargetedImageRequest
- func VNTargetedImageRequestFromID(id objc.ID) VNTargetedImageRequest
- func (t VNTargetedImageRequest) Autorelease() VNTargetedImageRequest
- func (t VNTargetedImageRequest) Init() VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNTargetedImageRequest
- type VNTargetedImageRequestClass
- type VNTextObservation
- func NewTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNTextObservation
- func NewTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNTextObservation
- func NewTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNTextObservation
- func NewTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNTextObservation
- func NewVNTextObservation() VNTextObservation
- func VNTextObservationFromID(id objc.ID) VNTextObservation
- type VNTextObservationClass
- type VNTrackHomographicImageRegistrationRequest
- func NewTrackHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackHomographicImageRegistrationRequest
- func NewTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNTrackHomographicImageRegistrationRequest
- func NewVNTrackHomographicImageRegistrationRequest() VNTrackHomographicImageRegistrationRequest
- func VNTrackHomographicImageRegistrationRequestFromID(id objc.ID) VNTrackHomographicImageRegistrationRequest
- type VNTrackHomographicImageRegistrationRequestClass
- type VNTrackObjectRequest
- func NewTrackObjectRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackObjectRequest
- func NewTrackObjectRequestWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
- func NewTrackObjectRequestWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, ...) VNTrackObjectRequest
- func NewVNTrackObjectRequest() VNTrackObjectRequest
- func VNTrackObjectRequestFromID(id objc.ID) VNTrackObjectRequest
- func (t VNTrackObjectRequest) Autorelease() VNTrackObjectRequest
- func (t VNTrackObjectRequest) Init() VNTrackObjectRequest
- func (t VNTrackObjectRequest) InitWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
- func (t VNTrackObjectRequest) InitWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, completionHandler ErrorHandler) VNTrackObjectRequest
- func (t VNTrackObjectRequest) VNTrackObjectRequestRevision1() int
- func (t VNTrackObjectRequest) VNTrackObjectRequestRevision2() int
- type VNTrackObjectRequestClass
- type VNTrackOpticalFlowRequest
- func NewTrackOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackOpticalFlowRequest
- func NewTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNTrackOpticalFlowRequest
- func NewVNTrackOpticalFlowRequest() VNTrackOpticalFlowRequest
- func VNTrackOpticalFlowRequestFromID(id objc.ID) VNTrackOpticalFlowRequest
- func (t VNTrackOpticalFlowRequest) Autorelease() VNTrackOpticalFlowRequest
- func (t VNTrackOpticalFlowRequest) ComputationAccuracy() VNTrackOpticalFlowRequestComputationAccuracy
- func (t VNTrackOpticalFlowRequest) Init() VNTrackOpticalFlowRequest
- func (t VNTrackOpticalFlowRequest) KeepNetworkOutput() bool
- func (t VNTrackOpticalFlowRequest) OutputPixelFormat() uint32
- func (t VNTrackOpticalFlowRequest) SetComputationAccuracy(value VNTrackOpticalFlowRequestComputationAccuracy)
- func (t VNTrackOpticalFlowRequest) SetKeepNetworkOutput(value bool)
- func (t VNTrackOpticalFlowRequest) SetOutputPixelFormat(value uint32)
- type VNTrackOpticalFlowRequestClass
- type VNTrackOpticalFlowRequestComputationAccuracy
- type VNTrackRectangleRequest
- func NewTrackRectangleRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackRectangleRequest
- func NewTrackRectangleRequestWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
- func NewTrackRectangleRequestWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, ...) VNTrackRectangleRequest
- func NewVNTrackRectangleRequest() VNTrackRectangleRequest
- func VNTrackRectangleRequestFromID(id objc.ID) VNTrackRectangleRequest
- func (t VNTrackRectangleRequest) Autorelease() VNTrackRectangleRequest
- func (t VNTrackRectangleRequest) Init() VNTrackRectangleRequest
- func (t VNTrackRectangleRequest) InitWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
- func (t VNTrackRectangleRequest) InitWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler ErrorHandler) VNTrackRectangleRequest
- func (t VNTrackRectangleRequest) VNTrackRectangleRequestRevision1() int
- type VNTrackRectangleRequestClass
- type VNTrackTranslationalImageRegistrationRequest
- func NewTrackTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackTranslationalImageRegistrationRequest
- func NewTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, ...) VNTrackTranslationalImageRegistrationRequest
- func NewVNTrackTranslationalImageRegistrationRequest() VNTrackTranslationalImageRegistrationRequest
- func VNTrackTranslationalImageRegistrationRequestFromID(id objc.ID) VNTrackTranslationalImageRegistrationRequest
- type VNTrackTranslationalImageRegistrationRequestClass
- type VNTrackingRequest
- func (t VNTrackingRequest) Autorelease() VNTrackingRequest
- func (t VNTrackingRequest) Init() VNTrackingRequest
- func (t VNTrackingRequest) InputObservation() IVNDetectedObjectObservation
- func (t VNTrackingRequest) LastFrame() bool
- func (t VNTrackingRequest) SetInputObservation(value IVNDetectedObjectObservation)
- func (t VNTrackingRequest) SetLastFrame(value bool)
- func (t VNTrackingRequest) SetTrackingLevel(value VNRequestTrackingLevel)
- func (t VNTrackingRequest) SupportedNumberOfTrackersAndReturnError() (uint, error)
- func (t VNTrackingRequest) TrackingLevel() VNRequestTrackingLevel
- type VNTrackingRequestClass
- type VNTrajectoryObservation
- func (t VNTrajectoryObservation) Autorelease() VNTrajectoryObservation
- func (t VNTrajectoryObservation) DetectedPoints() []VNPoint
- func (t VNTrajectoryObservation) EquationCoefficients() objectivec.IObject
- func (t VNTrajectoryObservation) Init() VNTrajectoryObservation
- func (t VNTrajectoryObservation) MovingAverageRadius() float64
- func (t VNTrajectoryObservation) ProjectedPoints() []VNPoint
- func (t VNTrajectoryObservation) Results() IVNTrajectoryObservation
- func (t VNTrajectoryObservation) SetResults(value IVNTrajectoryObservation)
- type VNTrajectoryObservationClass
- type VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequest() VNTranslationalImageRegistrationRequest
- func VNTranslationalImageRegistrationRequestFromID(id objc.ID) VNTranslationalImageRegistrationRequest
- type VNTranslationalImageRegistrationRequestClass
- type VNVector
- func NewVNVector() VNVector
- func NewVectorByAddingVectorToVector(v1 IVNVector, v2 IVNVector) VNVector
- func NewVectorByMultiplyingVectorByScalar(vector IVNVector, scalar float64) VNVector
- func NewVectorBySubtractingVectorFromVector(v1 IVNVector, v2 IVNVector) VNVector
- func NewVectorWithRTheta(r float64, theta float64) VNVector
- func NewVectorWithVectorHeadTail(head IVNPoint, tail IVNPoint) VNVector
- func NewVectorWithXComponentYComponent(x float64, y float64) VNVector
- func VNVectorFromID(id objc.ID) VNVector
- func (v VNVector) Autorelease() VNVector
- func (v VNVector) EncodeWithCoder(coder foundation.INSCoder)
- func (v VNVector) Init() VNVector
- func (v VNVector) InitWithRTheta(r float64, theta float64) VNVector
- func (v VNVector) InitWithVectorHeadTail(head IVNPoint, tail IVNPoint) VNVector
- func (v VNVector) InitWithXComponentYComponent(x float64, y float64) VNVector
- func (v VNVector) Length() float64
- func (v VNVector) R() float64
- func (v VNVector) SquaredLength() float64
- func (v VNVector) Theta() float64
- func (v VNVector) X() float64
- func (v VNVector) Y() float64
- type VNVectorClass
- type VNVideoProcessor
- func (v VNVideoProcessor) AddRequestProcessingOptionsError(request IVNRequest, ...) (bool, error)
- func (v VNVideoProcessor) AnalyzeTimeRangeError(timeRange objectivec.IObject) (bool, error)
- func (v VNVideoProcessor) Autorelease() VNVideoProcessor
- func (v VNVideoProcessor) Cancel()
- func (v VNVideoProcessor) Init() VNVideoProcessor
- func (v VNVideoProcessor) InitWithURL(videoURL foundation.INSURL) VNVideoProcessor
- func (v VNVideoProcessor) RemoveRequestError(request IVNRequest) (bool, error)
- type VNVideoProcessorCadence
- type VNVideoProcessorCadenceClass
- type VNVideoProcessorClass
- type VNVideoProcessorFrameRateCadence
- func (v VNVideoProcessorFrameRateCadence) Autorelease() VNVideoProcessorFrameRateCadence
- func (v VNVideoProcessorFrameRateCadence) FrameRate() int
- func (v VNVideoProcessorFrameRateCadence) Init() VNVideoProcessorFrameRateCadence
- func (v VNVideoProcessorFrameRateCadence) InitWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadence
- type VNVideoProcessorFrameRateCadenceClass
- type VNVideoProcessorRequestProcessingOptions
- func (v VNVideoProcessorRequestProcessingOptions) Autorelease() VNVideoProcessorRequestProcessingOptions
- func (v VNVideoProcessorRequestProcessingOptions) Cadence() IVNVideoProcessorCadence
- func (v VNVideoProcessorRequestProcessingOptions) Init() VNVideoProcessorRequestProcessingOptions
- func (v VNVideoProcessorRequestProcessingOptions) SetCadence(value IVNVideoProcessorCadence)
- type VNVideoProcessorRequestProcessingOptionsClass
- type VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) Autorelease() VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) Init() VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) InitWithTimeInterval(timeInterval float64) VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) TimeInterval() float64
- type VNVideoProcessorTimeIntervalCadenceClass
Constants ¶
const ( // VNCalculateImageAestheticsScoresRequestRevision1 is a value that indicates the first revision for an aesthetics scores request. // // See: https://developer.apple.com/documentation/Vision/VNCalculateImageAestheticsScoresRequestRevision1 VNCalculateImageAestheticsScoresRequestRevision1 uint = 1 // VNClassifyImageRequestRevision1 is a constant for specifying the first revision of the image-classification request. // // See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequestRevision1 VNClassifyImageRequestRevision1 uint = 1 // VNClassifyImageRequestRevision2 is a value that indicates the second revision for an image-classification request. // // See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequestRevision2 VNClassifyImageRequestRevision2 uint = 2 // VNCoreMLRequestRevision1 is a constant for specifying revision 1 of a Core ML request. // // See: https://developer.apple.com/documentation/Vision/VNCoreMLRequestRevision1 VNCoreMLRequestRevision1 uint = 1 // VNDetectAnimalBodyPoseRequestRevision1 is a value that indicates the first revision for an animal body-pose request. // // See: https://developer.apple.com/documentation/Vision/VNDetectAnimalBodyPoseRequestRevision1 VNDetectAnimalBodyPoseRequestRevision1 uint = 1 // VNDetectBarcodesRequestRevision3 is a constant for specifying revision 3 of the barcode detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequestRevision3 VNDetectBarcodesRequestRevision3 uint = 3 // VNDetectBarcodesRequestRevision4 is a value that indicates the fourth revision for a barcode request. // // See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequestRevision4 VNDetectBarcodesRequestRevision4 uint = 4 // VNDetectContourRequestRevision1 is a constant for specifying revision 1 of the contours detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectContourRequestRevision1 VNDetectContourRequestRevision1 uint = 1 // VNDetectDocumentSegmentationRequestRevision1 is a constant for specifying revision 1 of the document segmentation request. // // See: https://developer.apple.com/documentation/Vision/VNDetectDocumentSegmentationRequestRevision1 VNDetectDocumentSegmentationRequestRevision1 uint = 1 // VNDetectFaceCaptureQualityRequestRevision1 is a constant for specifying revision 1 of the face capture detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceCaptureQualityRequestRevision1 VNDetectFaceCaptureQualityRequestRevision1 uint = 1 // VNDetectFaceCaptureQualityRequestRevision2 is revision 2 of the request algorithm. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceCaptureQualityRequestRevision2 VNDetectFaceCaptureQualityRequestRevision2 uint = 2 // VNDetectFaceCaptureQualityRequestRevision3 is a value that indicates the third revision for a face capture-quality request. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceCaptureQualityRequestRevision3 VNDetectFaceCaptureQualityRequestRevision3 uint = 3 // VNDetectFaceLandmarksRequestRevision2 is a constant for specifying revision 2 of the face landmarks detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequestRevision2 VNDetectFaceLandmarksRequestRevision2 uint = 2 // VNDetectFaceLandmarksRequestRevision3 is a constant for specifying revision 3 of the face landmarks detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequestRevision3 VNDetectFaceLandmarksRequestRevision3 uint = 3 // VNDetectFaceRectanglesRequestRevision2 is a constant for specifying revision 2 of the face rectangles detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequestRevision2 VNDetectFaceRectanglesRequestRevision2 uint = 2 // VNDetectFaceRectanglesRequestRevision3 is a constant for specifying revision 3 of the face rectangles detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequestRevision3 VNDetectFaceRectanglesRequestRevision3 uint = 3 // VNDetectHorizonRequestRevision1 is a constant for specifying revision 1 of the horizon detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectHorizonRequestRevision1 VNDetectHorizonRequestRevision1 uint = 1 // VNDetectHumanBodyPose3DRequestRevision1 is a value that indicates the first revision for a human 3D body pose request. // // See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPose3DRequestRevision1 VNDetectHumanBodyPose3DRequestRevision1 uint = 1 // VNDetectHumanBodyPoseRequestRevision1 is a constant for specifying revision 1 of the body pose detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPoseRequestRevision1 VNDetectHumanBodyPoseRequestRevision1 uint = 1 // VNDetectHumanHandPoseRequestRevision1 is a constant for specifying revision 1 of the hand pose detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectHumanHandPoseRequestRevision1 VNDetectHumanHandPoseRequestRevision1 uint = 1 // VNDetectHumanRectanglesRequestRevision1 is a constant for specifying revision 1 of the human rectangles detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectHumanRectanglesRequestRevision1 VNDetectHumanRectanglesRequestRevision1 uint = 1 // VNDetectHumanRectanglesRequestRevision2 is a constant for specifying revision 2 of the human rectangles detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectHumanRectanglesRequestRevision2 VNDetectHumanRectanglesRequestRevision2 uint = 2 // VNDetectRectanglesRequestRevision1 is a constant for specifying revision 1 of the rectangle detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequestRevision1 VNDetectRectanglesRequestRevision1 uint = 1 // VNDetectTextRectanglesRequestRevision1 is a constant for specifying revision 1 of the text rectangles detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectTextRectanglesRequestRevision1 VNDetectTextRectanglesRequestRevision1 uint = 1 // VNDetectTrajectoriesRequestRevision1 is a constant for specifying revision 1 of the trajectories detection request. // // See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequestRevision1 VNDetectTrajectoriesRequestRevision1 uint = 1 // VNGenerateAttentionBasedSaliencyImageRequestRevision1 is a constant for specifying revision 1 of the image saliency request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequestRevision1 VNGenerateAttentionBasedSaliencyImageRequestRevision1 uint = 1 // VNGenerateAttentionBasedSaliencyImageRequestRevision2 is a value that indicates the second revision for an attention-saliency image request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequestRevision2 VNGenerateAttentionBasedSaliencyImageRequestRevision2 uint = 2 // VNGenerateForegroundInstanceMaskRequestRevision1 is a constant for specifying the first revision of the foreground instance mask request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateForegroundInstanceMaskRequestRevision1 VNGenerateForegroundInstanceMaskRequestRevision1 uint = 1 // VNGenerateImageFeaturePrintRequestRevision1 is a constant for specifying the first revision of the feature-print request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateImageFeaturePrintRequestRevision1 VNGenerateImageFeaturePrintRequestRevision1 uint = 1 // VNGenerateImageFeaturePrintRequestRevision2 is a value that indicates the second revision for a feature-print request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateImageFeaturePrintRequestRevision2 VNGenerateImageFeaturePrintRequestRevision2 uint = 2 // VNGenerateObjectnessBasedSaliencyImageRequestRevision1 is a constant for specifying revision 1 of the image saliency request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequestRevision1 VNGenerateObjectnessBasedSaliencyImageRequestRevision1 uint = 1 // VNGenerateObjectnessBasedSaliencyImageRequestRevision2 is a value that indicates the second revision for an image-classification request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequestRevision2 VNGenerateObjectnessBasedSaliencyImageRequestRevision2 uint = 2 // VNGenerateOpticalFlowRequestRevision1 is a constant for specifying revision 1 of the optical flow generation request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequestRevision1 VNGenerateOpticalFlowRequestRevision1 uint = 1 // VNGenerateOpticalFlowRequestRevision2 is a constant for specifying revision 2 of the optical flow generation request. // // See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequestRevision2 VNGenerateOpticalFlowRequestRevision2 uint = 2 // VNGeneratePersonInstanceMaskRequestRevision1 is a constant for specifying revision 1 of the person instance mask request. // // See: https://developer.apple.com/documentation/Vision/VNGeneratePersonInstanceMaskRequestRevision1 VNGeneratePersonInstanceMaskRequestRevision1 uint = 1 // VNGeneratePersonSegmentationRequestRevision1 is a constant for specifying revision 1 of the person segmentation generation request. // // See: https://developer.apple.com/documentation/Vision/VNGeneratePersonSegmentationRequestRevision1 VNGeneratePersonSegmentationRequestRevision1 uint = 1 // VNHomographicImageRegistrationRequestRevision1 is a constant for specifying revision 1 of the homographic image registration request. // // See: https://developer.apple.com/documentation/Vision/VNHomographicImageRegistrationRequestRevision1 VNHomographicImageRegistrationRequestRevision1 uint = 1 // VNRecognizeAnimalsRequestRevision1 is a constant for specifying revision 1 of the animal recognition request. // // See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequestRevision1 VNRecognizeAnimalsRequestRevision1 uint = 1 // VNRecognizeAnimalsRequestRevision2 is a constant for specifying revision 2 of the animal recognition request. // // See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequestRevision2 VNRecognizeAnimalsRequestRevision2 uint = 2 // VNRecognizeTextRequestRevision3 is a constant for specifying revision 3 of the text recognition request. // // See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequestRevision3 VNRecognizeTextRequestRevision3 uint = 3 // VNRequestRevisionUnspecified is a constant for specifying an unspecified request revision. // // See: https://developer.apple.com/documentation/Vision/VNRequestRevisionUnspecified VNRequestRevisionUnspecified uint = 0 // VNTrackHomographicImageRegistrationRequestRevision1 is a value that indicates the first revision for a homographic image-registration request. // // See: https://developer.apple.com/documentation/Vision/VNTrackHomographicImageRegistrationRequestRevision1 VNTrackHomographicImageRegistrationRequestRevision1 uint = 1 // VNTrackObjectRequestRevision1 is a constant for specifying revision 1 of the object tracking request. // // See: https://developer.apple.com/documentation/Vision/VNTrackObjectRequestRevision1 VNTrackObjectRequestRevision1 uint = 1 // VNTrackObjectRequestRevision2 is a constant for specifying revision 2 of the object tracking request. // // See: https://developer.apple.com/documentation/Vision/VNTrackObjectRequestRevision2 VNTrackObjectRequestRevision2 uint = 2 // VNTrackOpticalFlowRequestRevision1 is a value that indicates the first revision for an optial-flow request. // // See: https://developer.apple.com/documentation/Vision/VNTrackOpticalFlowRequestRevision1 VNTrackOpticalFlowRequestRevision1 uint = 1 // VNTrackRectangleRequestRevision1 is a constant for specifying revision 1 of the rectangling tracking request. // // See: https://developer.apple.com/documentation/Vision/VNTrackRectangleRequestRevision1 VNTrackRectangleRequestRevision1 uint = 1 // VNTrackTranslationalImageRegistrationRequestRevision1 is a value that indicates the first revision for a translational image-registration request. // // See: https://developer.apple.com/documentation/Vision/VNTrackTranslationalImageRegistrationRequestRevision1 VNTrackTranslationalImageRegistrationRequestRevision1 uint = 1 // VNTranslationalImageRegistrationRequestRevision1 is a constant for specifying revision 1 of the translational image registration request. // // See: https://developer.apple.com/documentation/Vision/VNTranslationalImageRegistrationRequestRevision1 VNTranslationalImageRegistrationRequestRevision1 uint = 1 )
uint values.
const ( // VNDetectBarcodesRequestRevision1 is a constant for specifying revision 1 of the barcode detection request. // // Deprecated: Deprecated since macOS 14.0. Use [VNDetectBarcodesRequestRevision3](<doc://Vision/documentation/Vision/VNDetectBarcodesRequestRevision3>) instead. // // See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequestRevision1 VNDetectBarcodesRequestRevision1 uint = 1 // VNDetectBarcodesRequestRevision2 is a constant for specifying revision 2 of the barcode detection request. // // Deprecated: Deprecated since macOS 15.0. // // See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequestRevision2 VNDetectBarcodesRequestRevision2 uint = 2 // VNRecognizeTextRequestRevision1 is a constant for specifying revision 1 of the text recognition request. // // Deprecated: Deprecated since macOS 15.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequestRevision1 VNRecognizeTextRequestRevision1 uint = 1 // VNRecognizeTextRequestRevision2 is a constant for specifying revision 2 of the text recognition request. // // Deprecated: Deprecated since macOS 15.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequestRevision2 VNRecognizeTextRequestRevision2 uint = 2 )
Deprecated uint values.
Variables ¶
var VNAnimalBodyPoseObservationJointNames struct { // LeftBackElbow: A joint name that represents the back of the left elbow. LeftBackElbow VNAnimalBodyPoseObservationJointName // LeftBackKnee: A joint name that represents the back of the left knee. LeftBackKnee VNAnimalBodyPoseObservationJointName // LeftBackPaw: A joint name that represents the back of the left paw. LeftBackPaw VNAnimalBodyPoseObservationJointName // LeftEarBottom: A joint name that represents the bottom of the left ear. LeftEarBottom VNAnimalBodyPoseObservationJointName // LeftEarMiddle: A joint name that represents the middle of the left ear. LeftEarMiddle VNAnimalBodyPoseObservationJointName // LeftEarTop: A joint name that represents the top of the left ear. LeftEarTop VNAnimalBodyPoseObservationJointName // LeftEye: A joint name that represents the left eye. LeftEye VNAnimalBodyPoseObservationJointName // LeftFrontElbow: A joint name that represents the front of the left elbow. LeftFrontElbow VNAnimalBodyPoseObservationJointName // LeftFrontKnee: A joint name that represents the front of the left knee. LeftFrontKnee VNAnimalBodyPoseObservationJointName // LeftFrontPaw: A joint name that represents the front of the left paw. LeftFrontPaw VNAnimalBodyPoseObservationJointName // Neck: A joint name that represents the neck. Neck VNAnimalBodyPoseObservationJointName // Nose: A joint name that represents the nose. Nose VNAnimalBodyPoseObservationJointName // RightBackElbow: A joint name that represents the back of the right elbow. RightBackElbow VNAnimalBodyPoseObservationJointName // RightBackKnee: A joint name that represents the back of the right knee. RightBackKnee VNAnimalBodyPoseObservationJointName // RightBackPaw: A joint name that represents the back of the right paw. RightBackPaw VNAnimalBodyPoseObservationJointName // RightEarBottom: A joint name that represents the bottom of the right ear. RightEarBottom VNAnimalBodyPoseObservationJointName // RightEarMiddle: A joint name that represents the middle of the right ear. RightEarMiddle VNAnimalBodyPoseObservationJointName // RightEarTop: A joint name that represents the top of the right ear. RightEarTop VNAnimalBodyPoseObservationJointName // RightEye: A joint name that represents the right eye. RightEye VNAnimalBodyPoseObservationJointName // RightFrontElbow: A joint name that represents the front of the right elbow. RightFrontElbow VNAnimalBodyPoseObservationJointName // RightFrontKnee: A joint name that represents the front of the right knee. RightFrontKnee VNAnimalBodyPoseObservationJointName // RightFrontPaw: A joint name that represents the front of the right paw. RightFrontPaw VNAnimalBodyPoseObservationJointName // TailBottom: A joint name that represents the bottom of the tail. TailBottom VNAnimalBodyPoseObservationJointName // TailMiddle: A joint name that represents the middle of the tail. TailMiddle VNAnimalBodyPoseObservationJointName // TailTop: A joint name that represents the top of the tail. TailTop VNAnimalBodyPoseObservationJointName }
VNAnimalBodyPoseObservationJointNames provides typed accessors for VNAnimalBodyPoseObservationJointName constants.
var VNAnimalBodyPoseObservationJointsGroupNames struct { // All: A group name that represents all joints. All VNAnimalBodyPoseObservationJointsGroupName // Forelegs: A group name that represents the forelegs. Forelegs VNAnimalBodyPoseObservationJointsGroupName // Head: A group name that represents the head. Head VNAnimalBodyPoseObservationJointsGroupName // Hindlegs: A group name that represents the hindlegs. Hindlegs VNAnimalBodyPoseObservationJointsGroupName // Tail: A group name that represents the tail. Tail VNAnimalBodyPoseObservationJointsGroupName // Trunk: A group name that represents the trunk. Trunk VNAnimalBodyPoseObservationJointsGroupName }
VNAnimalBodyPoseObservationJointsGroupNames provides typed accessors for VNAnimalBodyPoseObservationJointsGroupName constants.
var VNAnimalIdentifiers struct { // Cat: An animal identifier for cats. Cat VNAnimalIdentifier // Dog: An animal identifier for dogs. Dog VNAnimalIdentifier }
VNAnimalIdentifiers provides typed accessors for VNAnimalIdentifier constants.
var VNBarcodeSymbologys struct { // Aztec: A constant that indicates Aztec symbology. Aztec VNBarcodeSymbology // Codabar: A constant that indicates Codabar symbology. Codabar VNBarcodeSymbology // Code128: A constant that indicates Code 128 symbology. Code128 VNBarcodeSymbology // Code39: A constant that indicates Code 39 symbology. Code39 VNBarcodeSymbology // Code39Checksum: A constant that indicates Code 39 symbology with a checksum. Code39Checksum VNBarcodeSymbology // Code39FullASCII: A constant that indicates Code 39 Full ASCII symbology. Code39FullASCII VNBarcodeSymbology // Code39FullASCIIChecksum: A constant that indicates Code 39 Full ASCII symbology with a checksum. Code39FullASCIIChecksum VNBarcodeSymbology // Code93: A constant that indicates Code 93 symbology. Code93 VNBarcodeSymbology // Code93i: A constant that indicates Code 93i symbology. Code93i VNBarcodeSymbology // DataMatrix: A constant that indicates Data Matrix symbology. DataMatrix VNBarcodeSymbology // EAN13: A constant that indicates EAN-13 symbology. EAN13 VNBarcodeSymbology // EAN8: A constant that indicates EAN-8 symbology. EAN8 VNBarcodeSymbology // GS1DataBar: A constant that indicates GS1 DataBar symbology. GS1DataBar VNBarcodeSymbology // GS1DataBarExpanded: A constant that indicates GS1 DataBar Expanded symbology. GS1DataBarExpanded VNBarcodeSymbology // GS1DataBarLimited: A constant that indicates GS1 DataBar Limited symbology. GS1DataBarLimited VNBarcodeSymbology // I2of5: A constant that indicates Interleaved 2 of 5 (ITF) symbology. I2of5 VNBarcodeSymbology // I2of5Checksum: A constant that indicates Interleaved 2 of 5 (ITF) symbology with a checksum. I2of5Checksum VNBarcodeSymbology // ITF14: A constant that indicates ITF-14 symbology. ITF14 VNBarcodeSymbology // MSIPlessey: A constant that indicates Modified Plessey symbology. MSIPlessey VNBarcodeSymbology // MicroPDF417: A constant that indicates MicroPDF417 symbology. MicroPDF417 VNBarcodeSymbology // MicroQR: A constant that indicates MicroQR symbology. MicroQR VNBarcodeSymbology // PDF417: A constant that indicates PDF417 symbology. PDF417 VNBarcodeSymbology // QR: A constant that indicates Quick Response (QR) symbology. QR VNBarcodeSymbology // UPCE: A constant that indicates UPC-E symbology. UPCE VNBarcodeSymbology }
VNBarcodeSymbologys provides typed accessors for VNBarcodeSymbology constants.
var VNComputeStages struct { // Main: A stage that represents where the system performs the main functionality. Main VNComputeStage // PostProcessing: A stage that represents where the system performs additional analysis from the main compute stage. PostProcessing VNComputeStage }
VNComputeStages provides typed accessors for VNComputeStage constants.
var ( // VNErrorDomain is the domain of errors that the framework generates. // // See: https://developer.apple.com/documentation/Vision/VNErrorDomain VNErrorDomain string )
var VNHumanBodyPose3DObservationJointNames struct { // CenterHead: A joint name that represents the center of the head. CenterHead VNHumanBodyPose3DObservationJointName // CenterShoulder: A joint name that represents the point between the shoulders. CenterShoulder VNHumanBodyPose3DObservationJointName // LeftAnkle: A joint name that represents the left ankle. LeftAnkle VNHumanBodyPose3DObservationJointName // LeftElbow: A joint name that represents the left elbow. LeftElbow VNHumanBodyPose3DObservationJointName // LeftHip: A joint name that represents the left hip. LeftHip VNHumanBodyPose3DObservationJointName // LeftKnee: A joint name that represents the left knee. LeftKnee VNHumanBodyPose3DObservationJointName // LeftShoulder: A joint name that represents the left shoulder. LeftShoulder VNHumanBodyPose3DObservationJointName // LeftWrist: A joint name that represents the left wrist. LeftWrist VNHumanBodyPose3DObservationJointName // RightAnkle: A joint name that represents the right ankle. RightAnkle VNHumanBodyPose3DObservationJointName // RightElbow: A joint name that represents the right elbow. RightElbow VNHumanBodyPose3DObservationJointName // RightHip: A joint name that represents the right hip. RightHip VNHumanBodyPose3DObservationJointName // RightKnee: A joint name that represents the right knee. RightKnee VNHumanBodyPose3DObservationJointName // RightShoulder: A joint name that represents the right shoulder. RightShoulder VNHumanBodyPose3DObservationJointName // RightWrist: A joint name that represents the right wrist. RightWrist VNHumanBodyPose3DObservationJointName // Root: A joint name that represents the point between the left hip and right hip. Root VNHumanBodyPose3DObservationJointName // Spine: A joint name that represents the spine. Spine VNHumanBodyPose3DObservationJointName // TopHead: A joint name that represents the top of the head. TopHead VNHumanBodyPose3DObservationJointName }
VNHumanBodyPose3DObservationJointNames provides typed accessors for VNHumanBodyPose3DObservationJointName constants.
var VNHumanBodyPose3DObservationJointsGroupNames struct { // All: A group name that represents all joints. All VNHumanBodyPose3DObservationJointsGroupName // Head: A group name that represents the head joints. Head VNHumanBodyPose3DObservationJointsGroupName // LeftArm: A group name that represents the left arm joints. LeftArm VNHumanBodyPose3DObservationJointsGroupName // LeftLeg: A group name that represents the left leg joints. LeftLeg VNHumanBodyPose3DObservationJointsGroupName // RightArm: A group name that represents the right arm joints. RightArm VNHumanBodyPose3DObservationJointsGroupName // RightLeg: A group name that represents the right leg joints. RightLeg VNHumanBodyPose3DObservationJointsGroupName // Torso: A group name that represents the torso joints. Torso VNHumanBodyPose3DObservationJointsGroupName }
VNHumanBodyPose3DObservationJointsGroupNames provides typed accessors for VNHumanBodyPose3DObservationJointsGroupName constants.
var VNHumanBodyPoseObservationJointNames struct { // LeftAnkle: The left ankle. LeftAnkle VNHumanBodyPoseObservationJointName // LeftEar: The left ear. LeftEar VNHumanBodyPoseObservationJointName // LeftElbow: The left elbow. LeftElbow VNHumanBodyPoseObservationJointName // LeftEye: The left eye. LeftEye VNHumanBodyPoseObservationJointName // LeftHip: The left hip. LeftHip VNHumanBodyPoseObservationJointName // LeftKnee: The left knee. LeftKnee VNHumanBodyPoseObservationJointName // LeftShoulder: The left shoulder. LeftShoulder VNHumanBodyPoseObservationJointName // LeftWrist: The left wrist. LeftWrist VNHumanBodyPoseObservationJointName // Neck: The neck. Neck VNHumanBodyPoseObservationJointName // Nose: The nose. Nose VNHumanBodyPoseObservationJointName // RightAnkle: The right ankle. RightAnkle VNHumanBodyPoseObservationJointName // RightEar: The right ear. RightEar VNHumanBodyPoseObservationJointName // RightElbow: The right elbow. RightElbow VNHumanBodyPoseObservationJointName // RightEye: The right eye. RightEye VNHumanBodyPoseObservationJointName // RightHip: The right hip. RightHip VNHumanBodyPoseObservationJointName // RightKnee: The right knee. RightKnee VNHumanBodyPoseObservationJointName // RightShoulder: The right shoulder. RightShoulder VNHumanBodyPoseObservationJointName // RightWrist: The right wrist. RightWrist VNHumanBodyPoseObservationJointName // Root: The root (waist). Root VNHumanBodyPoseObservationJointName }
VNHumanBodyPoseObservationJointNames provides typed accessors for VNHumanBodyPoseObservationJointName constants.
var VNHumanBodyPoseObservationJointsGroupNames struct { // All: All body point groups. All VNHumanBodyPoseObservationJointsGroupName // Face: The face. Face VNHumanBodyPoseObservationJointsGroupName // LeftArm: The left arm. LeftArm VNHumanBodyPoseObservationJointsGroupName // LeftLeg: The left leg. LeftLeg VNHumanBodyPoseObservationJointsGroupName // RightArm: The right arm. RightArm VNHumanBodyPoseObservationJointsGroupName // RightLeg: The right leg. RightLeg VNHumanBodyPoseObservationJointsGroupName // Torso: The torso. Torso VNHumanBodyPoseObservationJointsGroupName }
VNHumanBodyPoseObservationJointsGroupNames provides typed accessors for VNHumanBodyPoseObservationJointsGroupName constants.
var VNHumanHandPoseObservationJointNames struct { // IndexDIP: The index finger’s distal interphalangeal (DIP) joint. IndexDIP VNHumanHandPoseObservationJointName // IndexMCP: The index finger’s metacarpophalangeal (MCP) joint. IndexMCP VNHumanHandPoseObservationJointName // IndexPIP: The index finger’s proximal interphalangeal (PIP) joint. IndexPIP VNHumanHandPoseObservationJointName // IndexTip: The tip of the index finger. IndexTip VNHumanHandPoseObservationJointName // LittleDIP: The little finger’s distal interphalangeal (DIP) joint. LittleDIP VNHumanHandPoseObservationJointName // LittleMCP: The little finger’s metacarpophalangeal (MCP) joint. LittleMCP VNHumanHandPoseObservationJointName // LittlePIP: The little finger’s proximal interphalangeal (PIP) joint. LittlePIP VNHumanHandPoseObservationJointName // LittleTip: The tip of the little finger. LittleTip VNHumanHandPoseObservationJointName // MiddleDIP: The middle finger’s distal interphalangeal (DIP) joint. MiddleDIP VNHumanHandPoseObservationJointName // MiddleMCP: The middle finger’s metacarpophalangeal (MCP) joint. MiddleMCP VNHumanHandPoseObservationJointName // MiddlePIP: The middle finger’s proximal interphalangeal (PIP) joint. MiddlePIP VNHumanHandPoseObservationJointName // MiddleTip: The tip of the middle finger. MiddleTip VNHumanHandPoseObservationJointName // RingDIP: The ring finger’s distal interphalangeal (DIP) joint. RingDIP VNHumanHandPoseObservationJointName // RingMCP: The ring finger’s metacarpophalangeal (MCP) joint. RingMCP VNHumanHandPoseObservationJointName // RingPIP: The ring finger’s proximal interphalangeal (PIP) joint. RingPIP VNHumanHandPoseObservationJointName // RingTip: The tip of the ring finger. RingTip VNHumanHandPoseObservationJointName // ThumbCMC: The thumb’s carpometacarpal (CMC) joint. ThumbCMC VNHumanHandPoseObservationJointName // ThumbIP: The thumb’s interphalangeal (IP) joint. ThumbIP VNHumanHandPoseObservationJointName // ThumbMP: The thumb’s metacarpophalangeal (MP) joint. ThumbMP VNHumanHandPoseObservationJointName // ThumbTip: The tip of the thumb. ThumbTip VNHumanHandPoseObservationJointName // Wrist: The wrist. Wrist VNHumanHandPoseObservationJointName }
VNHumanHandPoseObservationJointNames provides typed accessors for VNHumanHandPoseObservationJointName constants.
var VNHumanHandPoseObservationJointsGroupNames struct { // All: All hand group names. All VNHumanHandPoseObservationJointsGroupName // IndexFinger: The index finger. IndexFinger VNHumanHandPoseObservationJointsGroupName // LittleFinger: The little finger. LittleFinger VNHumanHandPoseObservationJointsGroupName // MiddleFinger: The middle finger. MiddleFinger VNHumanHandPoseObservationJointsGroupName // RingFinger: The ring finger. RingFinger VNHumanHandPoseObservationJointsGroupName // Thumb: The thumb. Thumb VNHumanHandPoseObservationJointsGroupName }
VNHumanHandPoseObservationJointsGroupNames provides typed accessors for VNHumanHandPoseObservationJointsGroupName constants.
var VNImageOptions struct { // CIContext: An option key to specify the context to use in the handler’s Core Image operations. CIContext VNImageOption // CameraIntrinsics: An option to specify the camera intrinstics. CameraIntrinsics VNImageOption // Properties: The dictionary from the image source that contains the metadata for algorithms like horizon detection. Properties VNImageOption }
VNImageOptions provides typed accessors for VNImageOption constants.
var ( // VNNormalizedIdentityRect is a normalized identity rectangle with an origin of zero and unit length and width. // // See: https://developer.apple.com/documentation/Vision/VNNormalizedIdentityRect VNNormalizedIdentityRect corefoundation.CGRect )
var ( // VNVisionVersionNumber is the current version number of the Vision framework. // // See: https://developer.apple.com/documentation/Vision/VNVisionVersionNumber VNVisionVersionNumber float64 )
Functions ¶
func NewErrorBlock ¶
func NewErrorBlock(handler ErrorHandler) (objc.ID, func())
NewErrorBlock wraps a Go ErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [VNCalculateImageAestheticsScoresRequest.InitWithCompletionHandler]
- [VNClassifyImageRequest.InitWithCompletionHandler]
- [VNCoreMLRequest.InitWithCompletionHandler]
- VNCoreMLRequest.InitWithModelCompletionHandler
- [VNDetectAnimalBodyPoseRequest.InitWithCompletionHandler]
- [VNDetectBarcodesRequest.InitWithCompletionHandler]
- [VNDetectContoursRequest.InitWithCompletionHandler]
- [VNDetectDocumentSegmentationRequest.InitWithCompletionHandler]
- [VNDetectFaceCaptureQualityRequest.InitWithCompletionHandler]
- [VNDetectFaceLandmarksRequest.InitWithCompletionHandler]
- [VNDetectFaceRectanglesRequest.InitWithCompletionHandler]
- [VNDetectHorizonRequest.InitWithCompletionHandler]
- [VNDetectHumanBodyPose3DRequest.InitWithCompletionHandler]
- [VNDetectHumanBodyPose3DRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNDetectHumanBodyPoseRequest.InitWithCompletionHandler]
- [VNDetectHumanHandPoseRequest.InitWithCompletionHandler]
- [VNDetectHumanRectanglesRequest.InitWithCompletionHandler]
- [VNDetectRectanglesRequest.InitWithCompletionHandler]
- [VNDetectTextRectanglesRequest.InitWithCompletionHandler]
- [VNDetectTrajectoriesRequest.InitWithCompletionHandler]
- [VNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- VNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler
- [VNGenerateAttentionBasedSaliencyImageRequest.InitWithCompletionHandler]
- [VNGenerateForegroundInstanceMaskRequest.InitWithCompletionHandler]
- [VNGenerateImageFeaturePrintRequest.InitWithCompletionHandler]
- [VNGenerateObjectnessBasedSaliencyImageRequest.InitWithCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
- [VNGeneratePersonInstanceMaskRequest.InitWithCompletionHandler]
- [VNGeneratePersonSegmentationRequest.InitWithCompletionHandler]
- [VNGeneratePersonSegmentationRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
- [VNImageBasedRequest.InitWithCompletionHandler]
- [VNImageRegistrationRequest.InitWithCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
- VNInstanceMaskObservation.GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError
- VNInstanceMaskObservation.GenerateScaledMaskForImageForInstancesFromRequestHandlerError
- [VNRecognizeAnimalsRequest.InitWithCompletionHandler]
- [VNRecognizeTextRequest.InitWithCompletionHandler]
- VNRequest.InitWithCompletionHandler
- [VNStatefulRequest.InitWithCompletionHandler]
- VNStatefulRequest.InitWithFrameAnalysisSpacingCompletionHandler
- [VNTargetedImageRequest.InitWithCompletionHandler]
- VNTargetedImageRequest.InitWithTargetedCGImageOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCIImageOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageDataOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageURLOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler
- [VNTrackHomographicImageRegistrationRequest.InitWithCompletionHandler]
- [VNTrackHomographicImageRegistrationRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNTrackObjectRequest.InitWithCompletionHandler]
- VNTrackObjectRequest.InitWithDetectedObjectObservationCompletionHandler
- [VNTrackOpticalFlowRequest.InitWithCompletionHandler]
- [VNTrackOpticalFlowRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNTrackRectangleRequest.InitWithCompletionHandler]
- VNTrackRectangleRequest.InitWithRectangleObservationCompletionHandler
- [VNTrackTranslationalImageRegistrationRequest.InitWithCompletionHandler]
- [VNTrackTranslationalImageRegistrationRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNTrackingRequest.InitWithCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
func VNElementTypeSize ¶
func VNElementTypeSize(elementType VNElementType) uint
VNElementTypeSize returns the size of a feature print element.
See: https://developer.apple.com/documentation/Vision/VNElementTypeSize(_:)
func VNImagePointForFaceLandmarkPoint ¶
func VNImagePointForFaceLandmarkPoint(faceLandmarkPoint uintptr, faceBoundingBox corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNImagePointForFaceLandmarkPoint returns the image coordinates of a specified face landmark point.
See: https://developer.apple.com/documentation/Vision/VNImagePointForFaceLandmarkPoint(_:_:_:_:)
func VNImagePointForNormalizedPoint ¶
func VNImagePointForNormalizedPoint(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNImagePointForNormalizedPoint projects a point in normalized coordinates into image coordinates.
See: https://developer.apple.com/documentation/Vision/VNImagePointForNormalizedPoint(_:_:_:)
func VNImagePointForNormalizedPointUsingRegionOfInterest ¶
func VNImagePointForNormalizedPointUsingRegionOfInterest(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) corefoundation.CGPoint
VNImagePointForNormalizedPointUsingRegionOfInterest projects a point from a region of interest within the normalized coordinates into image coordinates.
func VNImageRectForNormalizedRect ¶
func VNImageRectForNormalizedRect(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGRect
VNImageRectForNormalizedRect projects a rectangle from normalized coordinates into image coordinates.
See: https://developer.apple.com/documentation/Vision/VNImageRectForNormalizedRect(_:_:_:)
func VNImageRectForNormalizedRectUsingRegionOfInterest ¶
func VNImageRectForNormalizedRectUsingRegionOfInterest(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) corefoundation.CGRect
VNImageRectForNormalizedRectUsingRegionOfInterest projects a rectangle from a region of interest within the normalized coordinates into image coordinates.
func VNNormalizedFaceBoundingBoxPointForLandmarkPoint ¶
func VNNormalizedFaceBoundingBoxPointForLandmarkPoint(faceLandmarkPoint uintptr, faceBoundingBox corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNNormalizedFaceBoundingBoxPointForLandmarkPoint returns the coordinates of a specified face landmark point, in bounding box coordinates.
func VNNormalizedPointForImagePoint ¶
func VNNormalizedPointForImagePoint(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNNormalizedPointForImagePoint projects a point from image coordinates into normalized coordinates.
See: https://developer.apple.com/documentation/Vision/VNNormalizedPointForImagePoint(_:_:_:)
func VNNormalizedPointForImagePointUsingRegionOfInterest ¶
func VNNormalizedPointForImagePointUsingRegionOfInterest(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) corefoundation.CGPoint
VNNormalizedPointForImagePointUsingRegionOfInterest projects a point from a region of interest within the image coordinates into normalized coordinates.
func VNNormalizedRectForImageRect ¶
func VNNormalizedRectForImageRect(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGRect
VNNormalizedRectForImageRect projects a rectangle from image coordinates into normalized coordinates.
See: https://developer.apple.com/documentation/Vision/VNNormalizedRectForImageRect(_:_:_:)
func VNNormalizedRectForImageRectUsingRegionOfInterest ¶
func VNNormalizedRectForImageRectUsingRegionOfInterest(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) corefoundation.CGRect
VNNormalizedRectForImageRectUsingRegionOfInterest projects a rectangle from a region of interest within the image coordinates space into normalized coordinates.
func VNNormalizedRectIsIdentityRect ¶
func VNNormalizedRectIsIdentityRect(normalizedRect corefoundation.CGRect) bool
VNNormalizedRectIsIdentityRect returns a Boolean value that indicates whether the rectangle has an origin of zero and unit length and width.
See: https://developer.apple.com/documentation/Vision/VNNormalizedRectIsIdentityRect(_:)
Types ¶
type ErrorHandler ¶
type ErrorHandler = func()
ErrorHandler handles The block to invoke after the request finishes processing.
Used by:
- [VNCalculateImageAestheticsScoresRequest.InitWithCompletionHandler]
- [VNClassifyImageRequest.InitWithCompletionHandler]
- [VNCoreMLRequest.InitWithCompletionHandler]
- VNCoreMLRequest.InitWithModelCompletionHandler
- [VNDetectAnimalBodyPoseRequest.InitWithCompletionHandler]
- [VNDetectBarcodesRequest.InitWithCompletionHandler]
- [VNDetectContoursRequest.InitWithCompletionHandler]
- [VNDetectDocumentSegmentationRequest.InitWithCompletionHandler]
- [VNDetectFaceCaptureQualityRequest.InitWithCompletionHandler]
- [VNDetectFaceLandmarksRequest.InitWithCompletionHandler]
- [VNDetectFaceRectanglesRequest.InitWithCompletionHandler]
- [VNDetectHorizonRequest.InitWithCompletionHandler]
- [VNDetectHumanBodyPose3DRequest.InitWithCompletionHandler]
- [VNDetectHumanBodyPose3DRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNDetectHumanBodyPoseRequest.InitWithCompletionHandler]
- [VNDetectHumanHandPoseRequest.InitWithCompletionHandler]
- [VNDetectHumanRectanglesRequest.InitWithCompletionHandler]
- [VNDetectRectanglesRequest.InitWithCompletionHandler]
- [VNDetectTextRectanglesRequest.InitWithCompletionHandler]
- [VNDetectTrajectoriesRequest.InitWithCompletionHandler]
- [VNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- VNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler
- [VNGenerateAttentionBasedSaliencyImageRequest.InitWithCompletionHandler]
- [VNGenerateForegroundInstanceMaskRequest.InitWithCompletionHandler]
- [VNGenerateImageFeaturePrintRequest.InitWithCompletionHandler]
- [VNGenerateObjectnessBasedSaliencyImageRequest.InitWithCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNGenerateOpticalFlowRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
- [VNGeneratePersonInstanceMaskRequest.InitWithCompletionHandler]
- [VNGeneratePersonSegmentationRequest.InitWithCompletionHandler]
- [VNGeneratePersonSegmentationRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNHomographicImageRegistrationRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
- [VNImageBasedRequest.InitWithCompletionHandler]
- [VNImageRegistrationRequest.InitWithCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNImageRegistrationRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
- VNInstanceMaskObservation.GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError
- VNInstanceMaskObservation.GenerateScaledMaskForImageForInstancesFromRequestHandlerError
- [VNRecognizeAnimalsRequest.InitWithCompletionHandler]
- [VNRecognizeTextRequest.InitWithCompletionHandler]
- VNRequest.InitWithCompletionHandler
- [VNStatefulRequest.InitWithCompletionHandler]
- VNStatefulRequest.InitWithFrameAnalysisSpacingCompletionHandler
- [VNTargetedImageRequest.InitWithCompletionHandler]
- VNTargetedImageRequest.InitWithTargetedCGImageOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCIImageOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageDataOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageURLOptionsCompletionHandler
- VNTargetedImageRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler
- [VNTrackHomographicImageRegistrationRequest.InitWithCompletionHandler]
- [VNTrackHomographicImageRegistrationRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNTrackObjectRequest.InitWithCompletionHandler]
- VNTrackObjectRequest.InitWithDetectedObjectObservationCompletionHandler
- [VNTrackOpticalFlowRequest.InitWithCompletionHandler]
- [VNTrackOpticalFlowRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNTrackRectangleRequest.InitWithCompletionHandler]
- VNTrackRectangleRequest.InitWithRectangleObservationCompletionHandler
- [VNTrackTranslationalImageRegistrationRequest.InitWithCompletionHandler]
- [VNTrackTranslationalImageRegistrationRequest.InitWithFrameAnalysisSpacingCompletionHandler]
- [VNTrackingRequest.InitWithCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCGImageOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCIImageOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageDataOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageURLOptionsCompletionHandler]
- [VNTranslationalImageRegistrationRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]
type IVNAnimalBodyPoseObservation ¶
type IVNAnimalBodyPoseObservation interface {
IVNRecognizedPointsObservation
// The names of the available joints in the observation.
AvailableJointNames() []string
// The available joint group names in the observation.
AvailableJointGroupNames() []string
// Returns the point for a joint name the observation recognizes.
RecognizedPointForJointNameError(jointName VNAnimalBodyPoseObservationJointName) (IVNRecognizedPoint, error)
// Returns the points for a joint group name the observation recognizes.
RecognizedPointsForJointsGroupNameError(jointsGroupName VNAnimalBodyPoseObservationJointsGroupName) (foundation.INSDictionary, error)
}
An interface definition for the VNAnimalBodyPoseObservation class.
Accessing Points ¶
- [IVNAnimalBodyPoseObservation.AvailableJointNames]: The names of the available joints in the observation.
- [IVNAnimalBodyPoseObservation.AvailableJointGroupNames]: The available joint group names in the observation.
- [IVNAnimalBodyPoseObservation.RecognizedPointForJointNameError]: Returns the point for a joint name the observation recognizes.
- [IVNAnimalBodyPoseObservation.RecognizedPointsForJointsGroupNameError]: Returns the points for a joint group name the observation recognizes.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation
type IVNBarcodeObservation ¶
type IVNBarcodeObservation interface {
IVNRectangleObservation
// A string value that represents the barcode payload.
PayloadStringValue() string
// The raw data representation of the barcode’s payload.
PayloadData() foundation.INSData
// The supplemental code decoded as a string value.
SupplementalPayloadString() string
SupplementalPayloadData() foundation.INSData
// The supplemental composite type.
SupplementalCompositeType() VNBarcodeCompositeType
// A Boolean value that indicates whether the barcode carries any global standards data.
IsGS1DataCarrier() bool
// An object that describes the low-level details about the barcode and its data.
BarcodeDescriptor() coreimage.CIBarcodeDescriptor
// The symbology of the observed barcode.
Symbology() VNBarcodeSymbology
// A Boolean value that indicates whether the barcode is color inverted.
IsColorInverted() bool
}
An interface definition for the VNBarcodeObservation class.
Parsing the Payload ¶
- [IVNBarcodeObservation.PayloadStringValue]: A string value that represents the barcode payload.
- [IVNBarcodeObservation.PayloadData]: The raw data representation of the barcode’s payload.
- [IVNBarcodeObservation.SupplementalPayloadString]: The supplemental code decoded as a string value.
- [IVNBarcodeObservation.SupplementalPayloadData]
- [IVNBarcodeObservation.SupplementalCompositeType]: The supplemental composite type.
- [IVNBarcodeObservation.IsGS1DataCarrier]: A Boolean value that indicates whether the barcode carries any global standards data.
Reading Barcode Descriptors ¶
- [IVNBarcodeObservation.BarcodeDescriptor]: An object that describes the low-level details about the barcode and its data.
Identifying Barcode Types ¶
- [IVNBarcodeObservation.Symbology]: The symbology of the observed barcode.
Identifying Barcode Colors ¶
- [IVNBarcodeObservation.IsColorInverted]: A Boolean value that indicates whether the barcode is color inverted.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation
type IVNCalculateImageAestheticsScoresRequest ¶
type IVNCalculateImageAestheticsScoresRequest interface {
IVNImageBasedRequest
}
An interface definition for the VNCalculateImageAestheticsScoresRequest class.
See: https://developer.apple.com/documentation/Vision/VNCalculateImageAestheticsScoresRequest
type IVNCircle ¶
type IVNCircle interface {
objectivec.IObject
// Creates a circle with the specified center and radius.
InitWithCenterRadius(center IVNPoint, radius float64) VNCircle
// Creates a circle with the specified center and diameter.
InitWithCenterDiameter(center IVNPoint, diameter float64) VNCircle
// The circle’s center point.
Center() IVNPoint
// The circle’s diameter.
Diameter() float64
// The circle’s radius.
Radius() float64
// Determines if this circle, including its boundary, contains the specified point.
ContainsPoint(point IVNPoint) bool
// Determines if a ring around this circle’s circumference contains the specified point.
ContainsPointInCircumferentialRingOfWidth(point IVNPoint, ringWidth float64) bool
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNCircle class.
Creating a Circle ¶
- [IVNCircle.InitWithCenterRadius]: Creates a circle with the specified center and radius.
- [IVNCircle.InitWithCenterDiameter]: Creates a circle with the specified center and diameter.
Inspecting a Circle ¶
- [IVNCircle.Center]: The circle’s center point.
- [IVNCircle.Diameter]: The circle’s diameter.
- [IVNCircle.Radius]: The circle’s radius.
- [IVNCircle.ContainsPoint]: Determines if this circle, including its boundary, contains the specified point.
- [IVNCircle.ContainsPointInCircumferentialRingOfWidth]: Determines if a ring around this circle’s circumference contains the specified point.
See: https://developer.apple.com/documentation/Vision/VNCircle
type IVNClassificationObservation ¶
type IVNClassificationObservation interface {
IVNObservation
// Classification label identifying the type of observation.
Identifier() string
// A Boolean variable indicating whether the observation contains precision and recall curves.
HasPrecisionRecallCurve() bool
// Determines whether the observation for a specific recall has a minimum precision value.
HasMinimumPrecisionForRecall(minimumPrecision float32, recall float32) bool
// Determines whether the observation for a specific precision has a minimum recall value.
HasMinimumRecallForPrecision(minimumRecall float32, precision float32) bool
// Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
ModelDescription() coreml.MLModelDescription
SetModelDescription(value coreml.MLModelDescription)
// The name of the primary prediction feature output description.
PredictedFeatureName() string
SetPredictedFeatureName(value string)
}
An interface definition for the VNClassificationObservation class.
Determining Classification ¶
- [IVNClassificationObservation.Identifier]: Classification label identifying the type of observation.
Measuring Confidence and Precision ¶
- [IVNClassificationObservation.HasPrecisionRecallCurve]: A Boolean variable indicating whether the observation contains precision and recall curves.
- [IVNClassificationObservation.HasMinimumPrecisionForRecall]: Determines whether the observation for a specific recall has a minimum precision value.
- [IVNClassificationObservation.HasMinimumRecallForPrecision]: Determines whether the observation for a specific precision has a minimum recall value.
See: https://developer.apple.com/documentation/Vision/VNClassificationObservation
type IVNClassifyImageRequest ¶
type IVNClassifyImageRequest interface {
IVNImageBasedRequest
// Returns the classification identifiers that the request supports in its current configuration.
SupportedIdentifiersAndReturnError() ([]string, error)
// A constant for specifying the first revision of the image-classification request.
VNClassifyImageRequestRevision1() int
}
An interface definition for the VNClassifyImageRequest class.
Accessing Results ¶
- [IVNClassifyImageRequest.SupportedIdentifiersAndReturnError]: Returns the classification identifiers that the request supports in its current configuration.
Specifying Algorithm Revision ¶
- [IVNClassifyImageRequest.VNClassifyImageRequestRevision1]: A constant for specifying the first revision of the image-classification request.
See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequest
type IVNContour ¶
type IVNContour interface {
objectivec.IObject
VNRequestRevisionProviding
// The aspect ratio of the contour.
AspectRatio() float32
// The contour object’s index path.
IndexPath() objc.ID
// The contour object as a path in normalized coordinates.
NormalizedPath() coregraphics.CGPathRef
// The contour’s number of points.
PointCount() int
// Simplifies the contour to a polygon using a Ramer-Douglas-Peucker algorithm.
PolygonApproximationWithEpsilonError(epsilon float32) (IVNContour, error)
// The total number of detected child contours.
ChildContourCount() int
// An array of contours that this contour encloses.
ChildContours() []VNContour
// Retrieves the child contour object at the specified index.
ChildContourAtIndexError(childContourIndex uint) (IVNContour, error)
// The total number of detected contours.
ContourCount() int
SetContourCount(value int)
// The contour’s array of points in normalized coordinates.
NormalizedPoints() objectivec.IObject
// The total number of detected top-level contours.
TopLevelContourCount() int
SetTopLevelContourCount(value int)
// An array of contours that don’t have another contour enclosing them.
TopLevelContours() IVNContour
SetTopLevelContours(value IVNContour)
}
An interface definition for the VNContour class.
Inspecting the Contour ¶
- [IVNContour.AspectRatio]: The aspect ratio of the contour.
- [IVNContour.IndexPath]: The contour object’s index path.
- [IVNContour.NormalizedPath]: The contour object as a path in normalized coordinates.
- [IVNContour.PointCount]: The contour’s number of points.
- [IVNContour.PolygonApproximationWithEpsilonError]: Simplifies the contour to a polygon using a Ramer-Douglas-Peucker algorithm.
Accessing Child Contours ¶
- [IVNContour.ChildContourCount]: The total number of detected child contours.
- [IVNContour.ChildContours]: An array of contours that this contour encloses.
- [IVNContour.ChildContourAtIndexError]: Retrieves the child contour object at the specified index.
See: https://developer.apple.com/documentation/Vision/VNContour
type IVNContoursObservation ¶
type IVNContoursObservation interface {
IVNObservation
// The total number of detected contours.
ContourCount() int
// The detected contours as a path object in normalized coordinates.
NormalizedPath() coregraphics.CGPathRef
// An array of contours that don’t have another contour enclosing them.
TopLevelContours() []VNContour
// The total number of detected top-level contours.
TopLevelContourCount() int
// Retrieves the contour object at the specified index, irrespective of hierarchy.
ContourAtIndexError(contourIndex int) (IVNContour, error)
// Retrieves the contour object at the specified index path.
ContourAtIndexPathError(indexPath objectivec.IObject) (IVNContour, error)
// The results of the request to detect contours.
Results() IVNContoursObservation
SetResults(value IVNContoursObservation)
}
An interface definition for the VNContoursObservation class.
Inspecting the Observation ¶
- [IVNContoursObservation.ContourCount]: The total number of detected contours.
- [IVNContoursObservation.NormalizedPath]: The detected contours as a path object in normalized coordinates.
- [IVNContoursObservation.TopLevelContours]: An array of contours that don’t have another contour enclosing them.
- [IVNContoursObservation.TopLevelContourCount]: The total number of detected top-level contours.
- [IVNContoursObservation.ContourAtIndexError]: Retrieves the contour object at the specified index, irrespective of hierarchy.
- [IVNContoursObservation.ContourAtIndexPathError]: Retrieves the contour object at the specified index path.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation
type IVNCoreMLFeatureValueObservation ¶
type IVNCoreMLFeatureValueObservation interface {
IVNObservation
// The feature result of a [VNCoreMLRequest](<doc://Vision/documentation/Vision/VNCoreMLRequest>) that outputs neither a classification nor an image.
FeatureValue() coreml.MLFeatureValue
// The name used in the model description of the CoreML model that produced this observation.
FeatureName() string
// Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
ModelDescription() coreml.MLModelDescription
SetModelDescription(value coreml.MLModelDescription)
// A dictionary of output feature descriptions, which the model keys by the output’s name.
OutputDescriptionsByName() coreml.MLFeatureDescription
SetOutputDescriptionsByName(value coreml.MLFeatureDescription)
// The name of the primary prediction feature output description.
PredictedFeatureName() string
SetPredictedFeatureName(value string)
}
An interface definition for the VNCoreMLFeatureValueObservation class.
Obtaining Feature Values ¶
- [IVNCoreMLFeatureValueObservation.FeatureValue]: The feature result of a VNCoreMLRequest(<doc://Vision/documentation/Vision/VNCoreMLRequest>) that outputs neither a classification nor an image.
- [IVNCoreMLFeatureValueObservation.FeatureName]: The name used in the model description of the CoreML model that produced this observation.
See: https://developer.apple.com/documentation/Vision/VNCoreMLFeatureValueObservation
type IVNCoreMLModel ¶
type IVNCoreMLModel interface {
objectivec.IObject
// An optional object to support inputs outside Vision.
FeatureProvider() coreml.MLFeatureProvider
SetFeatureProvider(value coreml.MLFeatureProvider)
// The name of the feature value that Vision sets from the request handler.
InputImageFeatureName() string
SetInputImageFeatureName(value string)
// The model to base the image analysis request on.
Model() IVNCoreMLModel
SetModel(value IVNCoreMLModel)
}
An interface definition for the VNCoreMLModel class.
Providing Features ¶
- [IVNCoreMLModel.FeatureProvider]: An optional object to support inputs outside Vision.
- [IVNCoreMLModel.SetFeatureProvider]
- [IVNCoreMLModel.InputImageFeatureName]: The name of the feature value that Vision sets from the request handler.
- [IVNCoreMLModel.SetInputImageFeatureName]
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel
type IVNCoreMLRequest ¶
type IVNCoreMLRequest interface {
IVNImageBasedRequest
// Creates a model container to use with an image analysis request based on the model you provide.
InitWithModel(model IVNCoreMLModel) VNCoreMLRequest
// Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.
InitWithModelCompletionHandler(model IVNCoreMLModel, completionHandler ErrorHandler) VNCoreMLRequest
// The model to base the image analysis request on.
Model() IVNCoreMLModel
// An optional setting that tells the Vision algorithm how to scale an input image.
ImageCropAndScaleOption() VNImageCropAndScaleOption
SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
// A constant for specifying revision 1 of a Core ML request.
VNCoreMLRequestRevision1() int
// The level of confidence in the observation’s accuracy.
Confidence() VNConfidence
SetConfidence(value VNConfidence)
// Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
ModelDescription() coreml.MLModelDescription
SetModelDescription(value coreml.MLModelDescription)
// The name of the primary prediction feature output description.
PredictedFeatureName() string
SetPredictedFeatureName(value string)
}
An interface definition for the VNCoreMLRequest class.
Initializing with a Core ML Model ¶
- [IVNCoreMLRequest.InitWithModel]: Creates a model container to use with an image analysis request based on the model you provide.
- [IVNCoreMLRequest.InitWithModelCompletionHandler]: Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.
- [IVNCoreMLRequest.Model]: The model to base the image analysis request on.
Configuring Image Options ¶
- [IVNCoreMLRequest.ImageCropAndScaleOption]: An optional setting that tells the Vision algorithm how to scale an input image.
- [IVNCoreMLRequest.SetImageCropAndScaleOption]
Identifying Request Revisions ¶
- [IVNCoreMLRequest.VNCoreMLRequestRevision1]: A constant for specifying revision 1 of a Core ML request.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest
type IVNDetectAnimalBodyPoseRequest ¶
type IVNDetectAnimalBodyPoseRequest interface {
IVNImageBasedRequest
// Retrieves the joint names the request supports.
SupportedJointNames() VNAnimalBodyPoseObservationJointName
SetSupportedJointNames(value VNAnimalBodyPoseObservationJointName)
// Retrieves the joint group names the request supports.
SupportedJointsGroupNames() VNAnimalBodyPoseObservationJointsGroupName
SetSupportedJointsGroupNames(value VNAnimalBodyPoseObservationJointsGroupName)
// Retrieves the joint names the request supports.
SupportedJointNamesAndReturnError() ([]string, error)
// Retrieves the joint group names the request supports.
SupportedJointsGroupNamesAndReturnError() ([]string, error)
}
An interface definition for the VNDetectAnimalBodyPoseRequest class.
Determining Supported Joints ¶
- [IVNDetectAnimalBodyPoseRequest.SupportedJointNames]: Retrieves the joint names the request supports.
- [IVNDetectAnimalBodyPoseRequest.SetSupportedJointNames]
- [IVNDetectAnimalBodyPoseRequest.SupportedJointsGroupNames]: Retrieves the joint group names the request supports.
- [IVNDetectAnimalBodyPoseRequest.SetSupportedJointsGroupNames]
See: https://developer.apple.com/documentation/Vision/VNDetectAnimalBodyPoseRequest
type IVNDetectBarcodesRequest ¶
type IVNDetectBarcodesRequest interface {
IVNImageBasedRequest
// Returns the barcode symbologies that the request supports.
SupportedSymbologiesAndReturnError() ([]string, error)
// The barcode symbologies that the request detects in an image.
Symbologies() []string
SetSymbologies(value []string)
// A Boolean value that indicates whether to coalesce multiple codes based on the symbology.
CoalesceCompositeSymbologies() bool
SetCoalesceCompositeSymbologies(value bool)
// A constant for specifying revision 3 of the barcode detection request.
VNDetectBarcodesRequestRevision3() int
// A constant for specifying revision 2 of the barcode detection request.
VNDetectBarcodesRequestRevision2() int
// A constant for specifying revision 1 of the barcode detection request.
VNDetectBarcodesRequestRevision1() int
}
An interface definition for the VNDetectBarcodesRequest class.
Specifying Symbologies ¶
- [IVNDetectBarcodesRequest.SupportedSymbologiesAndReturnError]: Returns the barcode symbologies that the request supports.
- [IVNDetectBarcodesRequest.Symbologies]: The barcode symbologies that the request detects in an image.
- [IVNDetectBarcodesRequest.SetSymbologies]
- [IVNDetectBarcodesRequest.CoalesceCompositeSymbologies]: A Boolean value that indicates whether to coalesce multiple codes based on the symbology.
- [IVNDetectBarcodesRequest.SetCoalesceCompositeSymbologies]
Identifying Request Revisions ¶
- [IVNDetectBarcodesRequest.VNDetectBarcodesRequestRevision3]: A constant for specifying revision 3 of the barcode detection request.
- [IVNDetectBarcodesRequest.VNDetectBarcodesRequestRevision2]: A constant for specifying revision 2 of the barcode detection request.
- [IVNDetectBarcodesRequest.VNDetectBarcodesRequestRevision1]: A constant for specifying revision 1 of the barcode detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequest
type IVNDetectContoursRequest ¶
type IVNDetectContoursRequest interface {
IVNImageBasedRequest
// The amount by which to adjust the image contrast.
ContrastAdjustment() float32
SetContrastAdjustment(value float32)
// The pixel value to use as a pivot for the contrast.
ContrastPivot() foundation.NSNumber
SetContrastPivot(value foundation.NSNumber)
// A Boolean value that indicates whether the request detects a dark object on a light background to aid in detection.
DetectsDarkOnLight() bool
SetDetectsDarkOnLight(value bool)
// The maximum image dimension to use for contour detection.
MaximumImageDimension() uint
SetMaximumImageDimension(value uint)
// A constant for specifying revision 1 of the contours detection request.
VNDetectContourRequestRevision1() int
}
An interface definition for the VNDetectContoursRequest class.
Configuring the Request ¶
- [IVNDetectContoursRequest.ContrastAdjustment]: The amount by which to adjust the image contrast.
- [IVNDetectContoursRequest.SetContrastAdjustment]
- [IVNDetectContoursRequest.ContrastPivot]: The pixel value to use as a pivot for the contrast.
- [IVNDetectContoursRequest.SetContrastPivot]
- [IVNDetectContoursRequest.DetectsDarkOnLight]: A Boolean value that indicates whether the request detects a dark object on a light background to aid in detection.
- [IVNDetectContoursRequest.SetDetectsDarkOnLight]
- [IVNDetectContoursRequest.MaximumImageDimension]: The maximum image dimension to use for contour detection.
- [IVNDetectContoursRequest.SetMaximumImageDimension]
Identifying Request Revisions ¶
- [IVNDetectContoursRequest.VNDetectContourRequestRevision1]: A constant for specifying revision 1 of the contours detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest
type IVNDetectDocumentSegmentationRequest ¶
type IVNDetectDocumentSegmentationRequest interface {
IVNImageBasedRequest
// A constant for specifying revision 1 of the document segmentation request.
VNDetectDocumentSegmentationRequestRevision1() int
}
An interface definition for the VNDetectDocumentSegmentationRequest class.
Identifying Request Revisions ¶
- [IVNDetectDocumentSegmentationRequest.VNDetectDocumentSegmentationRequestRevision1]: A constant for specifying revision 1 of the document segmentation request.
See: https://developer.apple.com/documentation/Vision/VNDetectDocumentSegmentationRequest
type IVNDetectFaceCaptureQualityRequest ¶
type IVNDetectFaceCaptureQualityRequest interface {
IVNImageBasedRequest
VNFaceObservationAccepting
// Revision 2 of the request algorithm.
VNDetectFaceCaptureQualityRequestRevision2() int
// A constant for specifying revision 1 of the face capture detection request.
VNDetectFaceCaptureQualityRequestRevision1() int
// A value that indicates the quality of the face capture.
FaceCaptureQuality() float32
SetFaceCaptureQuality(value float32)
}
An interface definition for the VNDetectFaceCaptureQualityRequest class.
Identifying Request Revisions ¶
- [IVNDetectFaceCaptureQualityRequest.VNDetectFaceCaptureQualityRequestRevision2]: Revision 2 of the request algorithm.
- [IVNDetectFaceCaptureQualityRequest.VNDetectFaceCaptureQualityRequestRevision1]: A constant for specifying revision 1 of the face capture detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceCaptureQualityRequest
type IVNDetectFaceLandmarksRequest ¶
type IVNDetectFaceLandmarksRequest interface {
IVNImageBasedRequest
// A variable that describes how a face landmarks request orders or enumerates the resulting features.
Constellation() VNRequestFaceLandmarksConstellation
SetConstellation(value VNRequestFaceLandmarksConstellation)
// A constant for specifying revision 3 of the face landmarks detection request.
VNDetectFaceLandmarksRequestRevision3() int
// A constant for specifying revision 2 of the face landmarks detection request.
VNDetectFaceLandmarksRequestRevision2() int
// A constant for specifying revision 1 of the face landmarks detection request.
VNDetectFaceLandmarksRequestRevision1() int
}
An interface definition for the VNDetectFaceLandmarksRequest class.
Locating Face Landmarks ¶
- [IVNDetectFaceLandmarksRequest.Constellation]: A variable that describes how a face landmarks request orders or enumerates the resulting features.
- [IVNDetectFaceLandmarksRequest.SetConstellation]
Identifying Request Revisions ¶
- [IVNDetectFaceLandmarksRequest.VNDetectFaceLandmarksRequestRevision3]: A constant for specifying revision 3 of the face landmarks detection request.
- [IVNDetectFaceLandmarksRequest.VNDetectFaceLandmarksRequestRevision2]: A constant for specifying revision 2 of the face landmarks detection request.
- [IVNDetectFaceLandmarksRequest.VNDetectFaceLandmarksRequestRevision1]: A constant for specifying revision 1 of the face landmarks detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequest
type IVNDetectFaceRectanglesRequest ¶
type IVNDetectFaceRectanglesRequest interface {
IVNImageBasedRequest
// A constant for specifying revision 3 of the face rectangles detection request.
VNDetectFaceRectanglesRequestRevision3() int
// A constant for specifying revision 2 of the face rectangles detection request.
VNDetectFaceRectanglesRequestRevision2() int
// A constant for specifying revision 1 of the face rectangles detection request.
VNDetectFaceRectanglesRequestRevision1() int
}
An interface definition for the VNDetectFaceRectanglesRequest class.
Identifying Request Revisions ¶
- [IVNDetectFaceRectanglesRequest.VNDetectFaceRectanglesRequestRevision3]: A constant for specifying revision 3 of the face rectangles detection request.
- [IVNDetectFaceRectanglesRequest.VNDetectFaceRectanglesRequestRevision2]: A constant for specifying revision 2 of the face rectangles detection request.
- [IVNDetectFaceRectanglesRequest.VNDetectFaceRectanglesRequestRevision1]: A constant for specifying revision 1 of the face rectangles detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequest
type IVNDetectHorizonRequest ¶
type IVNDetectHorizonRequest interface {
IVNImageBasedRequest
// A constant for specifying revision 1 of the horizon detection request.
VNDetectHorizonRequestRevision1() int
}
An interface definition for the VNDetectHorizonRequest class.
Identifying Request Revisions ¶
- [IVNDetectHorizonRequest.VNDetectHorizonRequestRevision1]: A constant for specifying revision 1 of the horizon detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHorizonRequest
type IVNDetectHumanBodyPose3DRequest ¶
type IVNDetectHumanBodyPose3DRequest interface {
IVNStatefulRequest
// Returns the joint names the request supports.
SupportedJointsGroupNames() VNHumanBodyPose3DObservationJointsGroupName
SetSupportedJointsGroupNames(value VNHumanBodyPose3DObservationJointsGroupName)
// Returns the joint group names the request supports.
SupportedJointNames() VNHumanBodyPose3DObservationJointName
SetSupportedJointNames(value VNHumanBodyPose3DObservationJointName)
// Returns the joint names the request supports.
SupportedJointNamesAndReturnError() ([]string, error)
// Returns the joint group names the request supports.
SupportedJointsGroupNamesAndReturnError() ([]string, error)
}
An interface definition for the VNDetectHumanBodyPose3DRequest class.
Determining Supported Joints ¶
- [IVNDetectHumanBodyPose3DRequest.SupportedJointsGroupNames]: Returns the joint names the request supports.
- [IVNDetectHumanBodyPose3DRequest.SetSupportedJointsGroupNames]
- [IVNDetectHumanBodyPose3DRequest.SupportedJointNames]: Returns the joint group names the request supports.
- [IVNDetectHumanBodyPose3DRequest.SetSupportedJointNames]
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPose3DRequest
type IVNDetectHumanBodyPoseRequest ¶
type IVNDetectHumanBodyPoseRequest interface {
IVNImageBasedRequest
// Retrieves the supported joint names.
SupportedJointNames() VNHumanBodyPoseObservationJointName
SetSupportedJointNames(value VNHumanBodyPoseObservationJointName)
// Retrieves the supported joint group names.
SupportedJointsGroupNames() VNHumanBodyPoseObservationJointsGroupName
SetSupportedJointsGroupNames(value VNHumanBodyPoseObservationJointsGroupName)
// A constant for specifying revision 1 of the body pose detection request.
VNDetectHumanBodyPoseRequestRevision1() int
// Retrieves the supported joint names.
SupportedJointNamesAndReturnError() ([]string, error)
// Retrieves the supported joint group names.
SupportedJointsGroupNamesAndReturnError() ([]string, error)
}
An interface definition for the VNDetectHumanBodyPoseRequest class.
Determining Supported Joints ¶
- [IVNDetectHumanBodyPoseRequest.SupportedJointNames]: Retrieves the supported joint names.
- [IVNDetectHumanBodyPoseRequest.SetSupportedJointNames]
- [IVNDetectHumanBodyPoseRequest.SupportedJointsGroupNames]: Retrieves the supported joint group names.
- [IVNDetectHumanBodyPoseRequest.SetSupportedJointsGroupNames]
Identifying Body Pose Revisions ¶
- [IVNDetectHumanBodyPoseRequest.VNDetectHumanBodyPoseRequestRevision1]: A constant for specifying revision 1 of the body pose detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPoseRequest
type IVNDetectHumanHandPoseRequest ¶
type IVNDetectHumanHandPoseRequest interface {
IVNImageBasedRequest
// The maximum number of hands to detect in an image.
MaximumHandCount() uint
SetMaximumHandCount(value uint)
// Retrieves the supported joint names.
SupportedJointNames() VNHumanHandPoseObservationJointName
SetSupportedJointNames(value VNHumanHandPoseObservationJointName)
// Retrieves the supported joint group names.
SupportedJointsGroupNames() VNHumanHandPoseObservationJointsGroupName
SetSupportedJointsGroupNames(value VNHumanHandPoseObservationJointsGroupName)
// A constant for specifying revision 1 of the hand pose detection request.
VNDetectHumanHandPoseRequestRevision1() int
// Retrieves the supported joint names.
SupportedJointNamesAndReturnError() ([]string, error)
// Retrieves the supported joint group names.
SupportedJointsGroupNamesAndReturnError() ([]string, error)
}
An interface definition for the VNDetectHumanHandPoseRequest class.
Configuring the Request ¶
- [IVNDetectHumanHandPoseRequest.MaximumHandCount]: The maximum number of hands to detect in an image.
- [IVNDetectHumanHandPoseRequest.SetMaximumHandCount]
Determining Supported Joints ¶
- [IVNDetectHumanHandPoseRequest.SupportedJointNames]: Retrieves the supported joint names.
- [IVNDetectHumanHandPoseRequest.SetSupportedJointNames]
- [IVNDetectHumanHandPoseRequest.SupportedJointsGroupNames]: Retrieves the supported joint group names.
- [IVNDetectHumanHandPoseRequest.SetSupportedJointsGroupNames]
Identifying Hand Pose Revisions ¶
- [IVNDetectHumanHandPoseRequest.VNDetectHumanHandPoseRequestRevision1]: A constant for specifying revision 1 of the hand pose detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanHandPoseRequest
type IVNDetectHumanRectanglesRequest ¶
type IVNDetectHumanRectanglesRequest interface {
IVNImageBasedRequest
// A Boolean value that indicates whether the request requires detecting a full body or upper body only to produce a result.
UpperBodyOnly() bool
SetUpperBodyOnly(value bool)
// A constant for specifying revision 2 of the human rectangles detection request.
VNDetectHumanRectanglesRequestRevision2() int
// A constant for specifying revision 1 of the human rectangles detection request.
VNDetectHumanRectanglesRequestRevision1() int
}
An interface definition for the VNDetectHumanRectanglesRequest class.
Configuring the Request ¶
- [IVNDetectHumanRectanglesRequest.UpperBodyOnly]: A Boolean value that indicates whether the request requires detecting a full body or upper body only to produce a result.
- [IVNDetectHumanRectanglesRequest.SetUpperBodyOnly]
Identifying Request Revisions ¶
- [IVNDetectHumanRectanglesRequest.VNDetectHumanRectanglesRequestRevision2]: A constant for specifying revision 2 of the human rectangles detection request.
- [IVNDetectHumanRectanglesRequest.VNDetectHumanRectanglesRequestRevision1]: A constant for specifying revision 1 of the human rectangles detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanRectanglesRequest
type IVNDetectRectanglesRequest ¶
type IVNDetectRectanglesRequest interface {
IVNImageBasedRequest
// A `float` specifying the minimum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
MinimumAspectRatio() VNAspectRatio
SetMinimumAspectRatio(value VNAspectRatio)
// A `float` specifying the maximum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
MaximumAspectRatio() VNAspectRatio
SetMaximumAspectRatio(value VNAspectRatio)
// A float specifying the number of degrees a rectangle corner angle can deviate from 90°.
QuadratureTolerance() VNDegrees
SetQuadratureTolerance(value VNDegrees)
// The minimum size of a rectangle to detect, as a proportion of the smallest dimension.
MinimumSize() float32
SetMinimumSize(value float32)
// A value specifying the minimum acceptable confidence level.
MinimumConfidence() VNConfidence
SetMinimumConfidence(value VNConfidence)
// An integer specifying the maximum number of rectangles Vision returns.
MaximumObservations() uint
SetMaximumObservations(value uint)
// A constant for specifying revision 1 of the rectangle detection request.
VNDetectRectanglesRequestRevision1() int
}
An interface definition for the VNDetectRectanglesRequest class.
Configuring Detection ¶
- [IVNDetectRectanglesRequest.MinimumAspectRatio]: A `float` specifying the minimum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
- [IVNDetectRectanglesRequest.SetMinimumAspectRatio]
- [IVNDetectRectanglesRequest.MaximumAspectRatio]: A `float` specifying the maximum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
- [IVNDetectRectanglesRequest.SetMaximumAspectRatio]
- [IVNDetectRectanglesRequest.QuadratureTolerance]: A float specifying the number of degrees a rectangle corner angle can deviate from 90°.
- [IVNDetectRectanglesRequest.SetQuadratureTolerance]
- [IVNDetectRectanglesRequest.MinimumSize]: The minimum size of a rectangle to detect, as a proportion of the smallest dimension.
- [IVNDetectRectanglesRequest.SetMinimumSize]
- [IVNDetectRectanglesRequest.MinimumConfidence]: A value specifying the minimum acceptable confidence level.
- [IVNDetectRectanglesRequest.SetMinimumConfidence]
- [IVNDetectRectanglesRequest.MaximumObservations]: An integer specifying the maximum number of rectangles Vision returns.
- [IVNDetectRectanglesRequest.SetMaximumObservations]
Identifying Request Revisions ¶
- [IVNDetectRectanglesRequest.VNDetectRectanglesRequestRevision1]: A constant for specifying revision 1 of the rectangle detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest
type IVNDetectTextRectanglesRequest ¶
type IVNDetectTextRectanglesRequest interface {
IVNImageBasedRequest
// A Boolean value that indicates whether the request detects character bounding boxes.
ReportCharacterBoxes() bool
SetReportCharacterBoxes(value bool)
// A constant for specifying revision 1 of the text rectangles detection request.
VNDetectTextRectanglesRequestRevision1() int
}
An interface definition for the VNDetectTextRectanglesRequest class.
Configuring a Request ¶
- [IVNDetectTextRectanglesRequest.ReportCharacterBoxes]: A Boolean value that indicates whether the request detects character bounding boxes.
- [IVNDetectTextRectanglesRequest.SetReportCharacterBoxes]
Identifying Request Revisions ¶
- [IVNDetectTextRectanglesRequest.VNDetectTextRectanglesRequestRevision1]: A constant for specifying revision 1 of the text rectangles detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectTextRectanglesRequest
type IVNDetectTrajectoriesRequest ¶
type IVNDetectTrajectoriesRequest interface {
IVNStatefulRequest
// Creates a new request to detect trajectories.
InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing objectivec.IObject, trajectoryLength int, completionHandler ErrorHandler) VNDetectTrajectoriesRequest
// The requested target frame time for processing trajectory detection.
TargetFrameTime() objectivec.IObject
SetTargetFrameTime(value objectivec.IObject)
// The number of points to detect before calculating a trajectory.
TrajectoryLength() int
// The minimum radius of the bounding circle of the object to track.
ObjectMinimumNormalizedRadius() float32
SetObjectMinimumNormalizedRadius(value float32)
// The maximum radius of the bounding circle of the object to track.
ObjectMaximumNormalizedRadius() float32
SetObjectMaximumNormalizedRadius(value float32)
// A constant for specifying revision 1 of the trajectories detection request.
VNDetectTrajectoriesRequestRevision1() int
}
An interface definition for the VNDetectTrajectoriesRequest class.
Creating a Request ¶
- [IVNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler]: Creates a new request to detect trajectories.
Configuring the Request ¶
- [IVNDetectTrajectoriesRequest.TargetFrameTime]: The requested target frame time for processing trajectory detection.
- [IVNDetectTrajectoriesRequest.SetTargetFrameTime]
- [IVNDetectTrajectoriesRequest.TrajectoryLength]: The number of points to detect before calculating a trajectory.
- [IVNDetectTrajectoriesRequest.ObjectMinimumNormalizedRadius]: The minimum radius of the bounding circle of the object to track.
- [IVNDetectTrajectoriesRequest.SetObjectMinimumNormalizedRadius]
- [IVNDetectTrajectoriesRequest.ObjectMaximumNormalizedRadius]: The maximum radius of the bounding circle of the object to track.
- [IVNDetectTrajectoriesRequest.SetObjectMaximumNormalizedRadius]
Identifying Request Revisions ¶
- [IVNDetectTrajectoriesRequest.VNDetectTrajectoriesRequestRevision1]: A constant for specifying revision 1 of the trajectories detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest
type IVNDetectedObjectObservation ¶
type IVNDetectedObjectObservation interface {
IVNObservation
// The bounding box of the object that the request detects.
BoundingBox() corefoundation.CGRect
// A resulting pixel buffer from a request to generate a segmentation mask for an image.
GlobalSegmentationMask() IVNPixelBufferObservation
}
An interface definition for the VNDetectedObjectObservation class.
Locating a Detected Object ¶
- [IVNDetectedObjectObservation.BoundingBox]: The bounding box of the object that the request detects.
Accessing an Image Mask ¶
- [IVNDetectedObjectObservation.GlobalSegmentationMask]: A resulting pixel buffer from a request to generate a segmentation mask for an image.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation
type IVNDetectedPoint ¶
type IVNDetectedPoint interface {
IVNPoint
// A confidence score that indicates the detected point’s accuracy.
Confidence() VNConfidence
}
An interface definition for the VNDetectedPoint class.
Inspecting a Point ¶
- [IVNDetectedPoint.Confidence]: A confidence score that indicates the detected point’s accuracy.
See: https://developer.apple.com/documentation/Vision/VNDetectedPoint
type IVNFaceLandmarkRegion ¶
type IVNFaceLandmarkRegion interface {
objectivec.IObject
VNRequestRevisionProviding
// The number of points in the face region.
PointCount() uint
// The facial features of the detected face.
Landmarks() IVNFaceLandmarks2D
SetLandmarks(value IVNFaceLandmarks2D)
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNFaceLandmarkRegion class.
Instance Properties ¶
- [IVNFaceLandmarkRegion.PointCount]: The number of points in the face region.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion
type IVNFaceLandmarkRegion2D ¶
type IVNFaceLandmarkRegion2D interface {
IVNFaceLandmarkRegion
// An enumeration that describes how to interpret the points the region provides.
PointsClassification() VNPointsClassification
// A buffer in memory containing normalized landmark points.
NormalizedPoints() *corefoundation.CGPoint
// An array of precision estimates for each landmark point.
PrecisionEstimatesPerPoint() []foundation.NSNumber
// A buffer in memory containing landmark points in the coordinate space of the specified image size.
PointsInImageOfSize(imageSize corefoundation.CGSize) *corefoundation.CGPoint
}
An interface definition for the VNFaceLandmarkRegion2D class.
Describing Region Points ¶
- [IVNFaceLandmarkRegion2D.PointsClassification]: An enumeration that describes how to interpret the points the region provides.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D
type IVNFaceLandmarks ¶
type IVNFaceLandmarks interface {
objectivec.IObject
VNRequestRevisionProviding
// A confidence estimate for the detected landmarks.
Confidence() VNConfidence
// The facial features of the detected face.
Landmarks() IVNFaceLandmarks2D
SetLandmarks(value IVNFaceLandmarks2D)
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNFaceLandmarks class.
Determining Accuracy ¶
- [IVNFaceLandmarks.Confidence]: A confidence estimate for the detected landmarks.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks
type IVNFaceLandmarks2D ¶
type IVNFaceLandmarks2D interface {
IVNFaceLandmarks
// The region containing all face landmark points.
AllPoints() IVNFaceLandmarkRegion2D
// The region containing points that trace the face contour from the left cheek, over the chin, to the right cheek.
FaceContour() IVNFaceLandmarkRegion2D
// The region containing points that outline the left eye.
LeftEye() IVNFaceLandmarkRegion2D
// The region containing points that outline the right eye.
RightEye() IVNFaceLandmarkRegion2D
// The region containing points that trace the left eyebrow.
LeftEyebrow() IVNFaceLandmarkRegion2D
// The region containing points that trace the right eyebrow.
RightEyebrow() IVNFaceLandmarkRegion2D
// The region containing points that outline the nose.
Nose() IVNFaceLandmarkRegion2D
// The region containing points that trace the center crest of the nose.
NoseCrest() IVNFaceLandmarkRegion2D
// The region containing points that trace a vertical line down the center of the face.
MedianLine() IVNFaceLandmarkRegion2D
// The region containing points that outline the outside of the lips.
OuterLips() IVNFaceLandmarkRegion2D
// The region containing points that outline the space between the lips.
InnerLips() IVNFaceLandmarkRegion2D
// The region containing the point where the left pupil is located.
LeftPupil() IVNFaceLandmarkRegion2D
// The region containing the point where the right pupil is located.
RightPupil() IVNFaceLandmarkRegion2D
// The bounding box of the object that the request detects.
BoundingBox() corefoundation.CGRect
SetBoundingBox(value corefoundation.CGRect)
}
An interface definition for the VNFaceLandmarks2D class.
Face Landmark Points ¶
- [IVNFaceLandmarks2D.AllPoints]: The region containing all face landmark points.
- [IVNFaceLandmarks2D.FaceContour]: The region containing points that trace the face contour from the left cheek, over the chin, to the right cheek.
- [IVNFaceLandmarks2D.LeftEye]: The region containing points that outline the left eye.
- [IVNFaceLandmarks2D.RightEye]: The region containing points that outline the right eye.
- [IVNFaceLandmarks2D.LeftEyebrow]: The region containing points that trace the left eyebrow.
- [IVNFaceLandmarks2D.RightEyebrow]: The region containing points that trace the right eyebrow.
- [IVNFaceLandmarks2D.Nose]: The region containing points that outline the nose.
- [IVNFaceLandmarks2D.NoseCrest]: The region containing points that trace the center crest of the nose.
- [IVNFaceLandmarks2D.MedianLine]: The region containing points that trace a vertical line down the center of the face.
- [IVNFaceLandmarks2D.OuterLips]: The region containing points that outline the outside of the lips.
- [IVNFaceLandmarks2D.InnerLips]: The region containing points that outline the space between the lips.
- [IVNFaceLandmarks2D.LeftPupil]: The region containing the point where the left pupil is located.
- [IVNFaceLandmarks2D.RightPupil]: The region containing the point where the right pupil is located.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D
type IVNFaceObservation ¶
type IVNFaceObservation interface {
IVNDetectedObjectObservation
// The facial features of the detected face.
Landmarks() IVNFaceLandmarks2D
// The roll angle of a face in radians.
Roll() foundation.NSNumber
// The yaw angle of a face in radians.
Yaw() foundation.NSNumber
// The pitch angle of a face in radians.
Pitch() foundation.NSNumber
// A value that indicates the quality of the face capture.
FaceCaptureQuality() foundation.NSNumber
// The results of the face-capture quality request.
Results() IVNFaceObservation
SetResults(value IVNFaceObservation)
}
An interface definition for the VNFaceObservation class.
Identifying Landmarks ¶
- [IVNFaceObservation.Landmarks]: The facial features of the detected face.
Determining Facial Orientation ¶
- [IVNFaceObservation.Roll]: The roll angle of a face in radians.
- [IVNFaceObservation.Yaw]: The yaw angle of a face in radians.
- [IVNFaceObservation.Pitch]: The pitch angle of a face in radians.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation
type IVNFeaturePrintObservation ¶
type IVNFeaturePrintObservation interface {
IVNObservation
// The feature print data.
Data() foundation.INSData
// The total number of elements in the data.
ElementCount() uint
// The type of each element in the data.
ElementType() VNElementType
// Computes the distance between two feature print observations.
ComputeDistanceToFeaturePrintObservationError(featurePrint VNFeaturePrintObservation) (float32, error)
}
An interface definition for the VNFeaturePrintObservation class.
Fetching Feature Print Data ¶
- [IVNFeaturePrintObservation.Data]: The feature print data.
- [IVNFeaturePrintObservation.ElementCount]: The total number of elements in the data.
Determining Types of Feature Prints ¶
- [IVNFeaturePrintObservation.ElementType]: The type of each element in the data.
Computing Distance Between Features ¶
- [IVNFeaturePrintObservation.ComputeDistanceToFeaturePrintObservationError]: Computes the distance between two feature print observations.
See: https://developer.apple.com/documentation/Vision/VNFeaturePrintObservation
type IVNGenerateAttentionBasedSaliencyImageRequest ¶
type IVNGenerateAttentionBasedSaliencyImageRequest interface {
IVNImageBasedRequest
// A constant for specifying revision 1 of the image saliency request.
VNGenerateAttentionBasedSaliencyImageRequestRevision1() int
}
An interface definition for the VNGenerateAttentionBasedSaliencyImageRequest class.
Identifying Request Revisions ¶
- [IVNGenerateAttentionBasedSaliencyImageRequest.VNGenerateAttentionBasedSaliencyImageRequestRevision1]: A constant for specifying revision 1 of the image saliency request.
See: https://developer.apple.com/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequest
type IVNGenerateForegroundInstanceMaskRequest ¶
type IVNGenerateForegroundInstanceMaskRequest interface {
IVNImageBasedRequest
// A constant for specifying the first revision of the foreground instance mask request.
VNGenerateForegroundInstanceMaskRequestRevision1() int
}
An interface definition for the VNGenerateForegroundInstanceMaskRequest class.
See: https://developer.apple.com/documentation/Vision/VNGenerateForegroundInstanceMaskRequest
type IVNGenerateImageFeaturePrintRequest ¶
type IVNGenerateImageFeaturePrintRequest interface {
IVNImageBasedRequest
// An optional setting that tells the algorithm how to scale an input image before generating the feature print.
ImageCropAndScaleOption() VNImageCropAndScaleOption
SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
// A constant for specifying the first revision of the feature-print request.
VNGenerateImageFeaturePrintRequestRevision1() int
}
An interface definition for the VNGenerateImageFeaturePrintRequest class.
Scaling and Cropping Images ¶
- [IVNGenerateImageFeaturePrintRequest.ImageCropAndScaleOption]: An optional setting that tells the algorithm how to scale an input image before generating the feature print.
- [IVNGenerateImageFeaturePrintRequest.SetImageCropAndScaleOption]
Identifying Request Revisions ¶
- [IVNGenerateImageFeaturePrintRequest.VNGenerateImageFeaturePrintRequestRevision1]: A constant for specifying the first revision of the feature-print request.
See: https://developer.apple.com/documentation/Vision/VNGenerateImageFeaturePrintRequest
type IVNGenerateObjectnessBasedSaliencyImageRequest ¶
type IVNGenerateObjectnessBasedSaliencyImageRequest interface {
IVNImageBasedRequest
// A constant for specifying revision 1 of the image saliency request.
VNGenerateObjectnessBasedSaliencyImageRequestRevision1() int
}
An interface definition for the VNGenerateObjectnessBasedSaliencyImageRequest class.
Identifying Request Revisions ¶
- [IVNGenerateObjectnessBasedSaliencyImageRequest.VNGenerateObjectnessBasedSaliencyImageRequestRevision1]: A constant for specifying revision 1 of the image saliency request.
See: https://developer.apple.com/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequest
type IVNGenerateOpticalFlowRequest ¶
type IVNGenerateOpticalFlowRequest interface {
IVNTargetedImageRequest
// The accuracy level for computing optical flow.
ComputationAccuracy() VNGenerateOpticalFlowRequestComputationAccuracy
SetComputationAccuracy(value VNGenerateOpticalFlowRequestComputationAccuracy)
// The output buffer’s pixel format.
OutputPixelFormat() uint32
SetOutputPixelFormat(value uint32)
// A Boolean value that indicates whether to keep the raw pixel buffer coming from the machine learning network.
KeepNetworkOutput() bool
SetKeepNetworkOutput(value bool)
// A constant for specifying revision 2 of the optical flow generation request.
VNGenerateOpticalFlowRequestRevision2() int
// A constant for specifying revision 1 of the optical flow generation request.
VNGenerateOpticalFlowRequestRevision1() int
}
An interface definition for the VNGenerateOpticalFlowRequest class.
Configuring the Request ¶
- [IVNGenerateOpticalFlowRequest.ComputationAccuracy]: The accuracy level for computing optical flow.
- [IVNGenerateOpticalFlowRequest.SetComputationAccuracy]
- [IVNGenerateOpticalFlowRequest.OutputPixelFormat]: The output buffer’s pixel format.
- [IVNGenerateOpticalFlowRequest.SetOutputPixelFormat]
- [IVNGenerateOpticalFlowRequest.KeepNetworkOutput]: A Boolean value that indicates whether to keep the raw pixel buffer coming from the machine learning network.
- [IVNGenerateOpticalFlowRequest.SetKeepNetworkOutput]
Identifying Request Revisions ¶
- [IVNGenerateOpticalFlowRequest.VNGenerateOpticalFlowRequestRevision2]: A constant for specifying revision 2 of the optical flow generation request.
- [IVNGenerateOpticalFlowRequest.VNGenerateOpticalFlowRequestRevision1]: A constant for specifying revision 1 of the optical flow generation request.
See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequest
type IVNGeneratePersonInstanceMaskRequest ¶
type IVNGeneratePersonInstanceMaskRequest interface {
IVNImageBasedRequest
// A constant for specifying revision 1 of the person instance mask request.
VNGeneratePersonInstanceMaskRequestRevision1() int
}
An interface definition for the VNGeneratePersonInstanceMaskRequest class.
Identifying Request Revisions ¶
- [IVNGeneratePersonInstanceMaskRequest.VNGeneratePersonInstanceMaskRequestRevision1]: A constant for specifying revision 1 of the person instance mask request.
See: https://developer.apple.com/documentation/Vision/VNGeneratePersonInstanceMaskRequest
type IVNGeneratePersonSegmentationRequest ¶
type IVNGeneratePersonSegmentationRequest interface {
IVNStatefulRequest
// The pixel format of the output image.
OutputPixelFormat() uint32
SetOutputPixelFormat(value uint32)
// A value that indicates how the request balances accuracy and performance.
QualityLevel() VNGeneratePersonSegmentationRequestQualityLevel
SetQualityLevel(value VNGeneratePersonSegmentationRequestQualityLevel)
// Returns a list of output pixel formats that the request supports.
SupportedOutputPixelFormatsAndReturnError() ([]foundation.NSNumber, error)
// A constant for specifying revision 1 of the person segmentation generation request.
VNGeneratePersonSegmentationRequestRevision1() int
}
An interface definition for the VNGeneratePersonSegmentationRequest class.
Configuring the Request ¶
- [IVNGeneratePersonSegmentationRequest.OutputPixelFormat]: The pixel format of the output image.
- [IVNGeneratePersonSegmentationRequest.SetOutputPixelFormat]
- [IVNGeneratePersonSegmentationRequest.QualityLevel]: A value that indicates how the request balances accuracy and performance.
- [IVNGeneratePersonSegmentationRequest.SetQualityLevel]
Getting the supported output pixel formats ¶
- [IVNGeneratePersonSegmentationRequest.SupportedOutputPixelFormatsAndReturnError]: Returns a list of output pixel formats that the request supports.
Identifying Request Revisions ¶
- [IVNGeneratePersonSegmentationRequest.VNGeneratePersonSegmentationRequestRevision1]: A constant for specifying revision 1 of the person segmentation generation request.
See: https://developer.apple.com/documentation/Vision/VNGeneratePersonSegmentationRequest
type IVNGeometryUtils ¶
type IVNGeometryUtils interface {
objectivec.IObject
}
An interface definition for the VNGeometryUtils class.
See: https://developer.apple.com/documentation/Vision/VNGeometryUtils
type IVNHomographicImageRegistrationRequest ¶
type IVNHomographicImageRegistrationRequest interface {
IVNImageRegistrationRequest
// A constant for specifying revision 1 of the homographic image registration request.
VNHomographicImageRegistrationRequestRevision1() int
}
An interface definition for the VNHomographicImageRegistrationRequest class.
Identifying Request Revisions ¶
- [IVNHomographicImageRegistrationRequest.VNHomographicImageRegistrationRequestRevision1]: A constant for specifying revision 1 of the homographic image registration request.
See: https://developer.apple.com/documentation/Vision/VNHomographicImageRegistrationRequest
type IVNHorizonObservation ¶
type IVNHorizonObservation interface {
IVNObservation
// The angle of the observed horizon.
Angle() float64
// The transform to apply to the detected horizon.
Transform() corefoundation.CGAffineTransform
// Creates an affine transform for the specified image width and height.
TransformForImageWidthHeight(width uintptr, height uintptr) corefoundation.CGAffineTransform
}
An interface definition for the VNHorizonObservation class.
Evaluating the Horizon ¶
- [IVNHorizonObservation.Angle]: The angle of the observed horizon.
- [IVNHorizonObservation.Transform]: The transform to apply to the detected horizon.
- [IVNHorizonObservation.TransformForImageWidthHeight]: Creates an affine transform for the specified image width and height.
See: https://developer.apple.com/documentation/Vision/VNHorizonObservation
type IVNHumanBodyPose3DObservation ¶
type IVNHumanBodyPose3DObservation interface {
IVNRecognizedPoints3DObservation
// The names of the available joints in the observation.
AvailableJointNames() []string
// The available joint group names in the observation.
AvailableJointsGroupNames() []string
// Returns the point for a joint name that the observation recognizes.
RecognizedPointForJointNameError(jointName VNHumanBodyPose3DObservationJointName) (IVNHumanBodyRecognizedPoint3D, error)
// Returns a collection of points for the group name you specify.
RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanBodyPose3DObservationJointsGroupName) (foundation.INSDictionary, error)
// Returns a 2D point for the joint name you specify, relative to the input image.
PointInImageForJointNameError(jointName VNHumanBodyPose3DObservationJointName) (IVNPoint, error)
// Returns the parent joint of the joint name you specify.
ParentJointNameForJointName(jointName VNHumanBodyPose3DObservationJointName) VNHumanBodyPose3DObservationJointName
// The technique the framework uses to estimate body height.
HeightEstimation() VNHumanBodyPose3DObservationHeightEstimation
// The estimated human body height, in meters.
BodyHeight() float32
// A transform from the skeleton hip to the camera.
CameraOriginMatrix() objectivec.IObject
// Gets a position relative to the camera for the body joint you specify.
GetCameraRelativePositionForJointNameError(modelPositionOut objectivec.IObject, jointName VNHumanBodyPose3DObservationJointName) (bool, error)
}
An interface definition for the VNHumanBodyPose3DObservation class.
Accessing Points ¶
- [IVNHumanBodyPose3DObservation.AvailableJointNames]: The names of the available joints in the observation.
- [IVNHumanBodyPose3DObservation.AvailableJointsGroupNames]: The available joint group names in the observation.
- [IVNHumanBodyPose3DObservation.RecognizedPointForJointNameError]: Returns the point for a joint name that the observation recognizes.
- [IVNHumanBodyPose3DObservation.RecognizedPointsForJointsGroupNameError]: Returns a collection of points for the group name you specify.
Getting the Joint Position ¶
- [IVNHumanBodyPose3DObservation.PointInImageForJointNameError]: Returns a 2D point for the joint name you specify, relative to the input image.
Getting the Parent Joint Name ¶
- [IVNHumanBodyPose3DObservation.ParentJointNameForJointName]: Returns the parent joint of the joint name you specify.
Getting the Body Height ¶
- [IVNHumanBodyPose3DObservation.HeightEstimation]: The technique the framework uses to estimate body height.
- [IVNHumanBodyPose3DObservation.BodyHeight]: The estimated human body height, in meters.
Getting the Camera Position ¶
- [IVNHumanBodyPose3DObservation.CameraOriginMatrix]: A transform from the skeleton hip to the camera.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation
type IVNHumanBodyPoseObservation ¶
type IVNHumanBodyPoseObservation interface {
IVNRecognizedPointsObservation
// The names of the available joints in the observation.
AvailableJointNames() []string
// The available joint group names in the observation.
AvailableJointsGroupNames() []string
// Retrieves the recognized point for a joint name.
RecognizedPointForJointNameError(jointName VNHumanBodyPoseObservationJointName) (IVNRecognizedPoint, error)
// Retrieves the recognized points associated with the joint group name.
RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanBodyPoseObservationJointsGroupName) (foundation.INSDictionary, error)
}
An interface definition for the VNHumanBodyPoseObservation class.
Accessing Points ¶
- [IVNHumanBodyPoseObservation.AvailableJointNames]: The names of the available joints in the observation.
- [IVNHumanBodyPoseObservation.AvailableJointsGroupNames]: The available joint group names in the observation.
- [IVNHumanBodyPoseObservation.RecognizedPointForJointNameError]: Retrieves the recognized point for a joint name.
- [IVNHumanBodyPoseObservation.RecognizedPointsForJointsGroupNameError]: Retrieves the recognized points associated with the joint group name.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation
type IVNHumanBodyRecognizedPoint3D ¶
type IVNHumanBodyRecognizedPoint3D interface {
IVNRecognizedPoint3D
// The three-dimensional position.
LocalPosition() objectivec.IObject
// The parent joint in the observation.
ParentJoint() VNHumanBodyPose3DObservationJointName
}
An interface definition for the VNHumanBodyRecognizedPoint3D class.
Getting the Position ¶
- [IVNHumanBodyRecognizedPoint3D.LocalPosition]: The three-dimensional position.
Getting the Parent Joint ¶
- [IVNHumanBodyRecognizedPoint3D.ParentJoint]: The parent joint in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyRecognizedPoint3D
type IVNHumanHandPoseObservation ¶
type IVNHumanHandPoseObservation interface {
IVNRecognizedPointsObservation
// The names of the available joints in the observation.
AvailableJointNames() []string
// The joint group names available in the observation.
AvailableJointsGroupNames() []string
// Retrieves the recognized point for a joint name.
RecognizedPointForJointNameError(jointName VNHumanHandPoseObservationJointName) (IVNRecognizedPoint, error)
// Retrieves the recognized points associated with the joint group name.
RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanHandPoseObservationJointsGroupName) (foundation.INSDictionary, error)
// The chirality, or handedness, of a pose.
Chirality() VNChirality
}
An interface definition for the VNHumanHandPoseObservation class.
Retrieving Points ¶
- [IVNHumanHandPoseObservation.AvailableJointNames]: The names of the available joints in the observation.
- [IVNHumanHandPoseObservation.AvailableJointsGroupNames]: The joint group names available in the observation.
- [IVNHumanHandPoseObservation.RecognizedPointForJointNameError]: Retrieves the recognized point for a joint name.
- [IVNHumanHandPoseObservation.RecognizedPointsForJointsGroupNameError]: Retrieves the recognized points associated with the joint group name.
Determining the Chirality ¶
- [IVNHumanHandPoseObservation.Chirality]: The chirality, or handedness, of a pose.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation
type IVNHumanObservation ¶
type IVNHumanObservation interface {
IVNDetectedObjectObservation
// A Boolean value that indicates whether the observation represents an upper-body or full-body rectangle.
UpperBodyOnly() bool
}
An interface definition for the VNHumanObservation class.
Inspecting the Observation ¶
- [IVNHumanObservation.UpperBodyOnly]: A Boolean value that indicates whether the observation represents an upper-body or full-body rectangle.
See: https://developer.apple.com/documentation/Vision/VNHumanObservation
type IVNImageAestheticsScoresObservation ¶
type IVNImageAestheticsScoresObservation interface {
IVNObservation
// A score which incorporates aesthetic score, failure score, and utility labels.
OverallScore() float32
// A Boolean value that represents images that are not necessarily of poor image quality, but may not have memorable or exciting content.
IsUtility() bool
// The results of the aesthetics request.
Results() IVNImageAestheticsScoresObservation
SetResults(value IVNImageAestheticsScoresObservation)
}
An interface definition for the VNImageAestheticsScoresObservation class.
Parsing Observation Content ¶
- [IVNImageAestheticsScoresObservation.OverallScore]: A score which incorporates aesthetic score, failure score, and utility labels.
- [IVNImageAestheticsScoresObservation.IsUtility]: A Boolean value that represents images that are not necessarily of poor image quality, but may not have memorable or exciting content.
See: https://developer.apple.com/documentation/Vision/VNImageAestheticsScoresObservation
type IVNImageAlignmentObservation ¶
type IVNImageAlignmentObservation interface {
IVNObservation
}
An interface definition for the VNImageAlignmentObservation class.
See: https://developer.apple.com/documentation/Vision/VNImageAlignmentObservation
type IVNImageBasedRequest ¶
type IVNImageBasedRequest interface {
IVNRequest
// The region of the image in which Vision will perform the request.
RegionOfInterest() corefoundation.CGRect
SetRegionOfInterest(value corefoundation.CGRect)
}
An interface definition for the VNImageBasedRequest class.
Configuring a Request ¶
- [IVNImageBasedRequest.RegionOfInterest]: The region of the image in which Vision will perform the request.
- [IVNImageBasedRequest.SetRegionOfInterest]
See: https://developer.apple.com/documentation/Vision/VNImageBasedRequest
type IVNImageHomographicAlignmentObservation ¶
type IVNImageHomographicAlignmentObservation interface {
IVNImageAlignmentObservation
// The warp transform matrix to morph the floating image into the reference image.
WarpTransform() objectivec.IObject
}
An interface definition for the VNImageHomographicAlignmentObservation class.
Accessing the Transform ¶
- [IVNImageHomographicAlignmentObservation.WarpTransform]: The warp transform matrix to morph the floating image into the reference image.
See: https://developer.apple.com/documentation/Vision/VNImageHomographicAlignmentObservation
type IVNImageRegistrationRequest ¶
type IVNImageRegistrationRequest interface {
IVNTargetedImageRequest
}
An interface definition for the VNImageRegistrationRequest class.
See: https://developer.apple.com/documentation/Vision/VNImageRegistrationRequest
type IVNImageRequestHandler ¶
type IVNImageRequestHandler interface {
objectivec.IObject
// Creates a handler to be used for performing requests on Core Graphics images.
InitWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to be used for performing requests on a Core Graphics image with known orientation.
InitWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to use for performing requests on Core Image image data.
InitWithCIImageOptions(image coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to be used for performing requests on Core Image image data of a known orientation.
InitWithCIImageOrientationOptions(image coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler for performing requests on a Core Video pixel buffer.
InitWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler for performing requests on a Core Video pixel buffer of a known orientation.
InitWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
InitWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a request handler that performs requests on an image contained within a sample buffer.
InitWithCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer.
InitWithCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a request handler that performs requests on an image in a sample buffer that contains depth data.
InitWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer objectivec.IObject, depthData objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to use for performing requests on an image in a data object.
InitWithDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to use for performing requests on an image of known orientation.
InitWithDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to be used for performing requests on an image at the specified URL.
InitWithURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to be used for performing requests on an image with known orientation, at the specified URL.
InitWithURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
// Schedules Vision requests to perform.
PerformRequestsError(requests []VNRequest) (bool, error)
}
An interface definition for the VNImageRequestHandler class.
Creating a Request Handler ¶
- [IVNImageRequestHandler.InitWithCGImageOptions]: Creates a handler to be used for performing requests on Core Graphics images.
- [IVNImageRequestHandler.InitWithCGImageOrientationOptions]: Creates a handler to be used for performing requests on a Core Graphics image with known orientation.
- [IVNImageRequestHandler.InitWithCIImageOptions]: Creates a handler to use for performing requests on Core Image image data.
- [IVNImageRequestHandler.InitWithCIImageOrientationOptions]: Creates a handler to be used for performing requests on Core Image image data of a known orientation.
- [IVNImageRequestHandler.InitWithCVPixelBufferOptions]: Creates a handler for performing requests on a Core Video pixel buffer.
- [IVNImageRequestHandler.InitWithCVPixelBufferOrientationOptions]: Creates a handler for performing requests on a Core Video pixel buffer of a known orientation.
- [IVNImageRequestHandler.InitWithCVPixelBufferDepthDataOrientationOptions]
- [IVNImageRequestHandler.InitWithCMSampleBufferOptions]: Creates a request handler that performs requests on an image contained within a sample buffer.
- [IVNImageRequestHandler.InitWithCMSampleBufferOrientationOptions]: Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer.
- [IVNImageRequestHandler.InitWithCMSampleBufferDepthDataOrientationOptions]: Creates a request handler that performs requests on an image in a sample buffer that contains depth data.
- [IVNImageRequestHandler.InitWithDataOptions]: Creates a handler to use for performing requests on an image in a data object.
- [IVNImageRequestHandler.InitWithDataOrientationOptions]: Creates a handler to use for performing requests on an image of known orientation.
- [IVNImageRequestHandler.InitWithURLOptions]: Creates a handler to be used for performing requests on an image at the specified URL.
- [IVNImageRequestHandler.InitWithURLOrientationOptions]: Creates a handler to be used for performing requests on an image with known orientation, at the specified URL.
Executing a Request Handler ¶
- [IVNImageRequestHandler.PerformRequestsError]: Schedules Vision requests to perform.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler
type IVNImageTranslationAlignmentObservation ¶
type IVNImageTranslationAlignmentObservation interface {
IVNImageAlignmentObservation
// The alignment transform to align the floating image with the reference image.
AlignmentTransform() corefoundation.CGAffineTransform
// A constant for specifying revision 1 of the translational image registration request.
VNTranslationalImageRegistrationRequestRevision1() int
}
An interface definition for the VNImageTranslationAlignmentObservation class.
Determining Alignment ¶
- [IVNImageTranslationAlignmentObservation.AlignmentTransform]: The alignment transform to align the floating image with the reference image.
Identifying Request Revisions ¶
- [IVNImageTranslationAlignmentObservation.VNTranslationalImageRegistrationRequestRevision1]: A constant for specifying revision 1 of the translational image registration request.
See: https://developer.apple.com/documentation/Vision/VNImageTranslationAlignmentObservation
type IVNInstanceMaskObservation ¶
type IVNInstanceMaskObservation interface {
IVNObservation
// The collection that contains all instances, excluding the background.
AllInstances() foundation.NSIndexSet
// The resulting mask that represents all instances.
InstanceMask() corevideo.CVImageBufferRef
// Creates a low-resolution mask from the instances you specify.
GenerateMaskForInstancesError(instances foundation.NSIndexSet) (corevideo.CVImageBufferRef, error)
// Creates a high-resolution image where everything becomes transparent black, except for the instances you specify.
GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError(instances foundation.NSIndexSet, requestHandler IVNImageRequestHandler, cropResult bool) (corevideo.CVImageBufferRef, error)
// Creates a high-resolution mask where everything becomes transparent black, except for the instances you specify.
GenerateScaledMaskForImageForInstancesFromRequestHandlerError(instances foundation.NSIndexSet, requestHandler IVNImageRequestHandler) (corevideo.CVImageBufferRef, error)
// A constant for specifying the first revision of the foreground instance mask request.
VNGenerateForegroundInstanceMaskRequestRevision1() int
}
An interface definition for the VNInstanceMaskObservation class.
Accessing Instances ¶
- [IVNInstanceMaskObservation.AllInstances]: The collection that contains all instances, excluding the background.
- [IVNInstanceMaskObservation.InstanceMask]: The resulting mask that represents all instances.
Creating a Mask ¶
- [IVNInstanceMaskObservation.GenerateMaskForInstancesError]: Creates a low-resolution mask from the instances you specify.
- [IVNInstanceMaskObservation.GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError]: Creates a high-resolution image where everything becomes transparent black, except for the instances you specify.
- [IVNInstanceMaskObservation.GenerateScaledMaskForImageForInstancesFromRequestHandlerError]: Creates a high-resolution mask where everything becomes transparent black, except for the instances you specify.
See: https://developer.apple.com/documentation/Vision/VNInstanceMaskObservation
type IVNObservation ¶
type IVNObservation interface {
objectivec.IObject
VNRequestRevisionProviding
// A unique identifier assigned to the Vision observation.
Uuid() foundation.NSUUID
// The time range of the reported observation.
TimeRange() objectivec.IObject
// The level of confidence in the observation’s accuracy.
Confidence() VNConfidence
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNObservation class.
Tracking Observations ¶
- [IVNObservation.Uuid]: A unique identifier assigned to the Vision observation.
Evaluating Observations ¶
- [IVNObservation.TimeRange]: The time range of the reported observation.
- [IVNObservation.Confidence]: The level of confidence in the observation’s accuracy.
See: https://developer.apple.com/documentation/Vision/VNObservation
type IVNPixelBufferObservation ¶
type IVNPixelBufferObservation interface {
IVNObservation
// The image that results from a request with image output.
PixelBuffer() corevideo.CVImageBufferRef
// A feature name that the CoreML model defines.
FeatureName() string
// Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
ModelDescription() coreml.MLModelDescription
SetModelDescription(value coreml.MLModelDescription)
// A dictionary of output feature descriptions, which the model keys by the output’s name.
OutputDescriptionsByName() coreml.MLFeatureDescription
SetOutputDescriptionsByName(value coreml.MLFeatureDescription)
}
An interface definition for the VNPixelBufferObservation class.
Parsing Observation Content ¶
- [IVNPixelBufferObservation.PixelBuffer]: The image that results from a request with image output.
- [IVNPixelBufferObservation.FeatureName]: A feature name that the CoreML model defines.
See: https://developer.apple.com/documentation/Vision/VNPixelBufferObservation
type IVNPoint ¶
type IVNPoint interface {
objectivec.IObject
// Creates a point object with the specified coordinates.
InitWithXY(x float64, y float64) VNPoint
// Creates a point object from the specified Core Graphics point.
InitWithLocation(location corefoundation.CGPoint) VNPoint
// The x-coordinate.
X() float64
// The y-coordinate.
Y() float64
// The Core Graphics point for this point.
Location() corefoundation.CGPoint
// Returns the distance to another point.
DistanceToPoint(point IVNPoint) float64
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNPoint class.
Creating a Point ¶
- [IVNPoint.InitWithXY]: Creates a point object with the specified coordinates.
- [IVNPoint.InitWithLocation]: Creates a point object from the specified Core Graphics point.
Inspecting a Point ¶
- [IVNPoint.X]: The x-coordinate.
- [IVNPoint.Y]: The y-coordinate.
- [IVNPoint.Location]: The Core Graphics point for this point.
Calculating Distance ¶
- [IVNPoint.DistanceToPoint]: Returns the distance to another point.
See: https://developer.apple.com/documentation/Vision/VNPoint
type IVNPoint3D ¶
type IVNPoint3D interface {
objectivec.IObject
// Creates a point object with the position you specify.
InitWithPosition(position objectivec.IObject) VNPoint3D
// The three-dimensional position.
Position() objectivec.IObject
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNPoint3D class.
Creating a Point ¶
- [IVNPoint3D.InitWithPosition]: Creates a point object with the position you specify.
Getting the Position ¶
- [IVNPoint3D.Position]: The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D
type IVNRecognizeAnimalsRequest ¶
type IVNRecognizeAnimalsRequest interface {
IVNImageBasedRequest
// Returns the identifiers of the animals that the request detects.
SupportedIdentifiersAndReturnError() ([]string, error)
// A constant for specifying revision 2 of the animal recognition request.
VNRecognizeAnimalsRequestRevision2() int
// A constant for specifying revision 1 of the animal recognition request.
VNRecognizeAnimalsRequestRevision1() int
}
An interface definition for the VNRecognizeAnimalsRequest class.
Identifying Animals ¶
- [IVNRecognizeAnimalsRequest.SupportedIdentifiersAndReturnError]: Returns the identifiers of the animals that the request detects.
Identifying Request Revisions ¶
- [IVNRecognizeAnimalsRequest.VNRecognizeAnimalsRequestRevision2]: A constant for specifying revision 2 of the animal recognition request.
- [IVNRecognizeAnimalsRequest.VNRecognizeAnimalsRequestRevision1]: A constant for specifying revision 1 of the animal recognition request.
See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequest
type IVNRecognizeTextRequest ¶
type IVNRecognizeTextRequest interface {
IVNImageBasedRequest
VNRequestProgressProviding
// The minimum height, relative to the image height, of the text to recognize.
MinimumTextHeight() float32
SetMinimumTextHeight(value float32)
// A value that determines whether the request prioritizes accuracy or speed in text recognition.
RecognitionLevel() VNRequestTextRecognitionLevel
SetRecognitionLevel(value VNRequestTextRecognitionLevel)
// A Boolean value that indicates whether to attempt detecting the language to use the appropriate model for recognition and language correction.
AutomaticallyDetectsLanguage() bool
SetAutomaticallyDetectsLanguage(value bool)
// An array of languages to detect, in priority order.
RecognitionLanguages() []string
SetRecognitionLanguages(value []string)
// A Boolean value that indicates whether the request applies language correction during the recognition process.
UsesLanguageCorrection() bool
SetUsesLanguageCorrection(value bool)
// An array of strings to supplement the recognized languages at the word-recognition stage.
CustomWords() []string
SetCustomWords(value []string)
// Returns the identifiers of the languages that the request supports.
SupportedRecognitionLanguagesAndReturnError() ([]string, error)
// A constant for specifying revision 3 of the text recognition request.
VNRecognizeTextRequestRevision3() int
// A constant for specifying revision 2 of the text recognition request.
VNRecognizeTextRequestRevision2() int
// A constant for specifying revision 1 of the text recognition request.
VNRecognizeTextRequestRevision1() int
}
An interface definition for the VNRecognizeTextRequest class.
Customizing Recognition Constraints ¶
- [IVNRecognizeTextRequest.MinimumTextHeight]: The minimum height, relative to the image height, of the text to recognize.
- [IVNRecognizeTextRequest.SetMinimumTextHeight]
- [IVNRecognizeTextRequest.RecognitionLevel]: A value that determines whether the request prioritizes accuracy or speed in text recognition.
- [IVNRecognizeTextRequest.SetRecognitionLevel]
Specifying the Language ¶
- [IVNRecognizeTextRequest.AutomaticallyDetectsLanguage]: A Boolean value that indicates whether to attempt detecting the language to use the appropriate model for recognition and language correction.
- [IVNRecognizeTextRequest.SetAutomaticallyDetectsLanguage]
- [IVNRecognizeTextRequest.RecognitionLanguages]: An array of languages to detect, in priority order.
- [IVNRecognizeTextRequest.SetRecognitionLanguages]
- [IVNRecognizeTextRequest.UsesLanguageCorrection]: A Boolean value that indicates whether the request applies language correction during the recognition process.
- [IVNRecognizeTextRequest.SetUsesLanguageCorrection]
- [IVNRecognizeTextRequest.CustomWords]: An array of strings to supplement the recognized languages at the word-recognition stage.
- [IVNRecognizeTextRequest.SetCustomWords]
- [IVNRecognizeTextRequest.SupportedRecognitionLanguagesAndReturnError]: Returns the identifiers of the languages that the request supports.
Identifying Request Revisions ¶
- [IVNRecognizeTextRequest.VNRecognizeTextRequestRevision3]: A constant for specifying revision 3 of the text recognition request.
- [IVNRecognizeTextRequest.VNRecognizeTextRequestRevision2]: A constant for specifying revision 2 of the text recognition request.
- [IVNRecognizeTextRequest.VNRecognizeTextRequestRevision1]: A constant for specifying revision 1 of the text recognition request.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest
type IVNRecognizedObjectObservation ¶
type IVNRecognizedObjectObservation interface {
IVNDetectedObjectObservation
// An array of observations that classify the recognized object.
Labels() []VNClassificationObservation
}
An interface definition for the VNRecognizedObjectObservation class.
Classifying a Recognized Object ¶
- [IVNRecognizedObjectObservation.Labels]: An array of observations that classify the recognized object.
See: https://developer.apple.com/documentation/Vision/VNRecognizedObjectObservation
type IVNRecognizedPoint ¶
type IVNRecognizedPoint interface {
IVNDetectedPoint
// The point’s identifier label.
Identifier() VNRecognizedPointKey
}
An interface definition for the VNRecognizedPoint class.
Inspecting a Point ¶
- [IVNRecognizedPoint.Identifier]: The point’s identifier label.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoint
type IVNRecognizedPoint3D ¶
type IVNRecognizedPoint3D interface {
IVNPoint3D
// The identifier that provides context about what kind of point the request recognizes.
Identifier() VNRecognizedPointKey
}
An interface definition for the VNRecognizedPoint3D class.
Getting the Identifier ¶
- [IVNRecognizedPoint3D.Identifier]: The identifier that provides context about what kind of point the request recognizes.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoint3D
type IVNRecognizedPoints3DObservation ¶
type IVNRecognizedPoints3DObservation interface {
IVNObservation
// The available point keys in the observation.
AvailableKeys() []string
// The available point group keys in the observation.
AvailableGroupKeys() []string
// Returns a point for a key you specify.
RecognizedPointForKeyError(pointKey VNRecognizedPointKey) (IVNRecognizedPoint3D, error)
// Returns a point for a group key you specify.
RecognizedPointsForGroupKeyError(groupKey VNRecognizedPointGroupKey) (foundation.INSDictionary, error)
}
An interface definition for the VNRecognizedPoints3DObservation class.
Inspecting the Observation ¶
- [IVNRecognizedPoints3DObservation.AvailableKeys]: The available point keys in the observation.
- [IVNRecognizedPoints3DObservation.AvailableGroupKeys]: The available point group keys in the observation.
- [IVNRecognizedPoints3DObservation.RecognizedPointForKeyError]: Returns a point for a key you specify.
- [IVNRecognizedPoints3DObservation.RecognizedPointsForGroupKeyError]: Returns a point for a group key you specify.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoints3DObservation
type IVNRecognizedPointsObservation ¶
type IVNRecognizedPointsObservation interface {
IVNObservation
// The available point keys in the observation.
AvailableKeys() []string
// The available point group keys in the observation.
AvailableGroupKeys() []string
// Retrieves a recognized point for a key.
RecognizedPointForKeyError(pointKey VNRecognizedPointKey) (IVNRecognizedPoint, error)
// Retrieves the recognized points for a key.
RecognizedPointsForGroupKeyError(groupKey VNRecognizedPointGroupKey) (foundation.INSDictionary, error)
// Retrieves the grouping of normalized point coordinates and confidence scores in a format compatible with Core ML.
KeypointsMultiArrayAndReturnError() (coreml.MLMultiArray, error)
}
An interface definition for the VNRecognizedPointsObservation class.
Inspecting the Observation ¶
- [IVNRecognizedPointsObservation.AvailableKeys]: The available point keys in the observation.
- [IVNRecognizedPointsObservation.AvailableGroupKeys]: The available point group keys in the observation.
- [IVNRecognizedPointsObservation.RecognizedPointForKeyError]: Retrieves a recognized point for a key.
- [IVNRecognizedPointsObservation.RecognizedPointsForGroupKeyError]: Retrieves the recognized points for a key.
Converting Points for Core ML ¶
- [IVNRecognizedPointsObservation.KeypointsMultiArrayAndReturnError]: Retrieves the grouping of normalized point coordinates and confidence scores in a format compatible with Core ML.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointsObservation
type IVNRecognizedText ¶
type IVNRecognizedText interface {
objectivec.IObject
VNRequestRevisionProviding
// The top candidate for recognized text.
String() string
// A normalized confidence score for the text recognition result.
Confidence() VNConfidence
// Calculates the bounding box around the characters in the range of a string.
BoundingBoxForRangeError(range_ foundation.NSRange) (IVNRectangleObservation, error)
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNRecognizedText class.
Determining Recognized Text ¶
- [IVNRecognizedText.String]: The top candidate for recognized text.
- [IVNRecognizedText.Confidence]: A normalized confidence score for the text recognition result.
See: https://developer.apple.com/documentation/Vision/VNRecognizedText
type IVNRecognizedTextObservation ¶
type IVNRecognizedTextObservation interface {
IVNRectangleObservation
// Requests the top candidates for a recognized text string.
TopCandidates(maxCandidateCount uint) []VNRecognizedText
}
An interface definition for the VNRecognizedTextObservation class.
Obtaining Recognized Text ¶
- [IVNRecognizedTextObservation.TopCandidates]: Requests the top candidates for a recognized text string.
See: https://developer.apple.com/documentation/Vision/VNRecognizedTextObservation
type IVNRectangleObservation ¶
type IVNRectangleObservation interface {
IVNDetectedObjectObservation
// The coordinates of the lower-left corner of the observation bounding box.
BottomLeft() corefoundation.CGPoint
// The coordinates of the lower-right corner of the observation bounding box.
BottomRight() corefoundation.CGPoint
// The coordinates of the upper-left corner of the observation bounding box.
TopLeft() corefoundation.CGPoint
// The coordinates of the upper-right corner of the observation bounding box.
TopRight() corefoundation.CGPoint
// The results of a document segmentation request.
Results() IVNRectangleObservation
SetResults(value IVNRectangleObservation)
}
An interface definition for the VNRectangleObservation class.
Accessing the Coordinates ¶
- [IVNRectangleObservation.BottomLeft]: The coordinates of the lower-left corner of the observation bounding box.
- [IVNRectangleObservation.BottomRight]: The coordinates of the lower-right corner of the observation bounding box.
- [IVNRectangleObservation.TopLeft]: The coordinates of the upper-left corner of the observation bounding box.
- [IVNRectangleObservation.TopRight]: The coordinates of the upper-right corner of the observation bounding box.
See: https://developer.apple.com/documentation/Vision/VNRectangleObservation
type IVNRequest ¶
type IVNRequest interface {
objectivec.IObject
// Creates a new Vision request with an optional completion handler.
InitWithCompletionHandler(completionHandler ErrorHandler) VNRequest
// The completion handler the system invokes after the request finishes processing.
CompletionHandler() VNRequestCompletionHandler
// A hint to minimize the resource burden of the request.
PreferBackgroundProcessing() bool
SetPreferBackgroundProcessing(value bool)
// The collection of observation results generated by request processing.
Results() []VNObservation
// The specific algorithm or implementation revision that’s used to perform the request.
Revision() uint
SetRevision(value uint)
// A Boolean signifying that the Vision request should execute exclusively on the CPU.
UsesCPUOnly() bool
SetUsesCPUOnly(value bool)
// The collection of compute devices per stage that a request supports.
SupportedComputeStageDevices() objectivec.IObject
SetSupportedComputeStageDevices(value objectivec.IObject)
// Cancels the request before it can finish executing.
Cancel()
// Returns the compute device for a compute stage.
ComputeDeviceForComputeStage(computeStage VNComputeStage) coreml.MLComputeDeviceProtocol
// Assigns a compute device for a compute stage.
SetComputeDeviceForComputeStage(computeDevice coreml.MLComputeDeviceProtocol, computeStage VNComputeStage)
// The collection of compute devices per stage that a request supports.
SupportedComputeStageDevicesAndReturnError() (foundation.INSDictionary, error)
}
An interface definition for the VNRequest class.
Initializing a Request ¶
- [IVNRequest.InitWithCompletionHandler]: Creates a new Vision request with an optional completion handler.
Configuring a Request ¶
- [IVNRequest.CompletionHandler]: The completion handler the system invokes after the request finishes processing.
- [IVNRequest.PreferBackgroundProcessing]: A hint to minimize the resource burden of the request.
- [IVNRequest.SetPreferBackgroundProcessing]
- [IVNRequest.Results]: The collection of observation results generated by request processing.
- [IVNRequest.Revision]: The specific algorithm or implementation revision that’s used to perform the request.
- [IVNRequest.SetRevision]
- [IVNRequest.UsesCPUOnly]: A Boolean signifying that the Vision request should execute exclusively on the CPU.
- [IVNRequest.SetUsesCPUOnly]
Configuring the Compute Device ¶
- [IVNRequest.SupportedComputeStageDevices]: The collection of compute devices per stage that a request supports.
- [IVNRequest.SetSupportedComputeStageDevices]
Canceling a Request ¶
- [IVNRequest.Cancel]: Cancels the request before it can finish executing.
See: https://developer.apple.com/documentation/Vision/VNRequest
type IVNSaliencyImageObservation ¶
type IVNSaliencyImageObservation interface {
IVNPixelBufferObservation
// A collection of objects describing the distinct areas of the saliency heat map.
SalientObjects() []VNRectangleObservation
}
An interface definition for the VNSaliencyImageObservation class.
Locating Salient Regions ¶
- [IVNSaliencyImageObservation.SalientObjects]: A collection of objects describing the distinct areas of the saliency heat map.
See: https://developer.apple.com/documentation/Vision/VNSaliencyImageObservation
type IVNSequenceRequestHandler ¶
type IVNSequenceRequestHandler interface {
objectivec.IObject
// Schedules Vision requests to be performed on a Core Graphics image.
PerformRequestsOnCGImageError(requests []VNRequest, image coregraphics.CGImageRef) (bool, error)
// Schedules one or more Vision requests to be performed on a Core Graphics image with known orientation.
PerformRequestsOnCGImageOrientationError(requests []VNRequest, image coregraphics.CGImageRef, orientation objectivec.IObject) (bool, error)
// Schedules one or more Vision requests to be performed on Core Image image data.
PerformRequestsOnCIImageError(requests []VNRequest, image coreimage.CIImage) (bool, error)
// Schedules one or more Vision requests to be performed on Core Image image data with known orientation.
PerformRequestsOnCIImageOrientationError(requests []VNRequest, image coreimage.CIImage, orientation objectivec.IObject) (bool, error)
// Schedules one or more Vision requests to be performed on a Core Video pixel buffer.
PerformRequestsOnCVPixelBufferError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef) (bool, error)
// Schedules one or more Vision requests to be performed on a Core Video pixel buffer with known orientation.
PerformRequestsOnCVPixelBufferOrientationError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject) (bool, error)
// Performs one or more requests on an image contained within a sample buffer.
PerformRequestsOnCMSampleBufferError(requests []VNRequest, sampleBuffer objectivec.IObject) (bool, error)
// Performs one or more requests on an image of a specified orientation contained within a sample buffer.
PerformRequestsOnCMSampleBufferOrientationError(requests []VNRequest, sampleBuffer objectivec.IObject, orientation objectivec.IObject) (bool, error)
// Schedules one or more Vision requests to be performed on raw image data.
PerformRequestsOnImageDataError(requests []VNRequest, imageData foundation.INSData) (bool, error)
// Schedules one or more Vision requests to be performed on raw data containing an image with known orientation.
PerformRequestsOnImageDataOrientationError(requests []VNRequest, imageData foundation.INSData, orientation objectivec.IObject) (bool, error)
// Schedules one or more Vision requests to be performed on an image.
PerformRequestsOnImageURLError(requests []VNRequest, imageURL foundation.INSURL) (bool, error)
// Schedules one or more Vision requests to be performed on an image with known orientation, at a specific URL.
PerformRequestsOnImageURLOrientationError(requests []VNRequest, imageURL foundation.INSURL, orientation objectivec.IObject) (bool, error)
}
An interface definition for the VNSequenceRequestHandler class.
Performing a Sequence Request ¶
- [IVNSequenceRequestHandler.PerformRequestsOnCGImageError]: Schedules Vision requests to be performed on a Core Graphics image.
- [IVNSequenceRequestHandler.PerformRequestsOnCGImageOrientationError]: Schedules one or more Vision requests to be performed on a Core Graphics image with known orientation.
- [IVNSequenceRequestHandler.PerformRequestsOnCIImageError]: Schedules one or more Vision requests to be performed on Core Image image data.
- [IVNSequenceRequestHandler.PerformRequestsOnCIImageOrientationError]: Schedules one or more Vision requests to be performed on Core Image image data with known orientation.
- [IVNSequenceRequestHandler.PerformRequestsOnCVPixelBufferError]: Schedules one or more Vision requests to be performed on a Core Video pixel buffer.
- [IVNSequenceRequestHandler.PerformRequestsOnCVPixelBufferOrientationError]: Schedules one or more Vision requests to be performed on a Core Video pixel buffer with known orientation.
- [IVNSequenceRequestHandler.PerformRequestsOnCMSampleBufferError]: Performs one or more requests on an image contained within a sample buffer.
- [IVNSequenceRequestHandler.PerformRequestsOnCMSampleBufferOrientationError]: Performs one or more requests on an image of a specified orientation contained within a sample buffer.
- [IVNSequenceRequestHandler.PerformRequestsOnImageDataError]: Schedules one or more Vision requests to be performed on raw image data.
- [IVNSequenceRequestHandler.PerformRequestsOnImageDataOrientationError]: Schedules one or more Vision requests to be performed on raw data containing an image with known orientation.
- [IVNSequenceRequestHandler.PerformRequestsOnImageURLError]: Schedules one or more Vision requests to be performed on an image.
- [IVNSequenceRequestHandler.PerformRequestsOnImageURLOrientationError]: Schedules one or more Vision requests to be performed on an image with known orientation, at a specific URL.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler
type IVNStatefulRequest ¶
type IVNStatefulRequest interface {
IVNImageBasedRequest
// Initializes a video-based request.
InitWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler ErrorHandler) VNStatefulRequest
// The minimum number of frames a request processes before reporting an observation.
MinimumLatencyFrameCount() int
// A time value that indicates the interval between analysis operations.
FrameAnalysisSpacing() objectivec.IObject
}
An interface definition for the VNStatefulRequest class.
Initializing a Request ¶
- [IVNStatefulRequest.InitWithFrameAnalysisSpacingCompletionHandler]: Initializes a video-based request.
Configuring the Request ¶
- [IVNStatefulRequest.MinimumLatencyFrameCount]: The minimum number of frames a request processes before reporting an observation.
- [IVNStatefulRequest.FrameAnalysisSpacing]: A time value that indicates the interval between analysis operations.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest
type IVNTargetedImageRequest ¶
type IVNTargetedImageRequest interface {
IVNImageBasedRequest
// Creates a new request targeting a Core Graphics image, executing the completion handler when done.
InitWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
InitWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Image image.
InitWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
InitWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image in a pixel buffer.
InitWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image in a pixel buffer of known orientation.
InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request with a completion handler that targets an image in a sample buffer.
InitWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image as raw data, executing the completion handler when done.
InitWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
InitWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image at the specified URL, executing the completion handler when done.
InitWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
InitWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Graphics image.
InitWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting a Core Graphics image of known orientation.
InitWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting a Core Image image.
InitWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting a Core Image image of known orientation.
InitWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request that targets an image in a sample buffer.
InitWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request that targets an image of a known orientation in a sample buffer.
InitWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image in a pixel buffer.
InitWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image in a pixel buffer of known orientation.
InitWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image as raw data.
InitWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting a raw data image of known orientation.
InitWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image at the specified URL.
InitWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image of known orientation, at the specified URL.
InitWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
}
An interface definition for the VNTargetedImageRequest class.
Creating a Request ¶
- [IVNTargetedImageRequest.InitWithTargetedCGImageOptionsCompletionHandler]: Creates a new request targeting a Core Graphics image, executing the completion handler when done.
- [IVNTargetedImageRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler]: Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
- [IVNTargetedImageRequest.InitWithTargetedCIImageOptionsCompletionHandler]: Creates a new request targeting a Core Image image.
- [IVNTargetedImageRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler]: Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
- [IVNTargetedImageRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler]: Creates a new request targeting an image in a pixel buffer.
- [IVNTargetedImageRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler]: Creates a new request targeting an image in a pixel buffer of known orientation.
- [IVNTargetedImageRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler]: Creates a new request with a completion handler that targets an image in a sample buffer.
- [IVNTargetedImageRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler]: Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
- [IVNTargetedImageRequest.InitWithTargetedImageDataOptionsCompletionHandler]: Creates a new request targeting an image as raw data, executing the completion handler when done.
- [IVNTargetedImageRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler]: Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
- [IVNTargetedImageRequest.InitWithTargetedImageURLOptionsCompletionHandler]: Creates a new request targeting an image at the specified URL, executing the completion handler when done.
- [IVNTargetedImageRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler]: Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest
type IVNTextObservation ¶
type IVNTextObservation interface {
IVNRectangleObservation
// An array of detected individual character bounding boxes.
CharacterBoxes() []VNRectangleObservation
}
An interface definition for the VNTextObservation class.
Finding Individual Characters ¶
- [IVNTextObservation.CharacterBoxes]: An array of detected individual character bounding boxes.
See: https://developer.apple.com/documentation/Vision/VNTextObservation
type IVNTrackHomographicImageRegistrationRequest ¶
type IVNTrackHomographicImageRegistrationRequest interface {
IVNStatefulRequest
}
An interface definition for the VNTrackHomographicImageRegistrationRequest class.
See: https://developer.apple.com/documentation/Vision/VNTrackHomographicImageRegistrationRequest
type IVNTrackObjectRequest ¶
type IVNTrackObjectRequest interface {
IVNTrackingRequest
// Creates a new object tracking request with a detected object observation.
InitWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
// Creates a new object tracking request with a detected object observation.
InitWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, completionHandler ErrorHandler) VNTrackObjectRequest
// A constant for specifying revision 2 of the object tracking request.
VNTrackObjectRequestRevision2() int
// A constant for specifying revision 1 of the object tracking request.
VNTrackObjectRequestRevision1() int
}
An interface definition for the VNTrackObjectRequest class.
Initializing an Object Tracking Request ¶
- [IVNTrackObjectRequest.InitWithDetectedObjectObservation]: Creates a new object tracking request with a detected object observation.
- [IVNTrackObjectRequest.InitWithDetectedObjectObservationCompletionHandler]: Creates a new object tracking request with a detected object observation.
Identifying Request Revisions ¶
- [IVNTrackObjectRequest.VNTrackObjectRequestRevision2]: A constant for specifying revision 2 of the object tracking request.
- [IVNTrackObjectRequest.VNTrackObjectRequestRevision1]: A constant for specifying revision 1 of the object tracking request.
See: https://developer.apple.com/documentation/Vision/VNTrackObjectRequest
type IVNTrackOpticalFlowRequest ¶
type IVNTrackOpticalFlowRequest interface {
IVNStatefulRequest
// The level of accuracy to compute the optical flow.
ComputationAccuracy() VNTrackOpticalFlowRequestComputationAccuracy
SetComputationAccuracy(value VNTrackOpticalFlowRequestComputationAccuracy)
// A Boolean value that indicates the raw pixel buffer continues to emit from the network.
KeepNetworkOutput() bool
SetKeepNetworkOutput(value bool)
// The pixel format type of the output value.
OutputPixelFormat() uint32
SetOutputPixelFormat(value uint32)
}
An interface definition for the VNTrackOpticalFlowRequest class.
Configuring the Request ¶
- [IVNTrackOpticalFlowRequest.ComputationAccuracy]: The level of accuracy to compute the optical flow.
- [IVNTrackOpticalFlowRequest.SetComputationAccuracy]
- [IVNTrackOpticalFlowRequest.KeepNetworkOutput]: A Boolean value that indicates the raw pixel buffer continues to emit from the network.
- [IVNTrackOpticalFlowRequest.SetKeepNetworkOutput]
- [IVNTrackOpticalFlowRequest.OutputPixelFormat]: The pixel format type of the output value.
- [IVNTrackOpticalFlowRequest.SetOutputPixelFormat]
See: https://developer.apple.com/documentation/Vision/VNTrackOpticalFlowRequest
type IVNTrackRectangleRequest ¶
type IVNTrackRectangleRequest interface {
IVNTrackingRequest
// Creates a new rectangle tracking request with a rectangle observation.
InitWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
// Creates a new rectangle tracking request with a rectangle observation.
InitWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler ErrorHandler) VNTrackRectangleRequest
// A constant for specifying revision 1 of the rectangling tracking request.
VNTrackRectangleRequestRevision1() int
}
An interface definition for the VNTrackRectangleRequest class.
Initializing a Rectangle Tracking Request ¶
- [IVNTrackRectangleRequest.InitWithRectangleObservation]: Creates a new rectangle tracking request with a rectangle observation.
- [IVNTrackRectangleRequest.InitWithRectangleObservationCompletionHandler]: Creates a new rectangle tracking request with a rectangle observation.
Identifying Request Revisions ¶
- [IVNTrackRectangleRequest.VNTrackRectangleRequestRevision1]: A constant for specifying revision 1 of the rectangling tracking request.
See: https://developer.apple.com/documentation/Vision/VNTrackRectangleRequest
type IVNTrackTranslationalImageRegistrationRequest ¶
type IVNTrackTranslationalImageRegistrationRequest interface {
IVNStatefulRequest
}
An interface definition for the VNTrackTranslationalImageRegistrationRequest class.
See: https://developer.apple.com/documentation/Vision/VNTrackTranslationalImageRegistrationRequest
type IVNTrackingRequest ¶
type IVNTrackingRequest interface {
IVNImageBasedRequest
// The observation object defining a region to track.
InputObservation() IVNDetectedObjectObservation
SetInputObservation(value IVNDetectedObjectObservation)
// A value for specifying whether to prioritize speed or location accuracy.
TrackingLevel() VNRequestTrackingLevel
SetTrackingLevel(value VNRequestTrackingLevel)
// A Boolean that indicates the last frame in a tracking sequence.
LastFrame() bool
SetLastFrame(value bool)
// Returns the maximum number of simultaneous trackers for the request.
SupportedNumberOfTrackersAndReturnError() (uint, error)
}
An interface definition for the VNTrackingRequest class.
Configuring a Tracking Request ¶
- [IVNTrackingRequest.InputObservation]: The observation object defining a region to track.
- [IVNTrackingRequest.SetInputObservation]
- [IVNTrackingRequest.TrackingLevel]: A value for specifying whether to prioritize speed or location accuracy.
- [IVNTrackingRequest.SetTrackingLevel]
- [IVNTrackingRequest.LastFrame]: A Boolean that indicates the last frame in a tracking sequence.
- [IVNTrackingRequest.SetLastFrame]
Getting the Number of Trackers ¶
- [IVNTrackingRequest.SupportedNumberOfTrackersAndReturnError]: Returns the maximum number of simultaneous trackers for the request.
See: https://developer.apple.com/documentation/Vision/VNTrackingRequest
type IVNTrajectoryObservation ¶
type IVNTrajectoryObservation interface {
IVNObservation
// The centroid points of the detected contour along the trajectory.
DetectedPoints() []VNPoint
// The centroids of the calculated trajectory from the detected points.
ProjectedPoints() []VNPoint
// The coefficients of the parabolic equation.
EquationCoefficients() objectivec.IObject
// The moving average radius of the object the request is tracking.
MovingAverageRadius() float64
// The array of detected trajectory observations.
Results() IVNTrajectoryObservation
SetResults(value IVNTrajectoryObservation)
}
An interface definition for the VNTrajectoryObservation class.
Evaluating an Observation ¶
- [IVNTrajectoryObservation.DetectedPoints]: The centroid points of the detected contour along the trajectory.
- [IVNTrajectoryObservation.ProjectedPoints]: The centroids of the calculated trajectory from the detected points.
- [IVNTrajectoryObservation.EquationCoefficients]: The coefficients of the parabolic equation.
- [IVNTrajectoryObservation.MovingAverageRadius]: The moving average radius of the object the request is tracking.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation
type IVNTranslationalImageRegistrationRequest ¶
type IVNTranslationalImageRegistrationRequest interface {
IVNImageRegistrationRequest
}
An interface definition for the VNTranslationalImageRegistrationRequest class.
See: https://developer.apple.com/documentation/Vision/VNTranslationalImageRegistrationRequest
type IVNVector ¶
type IVNVector interface {
objectivec.IObject
// Creates a new vector in polar coordinate space.
InitWithRTheta(r float64, theta float64) VNVector
// Creates a new vector in Cartesian coordinate space.
InitWithVectorHeadTail(head IVNPoint, tail IVNPoint) VNVector
// Creates a new vector in Cartesian coordinate space, based on its x-axis and y-axis projections.
InitWithXComponentYComponent(x float64, y float64) VNVector
// The length, or absolute value, of the vector.
Length() float64
// The radius, absolute value, or length of the vector.
R() float64
// The angle between the vector direction and the positive direction of the x-axis.
Theta() float64
// The squared length of the vector.
SquaredLength() float64
// A signed projection that indicates the vector’s direction on the x-axis.
X() float64
// A signed projection that indicates the vector’s direction on the y-axis.
Y() float64
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNVector class.
Creating a Vector ¶
- [IVNVector.InitWithRTheta]: Creates a new vector in polar coordinate space.
- [IVNVector.InitWithVectorHeadTail]: Creates a new vector in Cartesian coordinate space.
- [IVNVector.InitWithXComponentYComponent]: Creates a new vector in Cartesian coordinate space, based on its x-axis and y-axis projections.
Inspecting a Vector ¶
- [IVNVector.Length]: The length, or absolute value, of the vector.
- [IVNVector.R]: The radius, absolute value, or length of the vector.
- [IVNVector.Theta]: The angle between the vector direction and the positive direction of the x-axis.
- [IVNVector.SquaredLength]: The squared length of the vector.
- [IVNVector.X]: A signed projection that indicates the vector’s direction on the x-axis.
- [IVNVector.Y]: A signed projection that indicates the vector’s direction on the y-axis.
See: https://developer.apple.com/documentation/Vision/VNVector
type IVNVideoProcessor ¶
type IVNVideoProcessor interface {
objectivec.IObject
// Creates a video processor to perform Vision requests against the specified video asset.
InitWithURL(videoURL foundation.INSURL) VNVideoProcessor
// Adds a request with processing options to the video processor.
AddRequestProcessingOptionsError(request IVNRequest, processingOptions IVNVideoProcessorRequestProcessingOptions) (bool, error)
// Removes a Vision request from the video processor’s request queue.
RemoveRequestError(request IVNRequest) (bool, error)
// Analyzes a time range of video content.
AnalyzeTimeRangeError(timeRange objectivec.IObject) (bool, error)
// Cancels the video processing.
Cancel()
}
An interface definition for the VNVideoProcessor class.
Creating a Video Processor ¶
- [IVNVideoProcessor.InitWithURL]: Creates a video processor to perform Vision requests against the specified video asset.
Performing Requests ¶
- [IVNVideoProcessor.AddRequestProcessingOptionsError]: Adds a request with processing options to the video processor.
- [IVNVideoProcessor.RemoveRequestError]: Removes a Vision request from the video processor’s request queue.
- [IVNVideoProcessor.AnalyzeTimeRangeError]: Analyzes a time range of video content.
- [IVNVideoProcessor.Cancel]: Cancels the video processing.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor
type IVNVideoProcessorCadence ¶
type IVNVideoProcessorCadence interface {
objectivec.IObject
// The cadence the video processor maintains to process the request.
Cadence() IVNVideoProcessorCadence
SetCadence(value IVNVideoProcessorCadence)
}
An interface definition for the VNVideoProcessorCadence class.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/Cadence
type IVNVideoProcessorFrameRateCadence ¶
type IVNVideoProcessorFrameRateCadence interface {
IVNVideoProcessorCadence
// Creates a new frame-based cadence with a frame rate.
InitWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadence
// The frame rate at which to process video.
FrameRate() int
}
An interface definition for the VNVideoProcessorFrameRateCadence class.
Creating a Cadence ¶
- [IVNVideoProcessorFrameRateCadence.InitWithFrameRate]: Creates a new frame-based cadence with a frame rate.
Inspecting the Frame Rate ¶
- [IVNVideoProcessorFrameRateCadence.FrameRate]: The frame rate at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/FrameRateCadence
type IVNVideoProcessorRequestProcessingOptions ¶
type IVNVideoProcessorRequestProcessingOptions interface {
objectivec.IObject
// The cadence the video processor maintains to process the request.
Cadence() IVNVideoProcessorCadence
SetCadence(value IVNVideoProcessorCadence)
}
An interface definition for the VNVideoProcessorRequestProcessingOptions class.
Configuring Options ¶
- [IVNVideoProcessorRequestProcessingOptions.Cadence]: The cadence the video processor maintains to process the request.
- [IVNVideoProcessorRequestProcessingOptions.SetCadence]
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/RequestProcessingOptions
type IVNVideoProcessorTimeIntervalCadence ¶
type IVNVideoProcessorTimeIntervalCadence interface {
IVNVideoProcessorCadence
// Creates a new time-based cadence with a time interval.
InitWithTimeInterval(timeInterval float64) VNVideoProcessorTimeIntervalCadence
// The time interval of the cadence.
TimeInterval() float64
}
An interface definition for the VNVideoProcessorTimeIntervalCadence class.
Creating a Cadence ¶
- [IVNVideoProcessorTimeIntervalCadence.InitWithTimeInterval]: Creates a new time-based cadence with a time interval.
Inspecting the Time Interval ¶
- [IVNVideoProcessorTimeIntervalCadence.TimeInterval]: The time interval of the cadence.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/TimeIntervalCadence
type VNAnimalBodyPoseObservation ¶
type VNAnimalBodyPoseObservation struct {
VNRecognizedPointsObservation
}
An observation that provides the animal body points the analysis recognizes.
Accessing Points ¶
- VNAnimalBodyPoseObservation.AvailableJointNames: The names of the available joints in the observation.
- VNAnimalBodyPoseObservation.AvailableJointGroupNames: The available joint group names in the observation.
- VNAnimalBodyPoseObservation.RecognizedPointForJointNameError: Returns the point for a joint name the observation recognizes.
- VNAnimalBodyPoseObservation.RecognizedPointsForJointsGroupNameError: Returns the points for a joint group name the observation recognizes.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation
func NewVNAnimalBodyPoseObservation ¶
func NewVNAnimalBodyPoseObservation() VNAnimalBodyPoseObservation
NewVNAnimalBodyPoseObservation creates a new VNAnimalBodyPoseObservation instance.
func VNAnimalBodyPoseObservationFromID ¶
func VNAnimalBodyPoseObservationFromID(id objc.ID) VNAnimalBodyPoseObservation
VNAnimalBodyPoseObservationFromID constructs a VNAnimalBodyPoseObservation from an objc.ID.
An observation that provides the animal body points the analysis recognizes.
func (VNAnimalBodyPoseObservation) Autorelease ¶
func (a VNAnimalBodyPoseObservation) Autorelease() VNAnimalBodyPoseObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNAnimalBodyPoseObservation) AvailableJointGroupNames ¶
func (a VNAnimalBodyPoseObservation) AvailableJointGroupNames() []string
The available joint group names in the observation.
func (VNAnimalBodyPoseObservation) AvailableJointNames ¶
func (a VNAnimalBodyPoseObservation) AvailableJointNames() []string
The names of the available joints in the observation.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation/availableJointNames
func (VNAnimalBodyPoseObservation) Init ¶
func (a VNAnimalBodyPoseObservation) Init() VNAnimalBodyPoseObservation
Init initializes the instance.
func (VNAnimalBodyPoseObservation) RecognizedPointForJointNameError ¶
func (a VNAnimalBodyPoseObservation) RecognizedPointForJointNameError(jointName VNAnimalBodyPoseObservationJointName) (IVNRecognizedPoint, error)
Returns the point for a joint name the observation recognizes.
jointName: The joint name to retrieve.
Return Value ¶
The point for the joint name.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation/recognizedPoint(_:)
func (VNAnimalBodyPoseObservation) RecognizedPointsForJointsGroupNameError ¶
func (a VNAnimalBodyPoseObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNAnimalBodyPoseObservationJointsGroupName) (foundation.INSDictionary, error)
Returns the points for a joint group name the observation recognizes.
jointsGroupName: The joint group of the points to retrieve.
Return Value ¶
The dictionary of points the observation associates with the group name.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation/recognizedPoints(_:)
type VNAnimalBodyPoseObservationClass ¶
type VNAnimalBodyPoseObservationClass struct {
// contains filtered or unexported fields
}
func GetVNAnimalBodyPoseObservationClass ¶
func GetVNAnimalBodyPoseObservationClass() VNAnimalBodyPoseObservationClass
GetVNAnimalBodyPoseObservationClass returns the class object for VNAnimalBodyPoseObservation.
func (VNAnimalBodyPoseObservationClass) Alloc ¶
func (vc VNAnimalBodyPoseObservationClass) Alloc() VNAnimalBodyPoseObservation
Alloc allocates memory for a new instance of the class.
type VNAnimalBodyPoseObservationJointName ¶
type VNAnimalBodyPoseObservationJointName = string
VNAnimalBodyPoseObservationJointName is the joint names for an animal body pose.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation/JointName
type VNAnimalBodyPoseObservationJointsGroupName ¶
type VNAnimalBodyPoseObservationJointsGroupName = string
VNAnimalBodyPoseObservationJointsGroupName is the joint group names for an animal body pose.
See: https://developer.apple.com/documentation/Vision/VNAnimalBodyPoseObservation/JointsGroupName
type VNAnimalIdentifier ¶
type VNAnimalIdentifier = string
VNAnimalIdentifier is an animal identifier string.
See: https://developer.apple.com/documentation/Vision/VNAnimalIdentifier
type VNAspectRatio ¶
type VNAspectRatio = float32
VNAspectRatio is a type alias for expressing rectangle aspect ratios in Vision.
See: https://developer.apple.com/documentation/Vision/VNAspectRatio
type VNBarcodeCompositeType ¶
type VNBarcodeCompositeType int
See: https://developer.apple.com/documentation/Vision/VNBarcodeCompositeType
const ( // VNBarcodeCompositeTypeGS1TypeA: A type that represents trade items in bulk. VNBarcodeCompositeTypeGS1TypeA VNBarcodeCompositeType = 2 // VNBarcodeCompositeTypeGS1TypeB: A type that represents trade items by piece. VNBarcodeCompositeTypeGS1TypeB VNBarcodeCompositeType = 3 // VNBarcodeCompositeTypeGS1TypeC: A type that represents trade items in varying quantity. VNBarcodeCompositeTypeGS1TypeC VNBarcodeCompositeType = 4 // VNBarcodeCompositeTypeLinked: A type that represents a linked composite type. VNBarcodeCompositeTypeLinked VNBarcodeCompositeType = 1 // VNBarcodeCompositeTypeNone: A type that represents no composite type. VNBarcodeCompositeTypeNone VNBarcodeCompositeType = 0 )
func (VNBarcodeCompositeType) String ¶
func (e VNBarcodeCompositeType) String() string
type VNBarcodeObservation ¶
type VNBarcodeObservation struct {
VNRectangleObservation
}
An object that represents barcode information that an image analysis request detects.
Overview ¶
This type of observation results from a VNDetectBarcodesRequest. It contains information about the detected barcode, including parsed payload data for supported symbologies.
Parsing the Payload ¶
- VNBarcodeObservation.PayloadStringValue: A string value that represents the barcode payload.
- VNBarcodeObservation.PayloadData: The raw data representation of the barcode’s payload.
- VNBarcodeObservation.SupplementalPayloadString: The supplemental code decoded as a string value.
- VNBarcodeObservation.SupplementalPayloadData
- VNBarcodeObservation.SupplementalCompositeType: The supplemental composite type.
- VNBarcodeObservation.IsGS1DataCarrier: A Boolean value that indicates whether the barcode carries any global standards data.
Reading Barcode Descriptors ¶
- VNBarcodeObservation.BarcodeDescriptor: An object that describes the low-level details about the barcode and its data.
Identifying Barcode Types ¶
- VNBarcodeObservation.Symbology: The symbology of the observed barcode.
Identifying Barcode Colors ¶
- VNBarcodeObservation.IsColorInverted: A Boolean value that indicates whether the barcode is color inverted.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNBarcodeObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
bottomLeft: The lower-left corner point.
bottomRight: The lower-right corner point.
topRight: The upper-right corner point.
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNBarcodeObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
topRight: The upper-right corner point.
bottomRight: The lower-right corner point.
bottomLeft: The lower-left corner point.
func NewBarcodeObservationWithBoundingBox ¶
func NewBarcodeObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNBarcodeObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewBarcodeObservationWithRequestRevisionBoundingBox ¶
func NewBarcodeObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNBarcodeObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewVNBarcodeObservation ¶
func NewVNBarcodeObservation() VNBarcodeObservation
NewVNBarcodeObservation creates a new VNBarcodeObservation instance.
func VNBarcodeObservationFromID ¶
func VNBarcodeObservationFromID(id objc.ID) VNBarcodeObservation
VNBarcodeObservationFromID constructs a VNBarcodeObservation from an objc.ID.
An object that represents barcode information that an image analysis request detects.
func (VNBarcodeObservation) Autorelease ¶
func (b VNBarcodeObservation) Autorelease() VNBarcodeObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNBarcodeObservation) BarcodeDescriptor ¶
func (b VNBarcodeObservation) BarcodeDescriptor() coreimage.CIBarcodeDescriptor
An object that describes the low-level details about the barcode and its data.
Discussion ¶
Use this object to have Core Image regenerate the observed barcode.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/barcodeDescriptor
func (VNBarcodeObservation) Init ¶
func (b VNBarcodeObservation) Init() VNBarcodeObservation
Init initializes the instance.
func (VNBarcodeObservation) IsColorInverted ¶
func (b VNBarcodeObservation) IsColorInverted() bool
A Boolean value that indicates whether the barcode is color inverted.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/isColorInverted
func (VNBarcodeObservation) IsGS1DataCarrier ¶
func (b VNBarcodeObservation) IsGS1DataCarrier() bool
A Boolean value that indicates whether the barcode carries any global standards data.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/isGS1DataCarrier
func (VNBarcodeObservation) PayloadData ¶
func (b VNBarcodeObservation) PayloadData() foundation.INSData
The raw data representation of the barcode’s payload.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/payloadData
func (VNBarcodeObservation) PayloadStringValue ¶
func (b VNBarcodeObservation) PayloadStringValue() string
A string value that represents the barcode payload.
Discussion ¶
Depending on the symbology or the payload data itself, a string representation of the payload may not be available.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/payloadStringValue
func (VNBarcodeObservation) SupplementalCompositeType ¶
func (b VNBarcodeObservation) SupplementalCompositeType() VNBarcodeCompositeType
The supplemental composite type.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/supplementalCompositeType
func (VNBarcodeObservation) SupplementalPayloadData ¶
func (b VNBarcodeObservation) SupplementalPayloadData() foundation.INSData
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/supplementalPayloadData
func (VNBarcodeObservation) SupplementalPayloadString ¶
func (b VNBarcodeObservation) SupplementalPayloadString() string
The supplemental code decoded as a string value.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/supplementalPayloadString
func (VNBarcodeObservation) Symbology ¶
func (b VNBarcodeObservation) Symbology() VNBarcodeSymbology
The symbology of the observed barcode.
See: https://developer.apple.com/documentation/Vision/VNBarcodeObservation/symbology
type VNBarcodeObservationClass ¶
type VNBarcodeObservationClass struct {
// contains filtered or unexported fields
}
func GetVNBarcodeObservationClass ¶
func GetVNBarcodeObservationClass() VNBarcodeObservationClass
GetVNBarcodeObservationClass returns the class object for VNBarcodeObservation.
func (VNBarcodeObservationClass) Alloc ¶
func (vc VNBarcodeObservationClass) Alloc() VNBarcodeObservation
Alloc allocates memory for a new instance of the class.
type VNBarcodeSymbology ¶
type VNBarcodeSymbology = string
VNBarcodeSymbology is the barcode symbologies that the framework detects.
See: https://developer.apple.com/documentation/Vision/VNBarcodeSymbology
type VNCalculateImageAestheticsScoresRequest ¶
type VNCalculateImageAestheticsScoresRequest struct {
VNImageBasedRequest
}
An object that analyzes an image for aesthetically pleasing attributes.
See: https://developer.apple.com/documentation/Vision/VNCalculateImageAestheticsScoresRequest
func NewCalculateImageAestheticsScoresRequestWithCompletionHandler ¶
func NewCalculateImageAestheticsScoresRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNCalculateImageAestheticsScoresRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNCalculateImageAestheticsScoresRequest ¶
func NewVNCalculateImageAestheticsScoresRequest() VNCalculateImageAestheticsScoresRequest
NewVNCalculateImageAestheticsScoresRequest creates a new VNCalculateImageAestheticsScoresRequest instance.
func VNCalculateImageAestheticsScoresRequestFromID ¶
func VNCalculateImageAestheticsScoresRequestFromID(id objc.ID) VNCalculateImageAestheticsScoresRequest
VNCalculateImageAestheticsScoresRequestFromID constructs a VNCalculateImageAestheticsScoresRequest from an objc.ID.
An object that analyzes an image for aesthetically pleasing attributes.
func (VNCalculateImageAestheticsScoresRequest) Autorelease ¶
func (c VNCalculateImageAestheticsScoresRequest) Autorelease() VNCalculateImageAestheticsScoresRequest
Autorelease adds the receiver to the current autorelease pool.
type VNCalculateImageAestheticsScoresRequestClass ¶
type VNCalculateImageAestheticsScoresRequestClass struct {
// contains filtered or unexported fields
}
func GetVNCalculateImageAestheticsScoresRequestClass ¶
func GetVNCalculateImageAestheticsScoresRequestClass() VNCalculateImageAestheticsScoresRequestClass
GetVNCalculateImageAestheticsScoresRequestClass returns the class object for VNCalculateImageAestheticsScoresRequest.
func (VNCalculateImageAestheticsScoresRequestClass) Alloc ¶
func (vc VNCalculateImageAestheticsScoresRequestClass) Alloc() VNCalculateImageAestheticsScoresRequest
Alloc allocates memory for a new instance of the class.
type VNChirality ¶
type VNChirality int
See: https://developer.apple.com/documentation/Vision/VNChirality
const ( // VNChiralityLeft: Indicates a left-handed pose. VNChiralityLeft VNChirality = -1 // VNChiralityRight: Indicates a right-handed pose. VNChiralityRight VNChirality = 1 // VNChiralityUnknown: Indicates that the pose chirality is unknown. VNChiralityUnknown VNChirality = 0 )
func (VNChirality) String ¶
func (e VNChirality) String() string
type VNCircle ¶
type VNCircle struct {
objectivec.Object
}
An immutable 2D circle represented by its center point and radius.
Creating a Circle ¶
- VNCircle.InitWithCenterRadius: Creates a circle with the specified center and radius.
- VNCircle.InitWithCenterDiameter: Creates a circle with the specified center and diameter.
Inspecting a Circle ¶
- VNCircle.Center: The circle’s center point.
- VNCircle.Diameter: The circle’s diameter.
- VNCircle.Radius: The circle’s radius.
- VNCircle.ContainsPoint: Determines if this circle, including its boundary, contains the specified point.
- VNCircle.ContainsPointInCircumferentialRingOfWidth: Determines if a ring around this circle’s circumference contains the specified point.
See: https://developer.apple.com/documentation/Vision/VNCircle
func NewCircleWithCenterDiameter ¶
Creates a circle with the specified center and diameter.
center: The circle center.
diameter: The circle diameter.
See: https://developer.apple.com/documentation/Vision/VNCircle/init(center:diameter:)
func NewCircleWithCenterRadius ¶
Creates a circle with the specified center and radius.
center: The circle center.
radius: The circle radius.
See: https://developer.apple.com/documentation/Vision/VNCircle/init(center:radius:)
func VNCircleFromID ¶
VNCircleFromID constructs a VNCircle from an objc.ID.
An immutable 2D circle represented by its center point and radius.
func (VNCircle) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (VNCircle) Center ¶
The circle’s center point.
See: https://developer.apple.com/documentation/Vision/VNCircle/center
func (VNCircle) ContainsPoint ¶
Determines if this circle, including its boundary, contains the specified point.
point: The point to test.
Return Value ¶
true if the point is contained within this circle, otherwise false.
See: https://developer.apple.com/documentation/Vision/VNCircle/contains(_:)
func (VNCircle) ContainsPointInCircumferentialRingOfWidth ¶
Determines if a ring around this circle’s circumference contains the specified point.
point: The point to test.
ringWidth: The width of the ring around this circle’s circumference.
Return Value ¶
true if the ring contains the specified point, otherwise false.
See: https://developer.apple.com/documentation/Vision/VNCircle/contains(_:inCircumferentialRingOfWidth:)
func (VNCircle) Diameter ¶
The circle’s diameter.
See: https://developer.apple.com/documentation/Vision/VNCircle/diameter
func (VNCircle) EncodeWithCoder ¶
func (c VNCircle) EncodeWithCoder(coder foundation.INSCoder)
func (VNCircle) InitWithCenterDiameter ¶
Creates a circle with the specified center and diameter.
center: The circle center.
diameter: The circle diameter.
See: https://developer.apple.com/documentation/Vision/VNCircle/init(center:diameter:)
func (VNCircle) InitWithCenterRadius ¶
Creates a circle with the specified center and radius.
center: The circle center.
radius: The circle radius.
See: https://developer.apple.com/documentation/Vision/VNCircle/init(center:radius:)
func (VNCircle) Radius ¶
The circle’s radius.
See: https://developer.apple.com/documentation/Vision/VNCircle/radius
type VNCircleClass ¶
type VNCircleClass struct {
// contains filtered or unexported fields
}
func GetVNCircleClass ¶
func GetVNCircleClass() VNCircleClass
GetVNCircleClass returns the class object for VNCircle.
func (VNCircleClass) Alloc ¶
func (vc VNCircleClass) Alloc() VNCircle
Alloc allocates memory for a new instance of the class.
func (VNCircleClass) ZeroCircle ¶
func (_VNCircleClass VNCircleClass) ZeroCircle() VNCircle
A circle object centered at the origin, with a radius of zero.
See: https://developer.apple.com/documentation/Vision/VNCircle/zero
type VNClassificationObservation ¶
type VNClassificationObservation struct {
VNObservation
}
An object that represents classification information that an image-analysis request produces.
Overview ¶
This type of observation results from performing a VNCoreMLRequest image analysis with a Core ML model whose role is classification (rather than prediction or image-to-image processing). Vision infers that an MLModel object is a classifier model if that model predicts a single feature. That is, the model’s VNClassificationObservation.ModelDescription object has a non-`nil` value for its VNClassificationObservation.PredictedFeatureName property.
Determining Classification ¶
- VNClassificationObservation.Identifier: Classification label identifying the type of observation.
Measuring Confidence and Precision ¶
- VNClassificationObservation.HasPrecisionRecallCurve: A Boolean variable indicating whether the observation contains precision and recall curves.
- VNClassificationObservation.HasMinimumPrecisionForRecall: Determines whether the observation for a specific recall has a minimum precision value.
- VNClassificationObservation.HasMinimumRecallForPrecision: Determines whether the observation for a specific precision has a minimum recall value.
See: https://developer.apple.com/documentation/Vision/VNClassificationObservation
func NewVNClassificationObservation ¶
func NewVNClassificationObservation() VNClassificationObservation
NewVNClassificationObservation creates a new VNClassificationObservation instance.
func VNClassificationObservationFromID ¶
func VNClassificationObservationFromID(id objc.ID) VNClassificationObservation
VNClassificationObservationFromID constructs a VNClassificationObservation from an objc.ID.
An object that represents classification information that an image-analysis request produces.
func (VNClassificationObservation) Autorelease ¶
func (c VNClassificationObservation) Autorelease() VNClassificationObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNClassificationObservation) HasMinimumPrecisionForRecall ¶
func (c VNClassificationObservation) HasMinimumPrecisionForRecall(minimumPrecision float32, recall float32) bool
Determines whether the observation for a specific recall has a minimum precision value.
minimumPrecision: The minimum percentage of classification results that are relevant.
recall: The percentage of relevant results that the algorithm correctly classified.
Return Value ¶
A Boolean indicating whether or not this classification observation provides a minimum percentage of relevant results that meet the desired recall criterion.
func (VNClassificationObservation) HasMinimumRecallForPrecision ¶
func (c VNClassificationObservation) HasMinimumRecallForPrecision(minimumRecall float32, precision float32) bool
Determines whether the observation for a specific precision has a minimum recall value.
minimumRecall: The minimum percentage of relevant results that the algorithm correctly classified.
precision: The percentage of classification results that are relevant.
Return Value ¶
A Boolean indicating whether or not this classification observation provides a minimum percentage of relevant results that meet the desired precision criterion.
func (VNClassificationObservation) HasPrecisionRecallCurve ¶
func (c VNClassificationObservation) HasPrecisionRecallCurve() bool
A Boolean variable indicating whether the observation contains precision and recall curves.
Discussion ¶
Precision refers to the percentage of your classification results that are relevant, while recall refers to the percentage of total relevant results correctly classified.
If this property is true, then you can call precision and recall-related methods in this observation. If this property is false, then the precision and recall-related methods won’t return meaningful data.
See: https://developer.apple.com/documentation/Vision/VNClassificationObservation/hasPrecisionRecallCurve
func (VNClassificationObservation) Identifier ¶
func (c VNClassificationObservation) Identifier() string
Classification label identifying the type of observation.
Discussion ¶
An example classification could be a string like `cat` or `hotdog`. The model used for the classification defines the domain of strings that may result. Usually, these strings are unlocalized technical labels not meant for direct presentation to the end user.
See: https://developer.apple.com/documentation/Vision/VNClassificationObservation/identifier
func (VNClassificationObservation) Init ¶
func (c VNClassificationObservation) Init() VNClassificationObservation
Init initializes the instance.
func (VNClassificationObservation) ModelDescription ¶
func (c VNClassificationObservation) ModelDescription() coreml.MLModelDescription
Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
See: https://developer.apple.com/documentation/CoreML/MLModel/modelDescription
func (VNClassificationObservation) PredictedFeatureName ¶
func (c VNClassificationObservation) PredictedFeatureName() string
The name of the primary prediction feature output description.
See: https://developer.apple.com/documentation/CoreML/MLModelDescription/predictedFeatureName
func (VNClassificationObservation) SetModelDescription ¶
func (c VNClassificationObservation) SetModelDescription(value coreml.MLModelDescription)
func (VNClassificationObservation) SetPredictedFeatureName ¶
func (c VNClassificationObservation) SetPredictedFeatureName(value string)
type VNClassificationObservationClass ¶
type VNClassificationObservationClass struct {
// contains filtered or unexported fields
}
func GetVNClassificationObservationClass ¶
func GetVNClassificationObservationClass() VNClassificationObservationClass
GetVNClassificationObservationClass returns the class object for VNClassificationObservation.
func (VNClassificationObservationClass) Alloc ¶
func (vc VNClassificationObservationClass) Alloc() VNClassificationObservation
Alloc allocates memory for a new instance of the class.
type VNClassifyImageRequest ¶
type VNClassifyImageRequest struct {
VNImageBasedRequest
}
A request to classify an image.
Overview ¶
This type of request produces a collection of VNClassificationObservation objects that describe an image. Access the classifications through knownClassifications(forRevision:).
Accessing Results ¶
- VNClassifyImageRequest.SupportedIdentifiersAndReturnError: Returns the classification identifiers that the request supports in its current configuration.
Specifying Algorithm Revision ¶
- VNClassifyImageRequest.VNClassifyImageRequestRevision1: A constant for specifying the first revision of the image-classification request.
See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequest
func NewClassifyImageRequestWithCompletionHandler ¶
func NewClassifyImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNClassifyImageRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNClassifyImageRequest ¶
func NewVNClassifyImageRequest() VNClassifyImageRequest
NewVNClassifyImageRequest creates a new VNClassifyImageRequest instance.
func VNClassifyImageRequestFromID ¶
func VNClassifyImageRequestFromID(id objc.ID) VNClassifyImageRequest
VNClassifyImageRequestFromID constructs a VNClassifyImageRequest from an objc.ID.
A request to classify an image.
func (VNClassifyImageRequest) Autorelease ¶
func (c VNClassifyImageRequest) Autorelease() VNClassifyImageRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNClassifyImageRequest) Init ¶
func (c VNClassifyImageRequest) Init() VNClassifyImageRequest
Init initializes the instance.
func (VNClassifyImageRequest) SupportedIdentifiersAndReturnError ¶
func (c VNClassifyImageRequest) SupportedIdentifiersAndReturnError() ([]string, error)
Returns the classification identifiers that the request supports in its current configuration.
Return Value ¶
An array of supported identifiers.
See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequest/supportedIdentifiers()
func (VNClassifyImageRequest) VNClassifyImageRequestRevision1 ¶
func (c VNClassifyImageRequest) VNClassifyImageRequestRevision1() int
A constant for specifying the first revision of the image-classification request.
See: https://developer.apple.com/documentation/vision/vnclassifyimagerequestrevision1
type VNClassifyImageRequestClass ¶
type VNClassifyImageRequestClass struct {
// contains filtered or unexported fields
}
func GetVNClassifyImageRequestClass ¶
func GetVNClassifyImageRequestClass() VNClassifyImageRequestClass
GetVNClassifyImageRequestClass returns the class object for VNClassifyImageRequest.
func (VNClassifyImageRequestClass) Alloc ¶
func (vc VNClassifyImageRequestClass) Alloc() VNClassifyImageRequest
Alloc allocates memory for a new instance of the class.
type VNComputeStage ¶
type VNComputeStage = string
VNComputeStage is types that represent the compute stage.
See: https://developer.apple.com/documentation/Vision/VNComputeStage
type VNConfidence ¶
type VNConfidence = float32
VNConfidence is a type alias for the confidence value of an observation.
See: https://developer.apple.com/documentation/Vision/VNConfidence
type VNContour ¶
type VNContour struct {
objectivec.Object
}
A class that represents a detected contour in an image.
Inspecting the Contour ¶
- VNContour.AspectRatio: The aspect ratio of the contour.
- VNContour.IndexPath: The contour object’s index path.
- VNContour.NormalizedPath: The contour object as a path in normalized coordinates.
- VNContour.PointCount: The contour’s number of points.
- VNContour.PolygonApproximationWithEpsilonError: Simplifies the contour to a polygon using a Ramer-Douglas-Peucker algorithm.
Accessing Child Contours ¶
- VNContour.ChildContourCount: The total number of detected child contours.
- VNContour.ChildContours: An array of contours that this contour encloses.
- VNContour.ChildContourAtIndexError: Retrieves the child contour object at the specified index.
See: https://developer.apple.com/documentation/Vision/VNContour
func VNContourFromID ¶
VNContourFromID constructs a VNContour from an objc.ID.
A class that represents a detected contour in an image.
func (VNContour) AspectRatio ¶
The aspect ratio of the contour.
Discussion ¶
The aspect ratio is the original image’s width divided by its height.
See: https://developer.apple.com/documentation/Vision/VNContour/aspectRatio
func (VNContour) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (VNContour) ChildContourAtIndexError ¶
func (c VNContour) ChildContourAtIndexError(childContourIndex uint) (IVNContour, error)
Retrieves the child contour object at the specified index.
childContourIndex: The child contour index value.
Return Value ¶
The child contour object.
See: https://developer.apple.com/documentation/Vision/VNContour/childContour(at:)
func (VNContour) ChildContourCount ¶
The total number of detected child contours.
See: https://developer.apple.com/documentation/Vision/VNContour/childContourCount
func (VNContour) ChildContours ¶
An array of contours that this contour encloses.
See: https://developer.apple.com/documentation/Vision/VNContour/childContours
func (VNContour) ContourCount ¶
The total number of detected contours.
See: https://developer.apple.com/documentation/vision/vncontoursobservation/contourcount
func (VNContour) IndexPath ¶
The contour object’s index path.
See: https://developer.apple.com/documentation/Vision/VNContour/indexPath
func (VNContour) NormalizedPath ¶
func (c VNContour) NormalizedPath() coregraphics.CGPathRef
The contour object as a path in normalized coordinates.
See: https://developer.apple.com/documentation/Vision/VNContour/normalizedPath
func (VNContour) NormalizedPoints ¶
func (c VNContour) NormalizedPoints() objectivec.IObject
The contour’s array of points in normalized coordinates.
Discussion ¶
This property value provides the address of the buffer that contains the array of CGPoint values.
See: https://developer.apple.com/documentation/Vision/VNContour/normalizedPoints-2orqj
func (VNContour) PointCount ¶
The contour’s number of points.
See: https://developer.apple.com/documentation/Vision/VNContour/pointCount
func (VNContour) PolygonApproximationWithEpsilonError ¶
func (c VNContour) PolygonApproximationWithEpsilonError(epsilon float32) (IVNContour, error)
Simplifies the contour to a polygon using a Ramer-Douglas-Peucker algorithm.
epsilon: This parameter defines the distance threshold the algorithm uses. It preserves points whose perpendicular distance to the line segment they are on is greater than `epsilon`, and removes all others.
Return Value ¶
A simplified polygon contour from the points of the original contour.
See: https://developer.apple.com/documentation/Vision/VNContour/polygonApproximation(epsilon:)
func (VNContour) RequestRevision ¶
The revision of the VNRequest subclass used to generate the implementing object.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
func (VNContour) SetContourCount ¶
func (VNContour) SetTopLevelContourCount ¶
func (VNContour) SetTopLevelContours ¶
func (c VNContour) SetTopLevelContours(value IVNContour)
func (VNContour) TopLevelContourCount ¶
The total number of detected top-level contours.
See: https://developer.apple.com/documentation/vision/vncontoursobservation/toplevelcontourcount
func (VNContour) TopLevelContours ¶
func (c VNContour) TopLevelContours() IVNContour
An array of contours that don’t have another contour enclosing them.
See: https://developer.apple.com/documentation/vision/vncontoursobservation/toplevelcontours
type VNContourClass ¶
type VNContourClass struct {
// contains filtered or unexported fields
}
func GetVNContourClass ¶
func GetVNContourClass() VNContourClass
GetVNContourClass returns the class object for VNContour.
func (VNContourClass) Alloc ¶
func (vc VNContourClass) Alloc() VNContour
Alloc allocates memory for a new instance of the class.
type VNContoursObservation ¶
type VNContoursObservation struct {
VNObservation
}
An object that represents the detected contours in an image.
Inspecting the Observation ¶
- VNContoursObservation.ContourCount: The total number of detected contours.
- VNContoursObservation.NormalizedPath: The detected contours as a path object in normalized coordinates.
- VNContoursObservation.TopLevelContours: An array of contours that don’t have another contour enclosing them.
- VNContoursObservation.TopLevelContourCount: The total number of detected top-level contours.
- VNContoursObservation.ContourAtIndexError: Retrieves the contour object at the specified index, irrespective of hierarchy.
- VNContoursObservation.ContourAtIndexPathError: Retrieves the contour object at the specified index path.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation
func NewVNContoursObservation ¶
func NewVNContoursObservation() VNContoursObservation
NewVNContoursObservation creates a new VNContoursObservation instance.
func VNContoursObservationFromID ¶
func VNContoursObservationFromID(id objc.ID) VNContoursObservation
VNContoursObservationFromID constructs a VNContoursObservation from an objc.ID.
An object that represents the detected contours in an image.
func (VNContoursObservation) Autorelease ¶
func (c VNContoursObservation) Autorelease() VNContoursObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNContoursObservation) ContourAtIndexError ¶
func (c VNContoursObservation) ContourAtIndexError(contourIndex int) (IVNContour, error)
Retrieves the contour object at the specified index, irrespective of hierarchy.
contourIndex: The index of the contour to retrieve. Valid values are in the range of 0 to [ContourCount] - 1.
Return Value ¶
The contour object at the specified index.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation/contour(at:)-9on0y
func (VNContoursObservation) ContourAtIndexPathError ¶
func (c VNContoursObservation) ContourAtIndexPathError(indexPath objectivec.IObject) (IVNContour, error)
Retrieves the contour object at the specified index path.
indexPath: The hierarchical index path to the contour.
Return Value ¶
The contour object at the specified index path.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation/contour(at:)-52odo
func (VNContoursObservation) ContourCount ¶
func (c VNContoursObservation) ContourCount() int
The total number of detected contours.
Discussion ¶
Use this value to determine the number of indices available for calling [ContourAtIndexError].
See: https://developer.apple.com/documentation/Vision/VNContoursObservation/contourCount
func (VNContoursObservation) Init ¶
func (c VNContoursObservation) Init() VNContoursObservation
Init initializes the instance.
func (VNContoursObservation) NormalizedPath ¶
func (c VNContoursObservation) NormalizedPath() coregraphics.CGPathRef
The detected contours as a path object in normalized coordinates.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation/normalizedPath
func (VNContoursObservation) Results ¶
func (c VNContoursObservation) Results() IVNContoursObservation
The results of the request to detect contours.
See: https://developer.apple.com/documentation/vision/vndetectcontoursrequest/results
func (VNContoursObservation) SetResults ¶
func (c VNContoursObservation) SetResults(value IVNContoursObservation)
func (VNContoursObservation) TopLevelContourCount ¶
func (c VNContoursObservation) TopLevelContourCount() int
The total number of detected top-level contours.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation/topLevelContourCount
func (VNContoursObservation) TopLevelContours ¶
func (c VNContoursObservation) TopLevelContours() []VNContour
An array of contours that don’t have another contour enclosing them.
Discussion ¶
This array constitutes the top of the contour hierarchy. You can iterate over each VNContour instance to determine its children.
See: https://developer.apple.com/documentation/Vision/VNContoursObservation/topLevelContours
type VNContoursObservationClass ¶
type VNContoursObservationClass struct {
// contains filtered or unexported fields
}
func GetVNContoursObservationClass ¶
func GetVNContoursObservationClass() VNContoursObservationClass
GetVNContoursObservationClass returns the class object for VNContoursObservation.
func (VNContoursObservationClass) Alloc ¶
func (vc VNContoursObservationClass) Alloc() VNContoursObservation
Alloc allocates memory for a new instance of the class.
type VNCoreMLFeatureValueObservation ¶
type VNCoreMLFeatureValueObservation struct {
VNObservation
}
An object that represents a collection of key-value information that a Core ML image-analysis request produces.
Overview ¶
This type of observation results from performing a VNCoreMLRequest image analysis with a Core ML model whose role is prediction rather than classification or image-to-image processing.
Vision infers that an MLModel object is a predictor model if that model predicts multiple features. You can tell that a model predicts multiple features when its VNCoreMLFeatureValueObservation.ModelDescription object has a `nil` value for its VNCoreMLFeatureValueObservation.PredictedFeatureName property, or when it inserts its output in an VNCoreMLFeatureValueObservation.OutputDescriptionsByName dictionary.
Obtaining Feature Values ¶
- VNCoreMLFeatureValueObservation.FeatureValue: The feature result of a VNCoreMLRequest(<doc://Vision/documentation/Vision/VNCoreMLRequest>) that outputs neither a classification nor an image.
- VNCoreMLFeatureValueObservation.FeatureName: The name used in the model description of the CoreML model that produced this observation.
See: https://developer.apple.com/documentation/Vision/VNCoreMLFeatureValueObservation
func NewVNCoreMLFeatureValueObservation ¶
func NewVNCoreMLFeatureValueObservation() VNCoreMLFeatureValueObservation
NewVNCoreMLFeatureValueObservation creates a new VNCoreMLFeatureValueObservation instance.
func VNCoreMLFeatureValueObservationFromID ¶
func VNCoreMLFeatureValueObservationFromID(id objc.ID) VNCoreMLFeatureValueObservation
VNCoreMLFeatureValueObservationFromID constructs a VNCoreMLFeatureValueObservation from an objc.ID.
An object that represents a collection of key-value information that a Core ML image-analysis request produces.
func (VNCoreMLFeatureValueObservation) Autorelease ¶
func (c VNCoreMLFeatureValueObservation) Autorelease() VNCoreMLFeatureValueObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNCoreMLFeatureValueObservation) FeatureName ¶
func (c VNCoreMLFeatureValueObservation) FeatureName() string
The name used in the model description of the CoreML model that produced this observation.
See: https://developer.apple.com/documentation/Vision/VNCoreMLFeatureValueObservation/featureName
func (VNCoreMLFeatureValueObservation) FeatureValue ¶
func (c VNCoreMLFeatureValueObservation) FeatureValue() coreml.MLFeatureValue
The feature result of a VNCoreMLRequest that outputs neither a classification nor an image.
Discussion ¶
Refer to Core ML documentation and the model itself to learn about proper handling of the content.
See: https://developer.apple.com/documentation/Vision/VNCoreMLFeatureValueObservation/featureValue
func (VNCoreMLFeatureValueObservation) Init ¶
func (c VNCoreMLFeatureValueObservation) Init() VNCoreMLFeatureValueObservation
Init initializes the instance.
func (VNCoreMLFeatureValueObservation) ModelDescription ¶
func (c VNCoreMLFeatureValueObservation) ModelDescription() coreml.MLModelDescription
Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
See: https://developer.apple.com/documentation/CoreML/MLModel/modelDescription
func (VNCoreMLFeatureValueObservation) OutputDescriptionsByName ¶
func (c VNCoreMLFeatureValueObservation) OutputDescriptionsByName() coreml.MLFeatureDescription
A dictionary of output feature descriptions, which the model keys by the output’s name.
See: https://developer.apple.com/documentation/CoreML/MLModelDescription/outputDescriptionsByName
func (VNCoreMLFeatureValueObservation) PredictedFeatureName ¶
func (c VNCoreMLFeatureValueObservation) PredictedFeatureName() string
The name of the primary prediction feature output description.
See: https://developer.apple.com/documentation/CoreML/MLModelDescription/predictedFeatureName
func (VNCoreMLFeatureValueObservation) SetModelDescription ¶
func (c VNCoreMLFeatureValueObservation) SetModelDescription(value coreml.MLModelDescription)
func (VNCoreMLFeatureValueObservation) SetOutputDescriptionsByName ¶
func (c VNCoreMLFeatureValueObservation) SetOutputDescriptionsByName(value coreml.MLFeatureDescription)
func (VNCoreMLFeatureValueObservation) SetPredictedFeatureName ¶
func (c VNCoreMLFeatureValueObservation) SetPredictedFeatureName(value string)
type VNCoreMLFeatureValueObservationClass ¶
type VNCoreMLFeatureValueObservationClass struct {
// contains filtered or unexported fields
}
func GetVNCoreMLFeatureValueObservationClass ¶
func GetVNCoreMLFeatureValueObservationClass() VNCoreMLFeatureValueObservationClass
GetVNCoreMLFeatureValueObservationClass returns the class object for VNCoreMLFeatureValueObservation.
func (VNCoreMLFeatureValueObservationClass) Alloc ¶
func (vc VNCoreMLFeatureValueObservationClass) Alloc() VNCoreMLFeatureValueObservation
Alloc allocates memory for a new instance of the class.
type VNCoreMLModel ¶
type VNCoreMLModel struct {
objectivec.Object
}
A container for the model to use with Vision requests.
Overview ¶
A Core ML model encapsulates the information trained from a data set used to drive Vision recognition requests. See Getting a Core ML Model for instructions on training your own model. Once you train the model, use this class to initialize a VNCoreMLRequest for identification.
Providing Features ¶
- VNCoreMLModel.FeatureProvider: An optional object to support inputs outside Vision.
- VNCoreMLModel.SetFeatureProvider
- VNCoreMLModel.InputImageFeatureName: The name of the feature value that Vision sets from the request handler.
- VNCoreMLModel.SetInputImageFeatureName
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel
func NewCoreMLModelForMLModelError ¶
func NewCoreMLModelForMLModelError(model coreml.MLModel) (VNCoreMLModel, error)
Creates a model container to use with a Core ML request.
model: The model to create the model container from.
Discussion ¶
This method may fail if the framework doesn’t support the Core ML model. For example, a model that doesn’t accept an image as any of its inputs will yield an [ErrorInvalidModel] error.
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel/init(for:)
func NewVNCoreMLModel ¶
func NewVNCoreMLModel() VNCoreMLModel
NewVNCoreMLModel creates a new VNCoreMLModel instance.
func VNCoreMLModelFromID ¶
func VNCoreMLModelFromID(id objc.ID) VNCoreMLModel
VNCoreMLModelFromID constructs a VNCoreMLModel from an objc.ID.
A container for the model to use with Vision requests.
func (VNCoreMLModel) Autorelease ¶
func (c VNCoreMLModel) Autorelease() VNCoreMLModel
Autorelease adds the receiver to the current autorelease pool.
func (VNCoreMLModel) FeatureProvider ¶
func (c VNCoreMLModel) FeatureProvider() coreml.MLFeatureProvider
An optional object to support inputs outside Vision.
Discussion ¶
This optional object conforms to the MLFeatureProvider protocol that the model uses to predict inputs that are not supplied by Vision. Vision provides the MLModel with the image for the [InputImageFeatureName] via the [VNRequestHandler].
A feature provider is necessary for models that have more than one required input. Models with only one image input won’t use the feature provider.
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel/featureProvider
func (VNCoreMLModel) Init ¶
func (c VNCoreMLModel) Init() VNCoreMLModel
Init initializes the instance.
func (VNCoreMLModel) InputImageFeatureName ¶
func (c VNCoreMLModel) InputImageFeatureName() string
The name of the feature value that Vision sets from the request handler.
Discussion ¶
By default, Vision uses the first input found, but you can manually set that input to another [FeatureName] instead.
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel/inputImageFeatureName
func (VNCoreMLModel) Model ¶
func (c VNCoreMLModel) Model() IVNCoreMLModel
The model to base the image analysis request on.
See: https://developer.apple.com/documentation/vision/vncoremlrequest/model
func (VNCoreMLModel) SetFeatureProvider ¶
func (c VNCoreMLModel) SetFeatureProvider(value coreml.MLFeatureProvider)
func (VNCoreMLModel) SetInputImageFeatureName ¶
func (c VNCoreMLModel) SetInputImageFeatureName(value string)
func (VNCoreMLModel) SetModel ¶
func (c VNCoreMLModel) SetModel(value IVNCoreMLModel)
type VNCoreMLModelClass ¶
type VNCoreMLModelClass struct {
// contains filtered or unexported fields
}
func GetVNCoreMLModelClass ¶
func GetVNCoreMLModelClass() VNCoreMLModelClass
GetVNCoreMLModelClass returns the class object for VNCoreMLModel.
func (VNCoreMLModelClass) Alloc ¶
func (vc VNCoreMLModelClass) Alloc() VNCoreMLModel
Alloc allocates memory for a new instance of the class.
type VNCoreMLRequest ¶
type VNCoreMLRequest struct {
VNImageBasedRequest
}
An image-analysis request that uses a Core ML model to process images.
Overview ¶
The results array of a Core ML-based image analysis request contains a different observation type, depending on the kind of MLModel object you use:
- If the model predicts a single feature, the model’s VNCoreMLRequest.ModelDescription object has a non-`nil` value for VNCoreMLRequest.PredictedFeatureName and Vision treats the model as a classifier. The results are VNClassificationObservation objects. - If the model’s outputs include at least one output with a feature type of MLFeatureType.image, Vision treats that model as an image-to-image model. The results are VNPixelBufferObservation objects. - Otherwise, Vision treats the model as a general predictor model. The results are VNCoreMLFeatureValueObservation objects.
Initializing with a Core ML Model ¶
- VNCoreMLRequest.InitWithModel: Creates a model container to use with an image analysis request based on the model you provide.
- VNCoreMLRequest.InitWithModelCompletionHandler: Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.
- VNCoreMLRequest.Model: The model to base the image analysis request on.
Configuring Image Options ¶
- VNCoreMLRequest.ImageCropAndScaleOption: An optional setting that tells the Vision algorithm how to scale an input image.
- VNCoreMLRequest.SetImageCropAndScaleOption
Identifying Request Revisions ¶
- VNCoreMLRequest.VNCoreMLRequestRevision1: A constant for specifying revision 1 of a Core ML request.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest
func NewCoreMLRequestWithCompletionHandler ¶
func NewCoreMLRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNCoreMLRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewCoreMLRequestWithModel ¶
func NewCoreMLRequestWithModel(model IVNCoreMLModel) VNCoreMLRequest
Creates a model container to use with an image analysis request based on the model you provide.
model: The Core ML model on which to base the Vision request. // Core ML: https://developer.apple.com/documentation/CoreML
Discussion ¶
Initialization can fail if the Core ML model you provide isn’t supported in Vision, such as if the model doesn’t accept an image as input.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest/init(model:)
func NewCoreMLRequestWithModelCompletionHandler ¶
func NewCoreMLRequestWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestCompletionHandler) VNCoreMLRequest
Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.
model: The Core ML model on which to base the Vision request. // Core ML: https://developer.apple.com/documentation/CoreML
completionHandler: An optional block of code to execute after model initialization.
Discussion ¶
Initialization can fail if the Core ML model you provide isn’t supported in Vision, such as if the model doesn’t accept an image as input.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest/init(model:completionHandler:)
func NewVNCoreMLRequest ¶
func NewVNCoreMLRequest() VNCoreMLRequest
NewVNCoreMLRequest creates a new VNCoreMLRequest instance.
func VNCoreMLRequestFromID ¶
func VNCoreMLRequestFromID(id objc.ID) VNCoreMLRequest
VNCoreMLRequestFromID constructs a VNCoreMLRequest from an objc.ID.
An image-analysis request that uses a Core ML model to process images.
func (VNCoreMLRequest) Autorelease ¶
func (c VNCoreMLRequest) Autorelease() VNCoreMLRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNCoreMLRequest) Confidence ¶
func (c VNCoreMLRequest) Confidence() VNConfidence
The level of confidence in the observation’s accuracy.
See: https://developer.apple.com/documentation/vision/vnobservation/confidence
func (VNCoreMLRequest) ImageCropAndScaleOption ¶
func (c VNCoreMLRequest) ImageCropAndScaleOption() VNImageCropAndScaleOption
An optional setting that tells the Vision algorithm how to scale an input image.
Discussion ¶
Scaling an image ensures that the entire image fits into the algorithm’s input image dimensions, which may require a change in aspect ratio. Each crop-and-scale option transforms the input image in a different way.
[scale-crop-options]
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest/imageCropAndScaleOption
func (VNCoreMLRequest) Init ¶
func (c VNCoreMLRequest) Init() VNCoreMLRequest
Init initializes the instance.
func (VNCoreMLRequest) InitWithModel ¶
func (c VNCoreMLRequest) InitWithModel(model IVNCoreMLModel) VNCoreMLRequest
Creates a model container to use with an image analysis request based on the model you provide.
model: The Core ML model on which to base the Vision request. // Core ML: https://developer.apple.com/documentation/CoreML
Discussion ¶
Initialization can fail if the Core ML model you provide isn’t supported in Vision, such as if the model doesn’t accept an image as input.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest/init(model:)
func (VNCoreMLRequest) InitWithModelCompletionHandler ¶
func (c VNCoreMLRequest) InitWithModelCompletionHandler(model IVNCoreMLModel, completionHandler ErrorHandler) VNCoreMLRequest
Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.
model: The Core ML model on which to base the Vision request. // Core ML: https://developer.apple.com/documentation/CoreML
completionHandler: An optional block of code to execute after model initialization.
Discussion ¶
Initialization can fail if the Core ML model you provide isn’t supported in Vision, such as if the model doesn’t accept an image as input.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest/init(model:completionHandler:)
func (VNCoreMLRequest) Model ¶
func (c VNCoreMLRequest) Model() IVNCoreMLModel
The model to base the image analysis request on.
Discussion ¶
This object wraps a Core ML model.
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest/model
func (VNCoreMLRequest) ModelDescription ¶
func (c VNCoreMLRequest) ModelDescription() coreml.MLModelDescription
Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
See: https://developer.apple.com/documentation/CoreML/MLModel/modelDescription
func (VNCoreMLRequest) PredictedFeatureName ¶
func (c VNCoreMLRequest) PredictedFeatureName() string
The name of the primary prediction feature output description.
See: https://developer.apple.com/documentation/CoreML/MLModelDescription/predictedFeatureName
func (VNCoreMLRequest) SetConfidence ¶
func (c VNCoreMLRequest) SetConfidence(value VNConfidence)
func (VNCoreMLRequest) SetImageCropAndScaleOption ¶
func (c VNCoreMLRequest) SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
func (VNCoreMLRequest) SetModelDescription ¶
func (c VNCoreMLRequest) SetModelDescription(value coreml.MLModelDescription)
func (VNCoreMLRequest) SetPredictedFeatureName ¶
func (c VNCoreMLRequest) SetPredictedFeatureName(value string)
func (VNCoreMLRequest) VNCoreMLRequestRevision1 ¶
func (c VNCoreMLRequest) VNCoreMLRequestRevision1() int
A constant for specifying revision 1 of a Core ML request.
See: https://developer.apple.com/documentation/vision/vncoremlrequestrevision1
type VNCoreMLRequestClass ¶
type VNCoreMLRequestClass struct {
// contains filtered or unexported fields
}
func GetVNCoreMLRequestClass ¶
func GetVNCoreMLRequestClass() VNCoreMLRequestClass
GetVNCoreMLRequestClass returns the class object for VNCoreMLRequest.
func (VNCoreMLRequestClass) Alloc ¶
func (vc VNCoreMLRequestClass) Alloc() VNCoreMLRequest
Alloc allocates memory for a new instance of the class.
type VNDegrees ¶
type VNDegrees = float32
VNDegrees is a typealias for expressing tolerance angles in Vision.
See: https://developer.apple.com/documentation/Vision/VNDegrees
type VNDetectAnimalBodyPoseRequest ¶
type VNDetectAnimalBodyPoseRequest struct {
VNImageBasedRequest
}
A request that detects an animal body pose.
Determining Supported Joints ¶
- VNDetectAnimalBodyPoseRequest.SupportedJointNames: Retrieves the joint names the request supports.
- VNDetectAnimalBodyPoseRequest.SetSupportedJointNames
- VNDetectAnimalBodyPoseRequest.SupportedJointsGroupNames: Retrieves the joint group names the request supports.
- VNDetectAnimalBodyPoseRequest.SetSupportedJointsGroupNames
See: https://developer.apple.com/documentation/Vision/VNDetectAnimalBodyPoseRequest
func NewDetectAnimalBodyPoseRequestWithCompletionHandler ¶
func NewDetectAnimalBodyPoseRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectAnimalBodyPoseRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectAnimalBodyPoseRequest ¶
func NewVNDetectAnimalBodyPoseRequest() VNDetectAnimalBodyPoseRequest
NewVNDetectAnimalBodyPoseRequest creates a new VNDetectAnimalBodyPoseRequest instance.
func VNDetectAnimalBodyPoseRequestFromID ¶
func VNDetectAnimalBodyPoseRequestFromID(id objc.ID) VNDetectAnimalBodyPoseRequest
VNDetectAnimalBodyPoseRequestFromID constructs a VNDetectAnimalBodyPoseRequest from an objc.ID.
A request that detects an animal body pose.
func (VNDetectAnimalBodyPoseRequest) Autorelease ¶
func (d VNDetectAnimalBodyPoseRequest) Autorelease() VNDetectAnimalBodyPoseRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectAnimalBodyPoseRequest) Init ¶
func (d VNDetectAnimalBodyPoseRequest) Init() VNDetectAnimalBodyPoseRequest
Init initializes the instance.
func (VNDetectAnimalBodyPoseRequest) SetSupportedJointNames ¶
func (d VNDetectAnimalBodyPoseRequest) SetSupportedJointNames(value VNAnimalBodyPoseObservationJointName)
func (VNDetectAnimalBodyPoseRequest) SetSupportedJointsGroupNames ¶
func (d VNDetectAnimalBodyPoseRequest) SetSupportedJointsGroupNames(value VNAnimalBodyPoseObservationJointsGroupName)
func (VNDetectAnimalBodyPoseRequest) SupportedJointNames ¶
func (d VNDetectAnimalBodyPoseRequest) SupportedJointNames() VNAnimalBodyPoseObservationJointName
Retrieves the joint names the request supports.
See: https://developer.apple.com/documentation/vision/vndetectanimalbodyposerequest/supportedjointnames
func (VNDetectAnimalBodyPoseRequest) SupportedJointNamesAndReturnError ¶
func (d VNDetectAnimalBodyPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
Retrieves the joint names the request supports.
error: If an error occurs, an object that describes the error; otherwise, `nil`.
Return Value ¶
The array of joint names.
func (VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNames ¶
func (d VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNames() VNAnimalBodyPoseObservationJointsGroupName
Retrieves the joint group names the request supports.
func (VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNamesAndReturnError ¶
func (d VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
Retrieves the joint group names the request supports.
error: If an error occurs, an object that describes the error; otherwise, `nil`.
Return Value ¶
The array of joint group names.
type VNDetectAnimalBodyPoseRequestClass ¶
type VNDetectAnimalBodyPoseRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectAnimalBodyPoseRequestClass ¶
func GetVNDetectAnimalBodyPoseRequestClass() VNDetectAnimalBodyPoseRequestClass
GetVNDetectAnimalBodyPoseRequestClass returns the class object for VNDetectAnimalBodyPoseRequest.
func (VNDetectAnimalBodyPoseRequestClass) Alloc ¶
func (vc VNDetectAnimalBodyPoseRequestClass) Alloc() VNDetectAnimalBodyPoseRequest
Alloc allocates memory for a new instance of the class.
type VNDetectBarcodesRequest ¶
type VNDetectBarcodesRequest struct {
VNImageBasedRequest
}
A request that detects barcodes in an image.
Overview ¶
This request returns an array of VNBarcodeObservation objects, one for each barcode it detects.
Specifying Symbologies ¶
- VNDetectBarcodesRequest.SupportedSymbologiesAndReturnError: Returns the barcode symbologies that the request supports.
- VNDetectBarcodesRequest.Symbologies: The barcode symbologies that the request detects in an image.
- VNDetectBarcodesRequest.SetSymbologies
- VNDetectBarcodesRequest.CoalesceCompositeSymbologies: A Boolean value that indicates whether to coalesce multiple codes based on the symbology.
- VNDetectBarcodesRequest.SetCoalesceCompositeSymbologies
Identifying Request Revisions ¶
- VNDetectBarcodesRequest.VNDetectBarcodesRequestRevision3: A constant for specifying revision 3 of the barcode detection request.
- VNDetectBarcodesRequest.VNDetectBarcodesRequestRevision2: A constant for specifying revision 2 of the barcode detection request.
- VNDetectBarcodesRequest.VNDetectBarcodesRequestRevision1: A constant for specifying revision 1 of the barcode detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequest
func NewDetectBarcodesRequestWithCompletionHandler ¶
func NewDetectBarcodesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectBarcodesRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectBarcodesRequest ¶
func NewVNDetectBarcodesRequest() VNDetectBarcodesRequest
NewVNDetectBarcodesRequest creates a new VNDetectBarcodesRequest instance.
func VNDetectBarcodesRequestFromID ¶
func VNDetectBarcodesRequestFromID(id objc.ID) VNDetectBarcodesRequest
VNDetectBarcodesRequestFromID constructs a VNDetectBarcodesRequest from an objc.ID.
A request that detects barcodes in an image.
func (VNDetectBarcodesRequest) Autorelease ¶
func (d VNDetectBarcodesRequest) Autorelease() VNDetectBarcodesRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectBarcodesRequest) CoalesceCompositeSymbologies ¶
func (d VNDetectBarcodesRequest) CoalesceCompositeSymbologies() bool
A Boolean value that indicates whether to coalesce multiple codes based on the symbology.
func (VNDetectBarcodesRequest) Init ¶
func (d VNDetectBarcodesRequest) Init() VNDetectBarcodesRequest
Init initializes the instance.
func (VNDetectBarcodesRequest) SetCoalesceCompositeSymbologies ¶
func (d VNDetectBarcodesRequest) SetCoalesceCompositeSymbologies(value bool)
func (VNDetectBarcodesRequest) SetSymbologies ¶
func (d VNDetectBarcodesRequest) SetSymbologies(value []string)
func (VNDetectBarcodesRequest) SupportedSymbologiesAndReturnError ¶
func (d VNDetectBarcodesRequest) SupportedSymbologiesAndReturnError() ([]string, error)
Returns the barcode symbologies that the request supports.
Return Value ¶
An array of symbologies.
See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequest/supportedSymbologies()
func (VNDetectBarcodesRequest) Symbologies ¶
func (d VNDetectBarcodesRequest) Symbologies() []string
The barcode symbologies that the request detects in an image.
Discussion ¶
By default, a request scans for all symbologies. Specify a subset of symbologies to limit the request’s detection range.
See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequest/symbologies
func (VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision1 ¶
func (d VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision1() int
A constant for specifying revision 1 of the barcode detection request.
See: https://developer.apple.com/documentation/vision/vndetectbarcodesrequestrevision1
func (VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision2 ¶
func (d VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision2() int
A constant for specifying revision 2 of the barcode detection request.
See: https://developer.apple.com/documentation/vision/vndetectbarcodesrequestrevision2
func (VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision3 ¶
func (d VNDetectBarcodesRequest) VNDetectBarcodesRequestRevision3() int
A constant for specifying revision 3 of the barcode detection request.
See: https://developer.apple.com/documentation/vision/vndetectbarcodesrequestrevision3
type VNDetectBarcodesRequestClass ¶
type VNDetectBarcodesRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectBarcodesRequestClass ¶
func GetVNDetectBarcodesRequestClass() VNDetectBarcodesRequestClass
GetVNDetectBarcodesRequestClass returns the class object for VNDetectBarcodesRequest.
func (VNDetectBarcodesRequestClass) Alloc ¶
func (vc VNDetectBarcodesRequestClass) Alloc() VNDetectBarcodesRequest
Alloc allocates memory for a new instance of the class.
type VNDetectContoursRequest ¶
type VNDetectContoursRequest struct {
VNImageBasedRequest
}
A request that detects the contours of the edges of an image.
Configuring the Request ¶
- VNDetectContoursRequest.ContrastAdjustment: The amount by which to adjust the image contrast.
- VNDetectContoursRequest.SetContrastAdjustment
- VNDetectContoursRequest.ContrastPivot: The pixel value to use as a pivot for the contrast.
- VNDetectContoursRequest.SetContrastPivot
- VNDetectContoursRequest.DetectsDarkOnLight: A Boolean value that indicates whether the request detects a dark object on a light background to aid in detection.
- VNDetectContoursRequest.SetDetectsDarkOnLight
- VNDetectContoursRequest.MaximumImageDimension: The maximum image dimension to use for contour detection.
- VNDetectContoursRequest.SetMaximumImageDimension
Identifying Request Revisions ¶
- VNDetectContoursRequest.VNDetectContourRequestRevision1: A constant for specifying revision 1 of the contours detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest
func NewDetectContoursRequestWithCompletionHandler ¶
func NewDetectContoursRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectContoursRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectContoursRequest ¶
func NewVNDetectContoursRequest() VNDetectContoursRequest
NewVNDetectContoursRequest creates a new VNDetectContoursRequest instance.
func VNDetectContoursRequestFromID ¶
func VNDetectContoursRequestFromID(id objc.ID) VNDetectContoursRequest
VNDetectContoursRequestFromID constructs a VNDetectContoursRequest from an objc.ID.
A request that detects the contours of the edges of an image.
func (VNDetectContoursRequest) Autorelease ¶
func (d VNDetectContoursRequest) Autorelease() VNDetectContoursRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectContoursRequest) ContrastAdjustment ¶
func (d VNDetectContoursRequest) ContrastAdjustment() float32
The amount by which to adjust the image contrast.
Discussion ¶
Contour detection works best with high-contrast images. The default value of this property is `2.0`, which doubles the image contrast to achieve the most accurate results.
This property supports a value range from `0.0` to `3.0`.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest/contrastAdjustment
func (VNDetectContoursRequest) ContrastPivot ¶
func (d VNDetectContoursRequest) ContrastPivot() foundation.NSNumber
The pixel value to use as a pivot for the contrast.
Discussion ¶
Numeric values range from `0.0` to `1.0`. You can also specify `nil` to have the framework automatically detect the value according to image intensity.
The default value is `0.5`, which indicates the pixel center.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest/contrastPivot
func (VNDetectContoursRequest) DetectsDarkOnLight ¶
func (d VNDetectContoursRequest) DetectsDarkOnLight() bool
A Boolean value that indicates whether the request detects a dark object on a light background to aid in detection.
Discussion ¶
The default value is true.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest/detectsDarkOnLight
func (VNDetectContoursRequest) Init ¶
func (d VNDetectContoursRequest) Init() VNDetectContoursRequest
Init initializes the instance.
func (VNDetectContoursRequest) MaximumImageDimension ¶
func (d VNDetectContoursRequest) MaximumImageDimension() uint
The maximum image dimension to use for contour detection.
Discussion ¶
Contour detection is computationally intensive. To improve performance, Vision scales the input image down, while maintaining its aspect ratio, such that its maximum dimension is the value of this property. Vision never scales the image up, so specifying the maximum value ensures that the image processes in its original size and not as a downscaled version.
This property supports values from 64 to NSUIntegerMax. The default value is 512.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest/maximumImageDimension
func (VNDetectContoursRequest) SetContrastAdjustment ¶
func (d VNDetectContoursRequest) SetContrastAdjustment(value float32)
func (VNDetectContoursRequest) SetContrastPivot ¶
func (d VNDetectContoursRequest) SetContrastPivot(value foundation.NSNumber)
func (VNDetectContoursRequest) SetDetectsDarkOnLight ¶
func (d VNDetectContoursRequest) SetDetectsDarkOnLight(value bool)
func (VNDetectContoursRequest) SetMaximumImageDimension ¶
func (d VNDetectContoursRequest) SetMaximumImageDimension(value uint)
func (VNDetectContoursRequest) VNDetectContourRequestRevision1 ¶
func (d VNDetectContoursRequest) VNDetectContourRequestRevision1() int
A constant for specifying revision 1 of the contours detection request.
See: https://developer.apple.com/documentation/vision/vndetectcontourrequestrevision1
type VNDetectContoursRequestClass ¶
type VNDetectContoursRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectContoursRequestClass ¶
func GetVNDetectContoursRequestClass() VNDetectContoursRequestClass
GetVNDetectContoursRequestClass returns the class object for VNDetectContoursRequest.
func (VNDetectContoursRequestClass) Alloc ¶
func (vc VNDetectContoursRequestClass) Alloc() VNDetectContoursRequest
Alloc allocates memory for a new instance of the class.
type VNDetectDocumentSegmentationRequest ¶
type VNDetectDocumentSegmentationRequest struct {
VNImageBasedRequest
}
An object that detects rectangular regions that contain text in the input image.
Overview ¶
Perform this request to detect a document in an image. The result that the request generates contains the four corner points of a document’s quadrilateral and saliency mask.
Identifying Request Revisions ¶
- VNDetectDocumentSegmentationRequest.VNDetectDocumentSegmentationRequestRevision1: A constant for specifying revision 1 of the document segmentation request.
See: https://developer.apple.com/documentation/Vision/VNDetectDocumentSegmentationRequest
func NewDetectDocumentSegmentationRequestWithCompletionHandler ¶
func NewDetectDocumentSegmentationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectDocumentSegmentationRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectDocumentSegmentationRequest ¶
func NewVNDetectDocumentSegmentationRequest() VNDetectDocumentSegmentationRequest
NewVNDetectDocumentSegmentationRequest creates a new VNDetectDocumentSegmentationRequest instance.
func VNDetectDocumentSegmentationRequestFromID ¶
func VNDetectDocumentSegmentationRequestFromID(id objc.ID) VNDetectDocumentSegmentationRequest
VNDetectDocumentSegmentationRequestFromID constructs a VNDetectDocumentSegmentationRequest from an objc.ID.
An object that detects rectangular regions that contain text in the input image.
func (VNDetectDocumentSegmentationRequest) Autorelease ¶
func (d VNDetectDocumentSegmentationRequest) Autorelease() VNDetectDocumentSegmentationRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectDocumentSegmentationRequest) VNDetectDocumentSegmentationRequestRevision1 ¶
func (d VNDetectDocumentSegmentationRequest) VNDetectDocumentSegmentationRequestRevision1() int
A constant for specifying revision 1 of the document segmentation request.
See: https://developer.apple.com/documentation/vision/vndetectdocumentsegmentationrequestrevision1
type VNDetectDocumentSegmentationRequestClass ¶
type VNDetectDocumentSegmentationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectDocumentSegmentationRequestClass ¶
func GetVNDetectDocumentSegmentationRequestClass() VNDetectDocumentSegmentationRequestClass
GetVNDetectDocumentSegmentationRequestClass returns the class object for VNDetectDocumentSegmentationRequest.
func (VNDetectDocumentSegmentationRequestClass) Alloc ¶
func (vc VNDetectDocumentSegmentationRequestClass) Alloc() VNDetectDocumentSegmentationRequest
Alloc allocates memory for a new instance of the class.
type VNDetectFaceCaptureQualityRequest ¶
type VNDetectFaceCaptureQualityRequest struct {
VNImageBasedRequest
}
A request that produces a floating-point number that represents the capture quality of a face in a photo.
Overview ¶
This request produces or updates a VNFaceObservation object’s property faceCaptureQuality with a floating-point value. The value ranges from `0` to `1`. Faces with quality closer to `1` are better lit, sharper, and more centrally positioned than faces with quality closer to `0`.
If you don’t execute the request, or the request fails, the property faceCaptureQuality is nil.
Identifying Request Revisions ¶
- VNDetectFaceCaptureQualityRequest.VNDetectFaceCaptureQualityRequestRevision2: Revision 2 of the request algorithm.
- VNDetectFaceCaptureQualityRequest.VNDetectFaceCaptureQualityRequestRevision1: A constant for specifying revision 1 of the face capture detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceCaptureQualityRequest
func NewDetectFaceCaptureQualityRequestWithCompletionHandler ¶
func NewDetectFaceCaptureQualityRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectFaceCaptureQualityRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectFaceCaptureQualityRequest ¶
func NewVNDetectFaceCaptureQualityRequest() VNDetectFaceCaptureQualityRequest
NewVNDetectFaceCaptureQualityRequest creates a new VNDetectFaceCaptureQualityRequest instance.
func VNDetectFaceCaptureQualityRequestFromID ¶
func VNDetectFaceCaptureQualityRequestFromID(id objc.ID) VNDetectFaceCaptureQualityRequest
VNDetectFaceCaptureQualityRequestFromID constructs a VNDetectFaceCaptureQualityRequest from an objc.ID.
A request that produces a floating-point number that represents the capture quality of a face in a photo.
func (VNDetectFaceCaptureQualityRequest) Autorelease ¶
func (d VNDetectFaceCaptureQualityRequest) Autorelease() VNDetectFaceCaptureQualityRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectFaceCaptureQualityRequest) FaceCaptureQuality ¶
func (d VNDetectFaceCaptureQualityRequest) FaceCaptureQuality() float32
A value that indicates the quality of the face capture.
See: https://developer.apple.com/documentation/vision/vnfaceobservation/facecapturequality-bjg5
func (VNDetectFaceCaptureQualityRequest) Init ¶
func (d VNDetectFaceCaptureQualityRequest) Init() VNDetectFaceCaptureQualityRequest
Init initializes the instance.
func (VNDetectFaceCaptureQualityRequest) InputFaceObservations ¶
func (d VNDetectFaceCaptureQualityRequest) InputFaceObservations() []VNFaceObservation
An array of VNFaceObservation objects to process as part of the request.
See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
func (VNDetectFaceCaptureQualityRequest) SetFaceCaptureQuality ¶
func (d VNDetectFaceCaptureQualityRequest) SetFaceCaptureQuality(value float32)
func (VNDetectFaceCaptureQualityRequest) SetInputFaceObservations ¶
func (d VNDetectFaceCaptureQualityRequest) SetInputFaceObservations(value []VNFaceObservation)
func (VNDetectFaceCaptureQualityRequest) VNDetectFaceCaptureQualityRequestRevision1 ¶
func (d VNDetectFaceCaptureQualityRequest) VNDetectFaceCaptureQualityRequestRevision1() int
A constant for specifying revision 1 of the face capture detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision1
func (VNDetectFaceCaptureQualityRequest) VNDetectFaceCaptureQualityRequestRevision2 ¶
func (d VNDetectFaceCaptureQualityRequest) VNDetectFaceCaptureQualityRequestRevision2() int
Revision 2 of the request algorithm.
See: https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision2
type VNDetectFaceCaptureQualityRequestClass ¶
type VNDetectFaceCaptureQualityRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectFaceCaptureQualityRequestClass ¶
func GetVNDetectFaceCaptureQualityRequestClass() VNDetectFaceCaptureQualityRequestClass
GetVNDetectFaceCaptureQualityRequestClass returns the class object for VNDetectFaceCaptureQualityRequest.
func (VNDetectFaceCaptureQualityRequestClass) Alloc ¶
func (vc VNDetectFaceCaptureQualityRequestClass) Alloc() VNDetectFaceCaptureQualityRequest
Alloc allocates memory for a new instance of the class.
type VNDetectFaceLandmarksRequest ¶
type VNDetectFaceLandmarksRequest struct {
VNImageBasedRequest
}
An image-analysis request that finds facial features like eyes and mouth in an image.
Overview ¶
By default, a face landmarks request first locates all faces in the input image, then analyzes each to detect facial features.
If you’ve already located all the faces in an image, or want to detect landmarks in only a subset of the faces in the image, set the VNDetectFaceLandmarksRequest.InputFaceObservations property to an array of VNFaceObservation objects representing the faces you want to analyze. You can either use face observations output by a VNDetectFaceRectanglesRequest or manually create VNFaceObservation instances with the bounding boxes of the faces you want to analyze.
Locating Face Landmarks ¶
- VNDetectFaceLandmarksRequest.Constellation: A variable that describes how a face landmarks request orders or enumerates the resulting features.
- VNDetectFaceLandmarksRequest.SetConstellation
Identifying Request Revisions ¶
- VNDetectFaceLandmarksRequest.VNDetectFaceLandmarksRequestRevision3: A constant for specifying revision 3 of the face landmarks detection request.
- VNDetectFaceLandmarksRequest.VNDetectFaceLandmarksRequestRevision2: A constant for specifying revision 2 of the face landmarks detection request.
- VNDetectFaceLandmarksRequest.VNDetectFaceLandmarksRequestRevision1: A constant for specifying revision 1 of the face landmarks detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequest
func NewDetectFaceLandmarksRequestWithCompletionHandler ¶
func NewDetectFaceLandmarksRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectFaceLandmarksRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectFaceLandmarksRequest ¶
func NewVNDetectFaceLandmarksRequest() VNDetectFaceLandmarksRequest
NewVNDetectFaceLandmarksRequest creates a new VNDetectFaceLandmarksRequest instance.
func VNDetectFaceLandmarksRequestFromID ¶
func VNDetectFaceLandmarksRequestFromID(id objc.ID) VNDetectFaceLandmarksRequest
VNDetectFaceLandmarksRequestFromID constructs a VNDetectFaceLandmarksRequest from an objc.ID.
An image-analysis request that finds facial features like eyes and mouth in an image.
func (VNDetectFaceLandmarksRequest) Autorelease ¶
func (d VNDetectFaceLandmarksRequest) Autorelease() VNDetectFaceLandmarksRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectFaceLandmarksRequest) Constellation ¶
func (d VNDetectFaceLandmarksRequest) Constellation() VNRequestFaceLandmarksConstellation
A variable that describes how a face landmarks request orders or enumerates the resulting features.
Discussion ¶
Set this variable to one of the supported constellation types detailed in VNRequestFaceLandmarksConstellation. The default value is [RequestFaceLandmarksConstellationNotDefined].
See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequest/constellation
func (VNDetectFaceLandmarksRequest) Init ¶
func (d VNDetectFaceLandmarksRequest) Init() VNDetectFaceLandmarksRequest
Init initializes the instance.
func (VNDetectFaceLandmarksRequest) InputFaceObservations ¶
func (d VNDetectFaceLandmarksRequest) InputFaceObservations() IVNFaceObservation
An array of
See: https://developer.apple.com/documentation/vision/vnfaceobservationaccepting/inputfaceobservations
func (VNDetectFaceLandmarksRequest) SetConstellation ¶
func (d VNDetectFaceLandmarksRequest) SetConstellation(value VNRequestFaceLandmarksConstellation)
func (VNDetectFaceLandmarksRequest) SetInputFaceObservations ¶
func (d VNDetectFaceLandmarksRequest) SetInputFaceObservations(value IVNFaceObservation)
func (VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision1 ¶
func (d VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision1() int
A constant for specifying revision 1 of the face landmarks detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacelandmarksrequestrevision1
func (VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision2 ¶
func (d VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision2() int
A constant for specifying revision 2 of the face landmarks detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacelandmarksrequestrevision2
func (VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision3 ¶
func (d VNDetectFaceLandmarksRequest) VNDetectFaceLandmarksRequestRevision3() int
A constant for specifying revision 3 of the face landmarks detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacelandmarksrequestrevision3
type VNDetectFaceLandmarksRequestClass ¶
type VNDetectFaceLandmarksRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectFaceLandmarksRequestClass ¶
func GetVNDetectFaceLandmarksRequestClass() VNDetectFaceLandmarksRequestClass
GetVNDetectFaceLandmarksRequestClass returns the class object for VNDetectFaceLandmarksRequest.
func (VNDetectFaceLandmarksRequestClass) Alloc ¶
func (vc VNDetectFaceLandmarksRequestClass) Alloc() VNDetectFaceLandmarksRequest
Alloc allocates memory for a new instance of the class.
func (VNDetectFaceLandmarksRequestClass) RevisionSupportsConstellation ¶
func (_VNDetectFaceLandmarksRequestClass VNDetectFaceLandmarksRequestClass) RevisionSupportsConstellation(requestRevision uint, constellation VNRequestFaceLandmarksConstellation) bool
Returns a Boolean value that indicates whether a revision supports a constellation.
requestRevision: The revision of the request.
constellation: The contellation for which to determine support.
Return Value ¶
true if the revision supports the constellation, otherwise false.
type VNDetectFaceRectanglesRequest ¶
type VNDetectFaceRectanglesRequest struct {
VNImageBasedRequest
}
A request that finds faces within an image.
Overview ¶
This request returns faces as rectangular bounding boxes with origin and size.
Identifying Request Revisions ¶
- VNDetectFaceRectanglesRequest.VNDetectFaceRectanglesRequestRevision3: A constant for specifying revision 3 of the face rectangles detection request.
- VNDetectFaceRectanglesRequest.VNDetectFaceRectanglesRequestRevision2: A constant for specifying revision 2 of the face rectangles detection request.
- VNDetectFaceRectanglesRequest.VNDetectFaceRectanglesRequestRevision1: A constant for specifying revision 1 of the face rectangles detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequest
func NewDetectFaceRectanglesRequestWithCompletionHandler ¶
func NewDetectFaceRectanglesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectFaceRectanglesRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectFaceRectanglesRequest ¶
func NewVNDetectFaceRectanglesRequest() VNDetectFaceRectanglesRequest
NewVNDetectFaceRectanglesRequest creates a new VNDetectFaceRectanglesRequest instance.
func VNDetectFaceRectanglesRequestFromID ¶
func VNDetectFaceRectanglesRequestFromID(id objc.ID) VNDetectFaceRectanglesRequest
VNDetectFaceRectanglesRequestFromID constructs a VNDetectFaceRectanglesRequest from an objc.ID.
A request that finds faces within an image.
func (VNDetectFaceRectanglesRequest) Autorelease ¶
func (d VNDetectFaceRectanglesRequest) Autorelease() VNDetectFaceRectanglesRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectFaceRectanglesRequest) Init ¶
func (d VNDetectFaceRectanglesRequest) Init() VNDetectFaceRectanglesRequest
Init initializes the instance.
func (VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision1 ¶
func (d VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision1() int
A constant for specifying revision 1 of the face rectangles detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision1
func (VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision2 ¶
func (d VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision2() int
A constant for specifying revision 2 of the face rectangles detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision2
func (VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision3 ¶
func (d VNDetectFaceRectanglesRequest) VNDetectFaceRectanglesRequestRevision3() int
A constant for specifying revision 3 of the face rectangles detection request.
See: https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision3
type VNDetectFaceRectanglesRequestClass ¶
type VNDetectFaceRectanglesRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectFaceRectanglesRequestClass ¶
func GetVNDetectFaceRectanglesRequestClass() VNDetectFaceRectanglesRequestClass
GetVNDetectFaceRectanglesRequestClass returns the class object for VNDetectFaceRectanglesRequest.
func (VNDetectFaceRectanglesRequestClass) Alloc ¶
func (vc VNDetectFaceRectanglesRequestClass) Alloc() VNDetectFaceRectanglesRequest
Alloc allocates memory for a new instance of the class.
type VNDetectHorizonRequest ¶
type VNDetectHorizonRequest struct {
VNImageBasedRequest
}
An image-analysis request that determines the horizon angle in an image.
Identifying Request Revisions ¶
- VNDetectHorizonRequest.VNDetectHorizonRequestRevision1: A constant for specifying revision 1 of the horizon detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHorizonRequest
func NewDetectHorizonRequestWithCompletionHandler ¶
func NewDetectHorizonRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectHorizonRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectHorizonRequest ¶
func NewVNDetectHorizonRequest() VNDetectHorizonRequest
NewVNDetectHorizonRequest creates a new VNDetectHorizonRequest instance.
func VNDetectHorizonRequestFromID ¶
func VNDetectHorizonRequestFromID(id objc.ID) VNDetectHorizonRequest
VNDetectHorizonRequestFromID constructs a VNDetectHorizonRequest from an objc.ID.
An image-analysis request that determines the horizon angle in an image.
func (VNDetectHorizonRequest) Autorelease ¶
func (d VNDetectHorizonRequest) Autorelease() VNDetectHorizonRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectHorizonRequest) Init ¶
func (d VNDetectHorizonRequest) Init() VNDetectHorizonRequest
Init initializes the instance.
func (VNDetectHorizonRequest) VNDetectHorizonRequestRevision1 ¶
func (d VNDetectHorizonRequest) VNDetectHorizonRequestRevision1() int
A constant for specifying revision 1 of the horizon detection request.
See: https://developer.apple.com/documentation/vision/vndetecthorizonrequestrevision1
type VNDetectHorizonRequestClass ¶
type VNDetectHorizonRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectHorizonRequestClass ¶
func GetVNDetectHorizonRequestClass() VNDetectHorizonRequestClass
GetVNDetectHorizonRequestClass returns the class object for VNDetectHorizonRequest.
func (VNDetectHorizonRequestClass) Alloc ¶
func (vc VNDetectHorizonRequestClass) Alloc() VNDetectHorizonRequest
Alloc allocates memory for a new instance of the class.
type VNDetectHumanBodyPose3DRequest ¶
type VNDetectHumanBodyPose3DRequest struct {
VNStatefulRequest
}
A request that detects points on human bodies in 3D space, relative to the camera.
Overview ¶
This request generates a collection of VNHumanBodyPose3DObservation objects that describe the position of each body the request detects. If the system allows it, the request uses AVDepthData information to improve the accuracy.
Determining Supported Joints ¶
- VNDetectHumanBodyPose3DRequest.SupportedJointsGroupNames: Returns the joint names the request supports.
- VNDetectHumanBodyPose3DRequest.SetSupportedJointsGroupNames
- VNDetectHumanBodyPose3DRequest.SupportedJointNames: Returns the joint group names the request supports.
- VNDetectHumanBodyPose3DRequest.SetSupportedJointNames
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPose3DRequest
func NewDetectHumanBodyPose3DRequestWithCompletionHandler ¶
func NewDetectHumanBodyPose3DRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectHumanBodyPose3DRequest
Creates a new 3D body pose request with a completion handler.
completionHandler: The block to invoke after the request finishes processing.
func NewDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNDetectHumanBodyPose3DRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNDetectHumanBodyPose3DRequest ¶
func NewVNDetectHumanBodyPose3DRequest() VNDetectHumanBodyPose3DRequest
NewVNDetectHumanBodyPose3DRequest creates a new VNDetectHumanBodyPose3DRequest instance.
func VNDetectHumanBodyPose3DRequestFromID ¶
func VNDetectHumanBodyPose3DRequestFromID(id objc.ID) VNDetectHumanBodyPose3DRequest
VNDetectHumanBodyPose3DRequestFromID constructs a VNDetectHumanBodyPose3DRequest from an objc.ID.
A request that detects points on human bodies in 3D space, relative to the camera.
func (VNDetectHumanBodyPose3DRequest) Autorelease ¶
func (d VNDetectHumanBodyPose3DRequest) Autorelease() VNDetectHumanBodyPose3DRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectHumanBodyPose3DRequest) Init ¶
func (d VNDetectHumanBodyPose3DRequest) Init() VNDetectHumanBodyPose3DRequest
Init initializes the instance.
func (VNDetectHumanBodyPose3DRequest) SetSupportedJointNames ¶
func (d VNDetectHumanBodyPose3DRequest) SetSupportedJointNames(value VNHumanBodyPose3DObservationJointName)
func (VNDetectHumanBodyPose3DRequest) SetSupportedJointsGroupNames ¶
func (d VNDetectHumanBodyPose3DRequest) SetSupportedJointsGroupNames(value VNHumanBodyPose3DObservationJointsGroupName)
func (VNDetectHumanBodyPose3DRequest) SupportedJointNames ¶
func (d VNDetectHumanBodyPose3DRequest) SupportedJointNames() VNHumanBodyPose3DObservationJointName
Returns the joint group names the request supports.
See: https://developer.apple.com/documentation/vision/vndetecthumanbodypose3drequest/supportedjointnames
func (VNDetectHumanBodyPose3DRequest) SupportedJointNamesAndReturnError ¶
func (d VNDetectHumanBodyPose3DRequest) SupportedJointNamesAndReturnError() ([]string, error)
Returns the joint names the request supports.
Return Value ¶
The array of joint name objects.
func (VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNames ¶
func (d VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNames() VNHumanBodyPose3DObservationJointsGroupName
Returns the joint names the request supports.
func (VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNamesAndReturnError ¶
func (d VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
Returns the joint group names the request supports.
Return Value ¶
The array of joint group name objects.
type VNDetectHumanBodyPose3DRequestClass ¶
type VNDetectHumanBodyPose3DRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectHumanBodyPose3DRequestClass ¶
func GetVNDetectHumanBodyPose3DRequestClass() VNDetectHumanBodyPose3DRequestClass
GetVNDetectHumanBodyPose3DRequestClass returns the class object for VNDetectHumanBodyPose3DRequest.
func (VNDetectHumanBodyPose3DRequestClass) Alloc ¶
func (vc VNDetectHumanBodyPose3DRequestClass) Alloc() VNDetectHumanBodyPose3DRequest
Alloc allocates memory for a new instance of the class.
type VNDetectHumanBodyPoseRequest ¶
type VNDetectHumanBodyPoseRequest struct {
VNImageBasedRequest
}
A request that detects a human body pose.
Overview ¶
The framework provides the detected body pose as a VNHumanBodyPoseObservation.
Determining Supported Joints ¶
- VNDetectHumanBodyPoseRequest.SupportedJointNames: Retrieves the supported joint names.
- VNDetectHumanBodyPoseRequest.SetSupportedJointNames
- VNDetectHumanBodyPoseRequest.SupportedJointsGroupNames: Retrieves the supported joint group names.
- VNDetectHumanBodyPoseRequest.SetSupportedJointsGroupNames
Identifying Body Pose Revisions ¶
- VNDetectHumanBodyPoseRequest.VNDetectHumanBodyPoseRequestRevision1: A constant for specifying revision 1 of the body pose detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPoseRequest
func NewDetectHumanBodyPoseRequestWithCompletionHandler ¶
func NewDetectHumanBodyPoseRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectHumanBodyPoseRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectHumanBodyPoseRequest ¶
func NewVNDetectHumanBodyPoseRequest() VNDetectHumanBodyPoseRequest
NewVNDetectHumanBodyPoseRequest creates a new VNDetectHumanBodyPoseRequest instance.
func VNDetectHumanBodyPoseRequestFromID ¶
func VNDetectHumanBodyPoseRequestFromID(id objc.ID) VNDetectHumanBodyPoseRequest
VNDetectHumanBodyPoseRequestFromID constructs a VNDetectHumanBodyPoseRequest from an objc.ID.
A request that detects a human body pose.
func (VNDetectHumanBodyPoseRequest) Autorelease ¶
func (d VNDetectHumanBodyPoseRequest) Autorelease() VNDetectHumanBodyPoseRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectHumanBodyPoseRequest) Init ¶
func (d VNDetectHumanBodyPoseRequest) Init() VNDetectHumanBodyPoseRequest
Init initializes the instance.
func (VNDetectHumanBodyPoseRequest) SetSupportedJointNames ¶
func (d VNDetectHumanBodyPoseRequest) SetSupportedJointNames(value VNHumanBodyPoseObservationJointName)
func (VNDetectHumanBodyPoseRequest) SetSupportedJointsGroupNames ¶
func (d VNDetectHumanBodyPoseRequest) SetSupportedJointsGroupNames(value VNHumanBodyPoseObservationJointsGroupName)
func (VNDetectHumanBodyPoseRequest) SupportedJointNames ¶
func (d VNDetectHumanBodyPoseRequest) SupportedJointNames() VNHumanBodyPoseObservationJointName
Retrieves the supported joint names.
See: https://developer.apple.com/documentation/vision/vndetecthumanbodyposerequest/supportedjointnames
func (VNDetectHumanBodyPoseRequest) SupportedJointNamesAndReturnError ¶
func (d VNDetectHumanBodyPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
Retrieves the supported joint names.
error: If an error occurs, an error object that describes the error; otherwise, `nil`.
func (VNDetectHumanBodyPoseRequest) SupportedJointsGroupNames ¶
func (d VNDetectHumanBodyPoseRequest) SupportedJointsGroupNames() VNHumanBodyPoseObservationJointsGroupName
Retrieves the supported joint group names.
func (VNDetectHumanBodyPoseRequest) SupportedJointsGroupNamesAndReturnError ¶
func (d VNDetectHumanBodyPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
Retrieves the supported joint group names.
error: If an error occurs, an error object that describes the error; otherwise, `nil`.
func (VNDetectHumanBodyPoseRequest) VNDetectHumanBodyPoseRequestRevision1 ¶
func (d VNDetectHumanBodyPoseRequest) VNDetectHumanBodyPoseRequestRevision1() int
A constant for specifying revision 1 of the body pose detection request.
See: https://developer.apple.com/documentation/vision/vndetecthumanbodyposerequestrevision1
type VNDetectHumanBodyPoseRequestClass ¶
type VNDetectHumanBodyPoseRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectHumanBodyPoseRequestClass ¶
func GetVNDetectHumanBodyPoseRequestClass() VNDetectHumanBodyPoseRequestClass
GetVNDetectHumanBodyPoseRequestClass returns the class object for VNDetectHumanBodyPoseRequest.
func (VNDetectHumanBodyPoseRequestClass) Alloc ¶
func (vc VNDetectHumanBodyPoseRequestClass) Alloc() VNDetectHumanBodyPoseRequest
Alloc allocates memory for a new instance of the class.
type VNDetectHumanHandPoseRequest ¶
type VNDetectHumanHandPoseRequest struct {
VNImageBasedRequest
}
A request that detects a human hand pose.
Overview ¶
The framework provides the detected hand pose as a [VNIdentifiedPointsObservation].
Configuring the Request ¶
- VNDetectHumanHandPoseRequest.MaximumHandCount: The maximum number of hands to detect in an image.
- VNDetectHumanHandPoseRequest.SetMaximumHandCount
Determining Supported Joints ¶
- VNDetectHumanHandPoseRequest.SupportedJointNames: Retrieves the supported joint names.
- VNDetectHumanHandPoseRequest.SetSupportedJointNames
- VNDetectHumanHandPoseRequest.SupportedJointsGroupNames: Retrieves the supported joint group names.
- VNDetectHumanHandPoseRequest.SetSupportedJointsGroupNames
Identifying Hand Pose Revisions ¶
- VNDetectHumanHandPoseRequest.VNDetectHumanHandPoseRequestRevision1: A constant for specifying revision 1 of the hand pose detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanHandPoseRequest
func NewDetectHumanHandPoseRequestWithCompletionHandler ¶
func NewDetectHumanHandPoseRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectHumanHandPoseRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectHumanHandPoseRequest ¶
func NewVNDetectHumanHandPoseRequest() VNDetectHumanHandPoseRequest
NewVNDetectHumanHandPoseRequest creates a new VNDetectHumanHandPoseRequest instance.
func VNDetectHumanHandPoseRequestFromID ¶
func VNDetectHumanHandPoseRequestFromID(id objc.ID) VNDetectHumanHandPoseRequest
VNDetectHumanHandPoseRequestFromID constructs a VNDetectHumanHandPoseRequest from an objc.ID.
A request that detects a human hand pose.
func (VNDetectHumanHandPoseRequest) Autorelease ¶
func (d VNDetectHumanHandPoseRequest) Autorelease() VNDetectHumanHandPoseRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectHumanHandPoseRequest) Init ¶
func (d VNDetectHumanHandPoseRequest) Init() VNDetectHumanHandPoseRequest
Init initializes the instance.
func (VNDetectHumanHandPoseRequest) MaximumHandCount ¶
func (d VNDetectHumanHandPoseRequest) MaximumHandCount() uint
The maximum number of hands to detect in an image.
Discussion ¶
The request orders detected hands by relative size, with only the largest ones having key points determined.
The default value is 2.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanHandPoseRequest/maximumHandCount
func (VNDetectHumanHandPoseRequest) SetMaximumHandCount ¶
func (d VNDetectHumanHandPoseRequest) SetMaximumHandCount(value uint)
func (VNDetectHumanHandPoseRequest) SetSupportedJointNames ¶
func (d VNDetectHumanHandPoseRequest) SetSupportedJointNames(value VNHumanHandPoseObservationJointName)
func (VNDetectHumanHandPoseRequest) SetSupportedJointsGroupNames ¶
func (d VNDetectHumanHandPoseRequest) SetSupportedJointsGroupNames(value VNHumanHandPoseObservationJointsGroupName)
func (VNDetectHumanHandPoseRequest) SupportedJointNames ¶
func (d VNDetectHumanHandPoseRequest) SupportedJointNames() VNHumanHandPoseObservationJointName
Retrieves the supported joint names.
See: https://developer.apple.com/documentation/vision/vndetecthumanhandposerequest/supportedjointnames
func (VNDetectHumanHandPoseRequest) SupportedJointNamesAndReturnError ¶
func (d VNDetectHumanHandPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
Retrieves the supported joint names.
error: If an error occurs, an error object that describes the error; otherwise, `nil`.
func (VNDetectHumanHandPoseRequest) SupportedJointsGroupNames ¶
func (d VNDetectHumanHandPoseRequest) SupportedJointsGroupNames() VNHumanHandPoseObservationJointsGroupName
Retrieves the supported joint group names.
func (VNDetectHumanHandPoseRequest) SupportedJointsGroupNamesAndReturnError ¶
func (d VNDetectHumanHandPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
Retrieves the supported joint group names.
error: If an error occurs, an error object that describes the error; otherwise, `nil`.
func (VNDetectHumanHandPoseRequest) VNDetectHumanHandPoseRequestRevision1 ¶
func (d VNDetectHumanHandPoseRequest) VNDetectHumanHandPoseRequestRevision1() int
A constant for specifying revision 1 of the hand pose detection request.
See: https://developer.apple.com/documentation/vision/vndetecthumanhandposerequestrevision1
type VNDetectHumanHandPoseRequestClass ¶
type VNDetectHumanHandPoseRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectHumanHandPoseRequestClass ¶
func GetVNDetectHumanHandPoseRequestClass() VNDetectHumanHandPoseRequestClass
GetVNDetectHumanHandPoseRequestClass returns the class object for VNDetectHumanHandPoseRequest.
func (VNDetectHumanHandPoseRequestClass) Alloc ¶
func (vc VNDetectHumanHandPoseRequestClass) Alloc() VNDetectHumanHandPoseRequest
Alloc allocates memory for a new instance of the class.
type VNDetectHumanRectanglesRequest ¶
type VNDetectHumanRectanglesRequest struct {
VNImageBasedRequest
}
A request that finds rectangular regions that contain people in an image.
Configuring the Request ¶
- VNDetectHumanRectanglesRequest.UpperBodyOnly: A Boolean value that indicates whether the request requires detecting a full body or upper body only to produce a result.
- VNDetectHumanRectanglesRequest.SetUpperBodyOnly
Identifying Request Revisions ¶
- VNDetectHumanRectanglesRequest.VNDetectHumanRectanglesRequestRevision2: A constant for specifying revision 2 of the human rectangles detection request.
- VNDetectHumanRectanglesRequest.VNDetectHumanRectanglesRequestRevision1: A constant for specifying revision 1 of the human rectangles detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanRectanglesRequest
func NewDetectHumanRectanglesRequestWithCompletionHandler ¶
func NewDetectHumanRectanglesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectHumanRectanglesRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectHumanRectanglesRequest ¶
func NewVNDetectHumanRectanglesRequest() VNDetectHumanRectanglesRequest
NewVNDetectHumanRectanglesRequest creates a new VNDetectHumanRectanglesRequest instance.
func VNDetectHumanRectanglesRequestFromID ¶
func VNDetectHumanRectanglesRequestFromID(id objc.ID) VNDetectHumanRectanglesRequest
VNDetectHumanRectanglesRequestFromID constructs a VNDetectHumanRectanglesRequest from an objc.ID.
A request that finds rectangular regions that contain people in an image.
func (VNDetectHumanRectanglesRequest) Autorelease ¶
func (d VNDetectHumanRectanglesRequest) Autorelease() VNDetectHumanRectanglesRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectHumanRectanglesRequest) Init ¶
func (d VNDetectHumanRectanglesRequest) Init() VNDetectHumanRectanglesRequest
Init initializes the instance.
func (VNDetectHumanRectanglesRequest) SetUpperBodyOnly ¶
func (d VNDetectHumanRectanglesRequest) SetUpperBodyOnly(value bool)
func (VNDetectHumanRectanglesRequest) UpperBodyOnly ¶
func (d VNDetectHumanRectanglesRequest) UpperBodyOnly() bool
A Boolean value that indicates whether the request requires detecting a full body or upper body only to produce a result.
Discussion ¶
The default value of true indicates that the request requires detecting a person’s upper body only to find the bound box around it.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanRectanglesRequest/upperBodyOnly
func (VNDetectHumanRectanglesRequest) VNDetectHumanRectanglesRequestRevision1 ¶
func (d VNDetectHumanRectanglesRequest) VNDetectHumanRectanglesRequestRevision1() int
A constant for specifying revision 1 of the human rectangles detection request.
See: https://developer.apple.com/documentation/vision/vndetecthumanrectanglesrequestrevision1
func (VNDetectHumanRectanglesRequest) VNDetectHumanRectanglesRequestRevision2 ¶
func (d VNDetectHumanRectanglesRequest) VNDetectHumanRectanglesRequestRevision2() int
A constant for specifying revision 2 of the human rectangles detection request.
See: https://developer.apple.com/documentation/vision/vndetecthumanrectanglesrequestrevision2
type VNDetectHumanRectanglesRequestClass ¶
type VNDetectHumanRectanglesRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectHumanRectanglesRequestClass ¶
func GetVNDetectHumanRectanglesRequestClass() VNDetectHumanRectanglesRequestClass
GetVNDetectHumanRectanglesRequestClass returns the class object for VNDetectHumanRectanglesRequest.
func (VNDetectHumanRectanglesRequestClass) Alloc ¶
func (vc VNDetectHumanRectanglesRequestClass) Alloc() VNDetectHumanRectanglesRequest
Alloc allocates memory for a new instance of the class.
type VNDetectRectanglesRequest ¶
type VNDetectRectanglesRequest struct {
VNImageBasedRequest
}
An image-analysis request that finds projected rectangular regions in an image.
Overview ¶
A rectangle detection request locates regions of an image with rectangular shape, like credit cards, business cards, documents, and signs. The request returns its observations in the form of VNRectangleObservation objects, which contain normalized coordinates of bounding boxes containing the rectangle.
Use this type of request to find the bounding boxes of rectangles in an image. Vision returns observations for rectangles found in all orientations and sizes, along with a confidence level to indicate how likely it’s that the observation contains an actual rectangle.
To further configure or restrict the types of rectangles found, set properties on the request specifying a range of aspect ratios, sizes, and quadrature tolerance.
Configuring Detection ¶
- VNDetectRectanglesRequest.MinimumAspectRatio: A `float` specifying the minimum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
- VNDetectRectanglesRequest.SetMinimumAspectRatio
- VNDetectRectanglesRequest.MaximumAspectRatio: A `float` specifying the maximum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
- VNDetectRectanglesRequest.SetMaximumAspectRatio
- VNDetectRectanglesRequest.QuadratureTolerance: A float specifying the number of degrees a rectangle corner angle can deviate from 90°.
- VNDetectRectanglesRequest.SetQuadratureTolerance
- VNDetectRectanglesRequest.MinimumSize: The minimum size of a rectangle to detect, as a proportion of the smallest dimension.
- VNDetectRectanglesRequest.SetMinimumSize
- VNDetectRectanglesRequest.MinimumConfidence: A value specifying the minimum acceptable confidence level.
- VNDetectRectanglesRequest.SetMinimumConfidence
- VNDetectRectanglesRequest.MaximumObservations: An integer specifying the maximum number of rectangles Vision returns.
- VNDetectRectanglesRequest.SetMaximumObservations
Identifying Request Revisions ¶
- VNDetectRectanglesRequest.VNDetectRectanglesRequestRevision1: A constant for specifying revision 1 of the rectangle detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest
func NewDetectRectanglesRequestWithCompletionHandler ¶
func NewDetectRectanglesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectRectanglesRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectRectanglesRequest ¶
func NewVNDetectRectanglesRequest() VNDetectRectanglesRequest
NewVNDetectRectanglesRequest creates a new VNDetectRectanglesRequest instance.
func VNDetectRectanglesRequestFromID ¶
func VNDetectRectanglesRequestFromID(id objc.ID) VNDetectRectanglesRequest
VNDetectRectanglesRequestFromID constructs a VNDetectRectanglesRequest from an objc.ID.
An image-analysis request that finds projected rectangular regions in an image.
func (VNDetectRectanglesRequest) Autorelease ¶
func (d VNDetectRectanglesRequest) Autorelease() VNDetectRectanglesRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectRectanglesRequest) Init ¶
func (d VNDetectRectanglesRequest) Init() VNDetectRectanglesRequest
Init initializes the instance.
func (VNDetectRectanglesRequest) MaximumAspectRatio ¶
func (d VNDetectRectanglesRequest) MaximumAspectRatio() VNAspectRatio
A `float` specifying the maximum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
Discussion ¶
The value should range from `0.0` to `1.0`, inclusive. The default value is `0.5`.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest/maximumAspectRatio
func (VNDetectRectanglesRequest) MaximumObservations ¶
func (d VNDetectRectanglesRequest) MaximumObservations() uint
An integer specifying the maximum number of rectangles Vision returns.
Discussion ¶
The default value is `1`.
Setting this property to `0` allows Vision algorithms to return an unlimited number of observations.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest/maximumObservations
func (VNDetectRectanglesRequest) MinimumAspectRatio ¶
func (d VNDetectRectanglesRequest) MinimumAspectRatio() VNAspectRatio
A `float` specifying the minimum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.
Discussion ¶
The value should range from `0.0` to `1.0`, inclusive. The default value is `0.5`.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest/minimumAspectRatio
func (VNDetectRectanglesRequest) MinimumConfidence ¶
func (d VNDetectRectanglesRequest) MinimumConfidence() VNConfidence
A value specifying the minimum acceptable confidence level.
Discussion ¶
Vision won’t return rectangles with a confidence score lower than the specified minimum.
The confidence score ranges from `0.0` to `1.0`, inclusive, where `0.0` represents no confidence, and `1.0` represents full confidence.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest/minimumConfidence
func (VNDetectRectanglesRequest) MinimumSize ¶
func (d VNDetectRectanglesRequest) MinimumSize() float32
The minimum size of a rectangle to detect, as a proportion of the smallest dimension.
Discussion ¶
The value should range from `0.0` to `1.0` inclusive. The default minimum size is `0.2`.
Any smaller rectangles that Vision may have detected aren’t returned.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest/minimumSize
func (VNDetectRectanglesRequest) QuadratureTolerance ¶
func (d VNDetectRectanglesRequest) QuadratureTolerance() VNDegrees
A float specifying the number of degrees a rectangle corner angle can deviate from 90°.
Discussion ¶
The tolerance value should range from `0` to `45`, inclusive. The default tolerance is `30`.
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest/quadratureTolerance
func (VNDetectRectanglesRequest) SetMaximumAspectRatio ¶
func (d VNDetectRectanglesRequest) SetMaximumAspectRatio(value VNAspectRatio)
func (VNDetectRectanglesRequest) SetMaximumObservations ¶
func (d VNDetectRectanglesRequest) SetMaximumObservations(value uint)
func (VNDetectRectanglesRequest) SetMinimumAspectRatio ¶
func (d VNDetectRectanglesRequest) SetMinimumAspectRatio(value VNAspectRatio)
func (VNDetectRectanglesRequest) SetMinimumConfidence ¶
func (d VNDetectRectanglesRequest) SetMinimumConfidence(value VNConfidence)
func (VNDetectRectanglesRequest) SetMinimumSize ¶
func (d VNDetectRectanglesRequest) SetMinimumSize(value float32)
func (VNDetectRectanglesRequest) SetQuadratureTolerance ¶
func (d VNDetectRectanglesRequest) SetQuadratureTolerance(value VNDegrees)
func (VNDetectRectanglesRequest) VNDetectRectanglesRequestRevision1 ¶
func (d VNDetectRectanglesRequest) VNDetectRectanglesRequestRevision1() int
A constant for specifying revision 1 of the rectangle detection request.
See: https://developer.apple.com/documentation/vision/vndetectrectanglesrequestrevision1
type VNDetectRectanglesRequestClass ¶
type VNDetectRectanglesRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectRectanglesRequestClass ¶
func GetVNDetectRectanglesRequestClass() VNDetectRectanglesRequestClass
GetVNDetectRectanglesRequestClass returns the class object for VNDetectRectanglesRequest.
func (VNDetectRectanglesRequestClass) Alloc ¶
func (vc VNDetectRectanglesRequestClass) Alloc() VNDetectRectanglesRequest
Alloc allocates memory for a new instance of the class.
type VNDetectTextRectanglesRequest ¶
type VNDetectTextRectanglesRequest struct {
VNImageBasedRequest
}
An image-analysis request that finds regions of visible text in an image.
Overview ¶
This request returns detected text characters as rectangular bounding boxes with origin and size.
Configuring a Request ¶
- VNDetectTextRectanglesRequest.ReportCharacterBoxes: A Boolean value that indicates whether the request detects character bounding boxes.
- VNDetectTextRectanglesRequest.SetReportCharacterBoxes
Identifying Request Revisions ¶
- VNDetectTextRectanglesRequest.VNDetectTextRectanglesRequestRevision1: A constant for specifying revision 1 of the text rectangles detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectTextRectanglesRequest
func NewDetectTextRectanglesRequestWithCompletionHandler ¶
func NewDetectTextRectanglesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectTextRectanglesRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectTextRectanglesRequest ¶
func NewVNDetectTextRectanglesRequest() VNDetectTextRectanglesRequest
NewVNDetectTextRectanglesRequest creates a new VNDetectTextRectanglesRequest instance.
func VNDetectTextRectanglesRequestFromID ¶
func VNDetectTextRectanglesRequestFromID(id objc.ID) VNDetectTextRectanglesRequest
VNDetectTextRectanglesRequestFromID constructs a VNDetectTextRectanglesRequest from an objc.ID.
An image-analysis request that finds regions of visible text in an image.
func (VNDetectTextRectanglesRequest) Autorelease ¶
func (d VNDetectTextRectanglesRequest) Autorelease() VNDetectTextRectanglesRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectTextRectanglesRequest) Init ¶
func (d VNDetectTextRectanglesRequest) Init() VNDetectTextRectanglesRequest
Init initializes the instance.
func (VNDetectTextRectanglesRequest) ReportCharacterBoxes ¶
func (d VNDetectTextRectanglesRequest) ReportCharacterBoxes() bool
A Boolean value that indicates whether the request detects character bounding boxes.
Discussion ¶
Set the value to true to have the detector return character bounding boxes as an array of VNRectangleObservation objects.
See: https://developer.apple.com/documentation/Vision/VNDetectTextRectanglesRequest/reportCharacterBoxes
func (VNDetectTextRectanglesRequest) SetReportCharacterBoxes ¶
func (d VNDetectTextRectanglesRequest) SetReportCharacterBoxes(value bool)
func (VNDetectTextRectanglesRequest) VNDetectTextRectanglesRequestRevision1 ¶
func (d VNDetectTextRectanglesRequest) VNDetectTextRectanglesRequestRevision1() int
A constant for specifying revision 1 of the text rectangles detection request.
See: https://developer.apple.com/documentation/vision/vndetecttextrectanglesrequestrevision1
type VNDetectTextRectanglesRequestClass ¶
type VNDetectTextRectanglesRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectTextRectanglesRequestClass ¶
func GetVNDetectTextRectanglesRequestClass() VNDetectTextRectanglesRequestClass
GetVNDetectTextRectanglesRequestClass returns the class object for VNDetectTextRectanglesRequest.
func (VNDetectTextRectanglesRequestClass) Alloc ¶
func (vc VNDetectTextRectanglesRequestClass) Alloc() VNDetectTextRectanglesRequest
Alloc allocates memory for a new instance of the class.
type VNDetectTrajectoriesRequest ¶
type VNDetectTrajectoriesRequest struct {
VNStatefulRequest
}
A request that detects the trajectories of shapes moving along a parabolic path.
Overview ¶
After the request detects a trajectory, it produces an observation that contains the shape’s detected points and an equation describing the parabola.
Creating a Request ¶
- VNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler: Creates a new request to detect trajectories.
Configuring the Request ¶
- VNDetectTrajectoriesRequest.TargetFrameTime: The requested target frame time for processing trajectory detection.
- VNDetectTrajectoriesRequest.SetTargetFrameTime
- VNDetectTrajectoriesRequest.TrajectoryLength: The number of points to detect before calculating a trajectory.
- VNDetectTrajectoriesRequest.ObjectMinimumNormalizedRadius: The minimum radius of the bounding circle of the object to track.
- VNDetectTrajectoriesRequest.SetObjectMinimumNormalizedRadius
- VNDetectTrajectoriesRequest.ObjectMaximumNormalizedRadius: The maximum radius of the bounding circle of the object to track.
- VNDetectTrajectoriesRequest.SetObjectMaximumNormalizedRadius
Identifying Request Revisions ¶
- VNDetectTrajectoriesRequest.VNDetectTrajectoriesRequestRevision1: A constant for specifying revision 1 of the trajectories detection request.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest
func NewDetectTrajectoriesRequestWithCompletionHandler ¶
func NewDetectTrajectoriesRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNDetectTrajectoriesRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNDetectTrajectoriesRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler ¶
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing objectivec.IObject, trajectoryLength int, completionHandler VNRequestCompletionHandler) VNDetectTrajectoriesRequest
Creates a new request to detect trajectories.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
trajectoryLength: The number of points required to analyze to determine that a shape follows a parabolic path. This argument value must be at least 5.
completionHandler: A closure that’s invoked after the request completes its processing. The system invokes the completion handler on the same dispatch queue that the request uses to perform its processing.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest/init(frameAnalysisSpacing:trajectoryLength:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNDetectTrajectoriesRequest ¶
func NewVNDetectTrajectoriesRequest() VNDetectTrajectoriesRequest
NewVNDetectTrajectoriesRequest creates a new VNDetectTrajectoriesRequest instance.
func VNDetectTrajectoriesRequestFromID ¶
func VNDetectTrajectoriesRequestFromID(id objc.ID) VNDetectTrajectoriesRequest
VNDetectTrajectoriesRequestFromID constructs a VNDetectTrajectoriesRequest from an objc.ID.
A request that detects the trajectories of shapes moving along a parabolic path.
func (VNDetectTrajectoriesRequest) Autorelease ¶
func (d VNDetectTrajectoriesRequest) Autorelease() VNDetectTrajectoriesRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectTrajectoriesRequest) Init ¶
func (d VNDetectTrajectoriesRequest) Init() VNDetectTrajectoriesRequest
Init initializes the instance.
func (VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler ¶
func (d VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing objectivec.IObject, trajectoryLength int, completionHandler ErrorHandler) VNDetectTrajectoriesRequest
Creates a new request to detect trajectories.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
trajectoryLength: The number of points required to analyze to determine that a shape follows a parabolic path. This argument value must be at least 5.
completionHandler: A closure that’s invoked after the request completes its processing. The system invokes the completion handler on the same dispatch queue that the request uses to perform its processing.
frameAnalysisSpacing is a [coremedia.CMTime].
func (VNDetectTrajectoriesRequest) ObjectMaximumNormalizedRadius ¶
func (d VNDetectTrajectoriesRequest) ObjectMaximumNormalizedRadius() float32
The maximum radius of the bounding circle of the object to track.
func (VNDetectTrajectoriesRequest) ObjectMinimumNormalizedRadius ¶
func (d VNDetectTrajectoriesRequest) ObjectMinimumNormalizedRadius() float32
The minimum radius of the bounding circle of the object to track.
func (VNDetectTrajectoriesRequest) SetObjectMaximumNormalizedRadius ¶
func (d VNDetectTrajectoriesRequest) SetObjectMaximumNormalizedRadius(value float32)
func (VNDetectTrajectoriesRequest) SetObjectMinimumNormalizedRadius ¶
func (d VNDetectTrajectoriesRequest) SetObjectMinimumNormalizedRadius(value float32)
func (VNDetectTrajectoriesRequest) SetTargetFrameTime ¶
func (d VNDetectTrajectoriesRequest) SetTargetFrameTime(value objectivec.IObject)
func (VNDetectTrajectoriesRequest) TargetFrameTime ¶
func (d VNDetectTrajectoriesRequest) TargetFrameTime() objectivec.IObject
The requested target frame time for processing trajectory detection.
Discussion ¶
Use this property value for real-time processing of frames, which requires execution within a specific amount of time. The request evaluates from frame-to-frame. If processing takes longer than the targeted time for the current frame, it attempts to decrease the overall time by reducing the accuracy (down to a set minimum) for the next frame. If a frame takes less time than the targeted time, the request increases the accuracy (up to a set maximum) of the next frame.
The default value is indefinite, which indicates that accuracy stays at the predefined maximum.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest/targetFrameTime
func (VNDetectTrajectoriesRequest) TrajectoryLength ¶
func (d VNDetectTrajectoriesRequest) TrajectoryLength() int
The number of points to detect before calculating a trajectory.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest/trajectoryLength
func (VNDetectTrajectoriesRequest) VNDetectTrajectoriesRequestRevision1 ¶
func (d VNDetectTrajectoriesRequest) VNDetectTrajectoriesRequestRevision1() int
A constant for specifying revision 1 of the trajectories detection request.
See: https://developer.apple.com/documentation/vision/vndetecttrajectoriesrequestrevision1
type VNDetectTrajectoriesRequestClass ¶
type VNDetectTrajectoriesRequestClass struct {
// contains filtered or unexported fields
}
func GetVNDetectTrajectoriesRequestClass ¶
func GetVNDetectTrajectoriesRequestClass() VNDetectTrajectoriesRequestClass
GetVNDetectTrajectoriesRequestClass returns the class object for VNDetectTrajectoriesRequest.
func (VNDetectTrajectoriesRequestClass) Alloc ¶
func (vc VNDetectTrajectoriesRequestClass) Alloc() VNDetectTrajectoriesRequest
Alloc allocates memory for a new instance of the class.
type VNDetectedObjectObservation ¶
type VNDetectedObjectObservation struct {
VNObservation
}
An observation that provides the position and extent of an image feature that an image- analysis request detects.
Overview ¶
This class is the observation type that VNTrackObjectRequest generates. It represents an object that the Vision request detects and tracks.
Locating a Detected Object ¶
- VNDetectedObjectObservation.BoundingBox: The bounding box of the object that the request detects.
Accessing an Image Mask ¶
- VNDetectedObjectObservation.GlobalSegmentationMask: A resulting pixel buffer from a request to generate a segmentation mask for an image.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation
func NewDetectedObjectObservationWithBoundingBox ¶
func NewDetectedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNDetectedObjectObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewDetectedObjectObservationWithRequestRevisionBoundingBox ¶
func NewDetectedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNDetectedObjectObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewVNDetectedObjectObservation ¶
func NewVNDetectedObjectObservation() VNDetectedObjectObservation
NewVNDetectedObjectObservation creates a new VNDetectedObjectObservation instance.
func VNDetectedObjectObservationFromID ¶
func VNDetectedObjectObservationFromID(id objc.ID) VNDetectedObjectObservation
VNDetectedObjectObservationFromID constructs a VNDetectedObjectObservation from an objc.ID.
An observation that provides the position and extent of an image feature that an image- analysis request detects.
func (VNDetectedObjectObservation) Autorelease ¶
func (d VNDetectedObjectObservation) Autorelease() VNDetectedObjectObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectedObjectObservation) BoundingBox ¶
func (d VNDetectedObjectObservation) BoundingBox() corefoundation.CGRect
The bounding box of the object that the request detects.
Discussion ¶
The system normalizes the coordinates to the dimensions of the processed image, with the origin at the lower-left corner of the image.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/boundingBox
func (VNDetectedObjectObservation) GlobalSegmentationMask ¶
func (d VNDetectedObjectObservation) GlobalSegmentationMask() IVNPixelBufferObservation
A resulting pixel buffer from a request to generate a segmentation mask for an image.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/globalSegmentationMask
func (VNDetectedObjectObservation) Init ¶
func (d VNDetectedObjectObservation) Init() VNDetectedObjectObservation
Init initializes the instance.
type VNDetectedObjectObservationClass ¶
type VNDetectedObjectObservationClass struct {
// contains filtered or unexported fields
}
func GetVNDetectedObjectObservationClass ¶
func GetVNDetectedObjectObservationClass() VNDetectedObjectObservationClass
GetVNDetectedObjectObservationClass returns the class object for VNDetectedObjectObservation.
func (VNDetectedObjectObservationClass) Alloc ¶
func (vc VNDetectedObjectObservationClass) Alloc() VNDetectedObjectObservation
Alloc allocates memory for a new instance of the class.
type VNDetectedPoint ¶
type VNDetectedPoint struct {
VNPoint
}
An object that represents a normalized point in an image, along with a confidence value.
Inspecting a Point ¶
- VNDetectedPoint.Confidence: A confidence score that indicates the detected point’s accuracy.
See: https://developer.apple.com/documentation/Vision/VNDetectedPoint
func NewDetectedPointWithLocation ¶
func NewDetectedPointWithLocation(location corefoundation.CGPoint) VNDetectedPoint
Creates a point object from the specified Core Graphics point.
location: The Core Graphics point.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(location:)
func NewDetectedPointWithXY ¶
func NewDetectedPointWithXY(x float64, y float64) VNDetectedPoint
Creates a point object with the specified coordinates.
x: The x-coordinate value.
y: The y-coordinate value.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(x:y:)
func NewVNDetectedPoint ¶
func NewVNDetectedPoint() VNDetectedPoint
NewVNDetectedPoint creates a new VNDetectedPoint instance.
func VNDetectedPointFromID ¶
func VNDetectedPointFromID(id objc.ID) VNDetectedPoint
VNDetectedPointFromID constructs a VNDetectedPoint from an objc.ID.
An object that represents a normalized point in an image, along with a confidence value.
func (VNDetectedPoint) Autorelease ¶
func (d VNDetectedPoint) Autorelease() VNDetectedPoint
Autorelease adds the receiver to the current autorelease pool.
func (VNDetectedPoint) Confidence ¶
func (d VNDetectedPoint) Confidence() VNConfidence
A confidence score that indicates the detected point’s accuracy.
See: https://developer.apple.com/documentation/Vision/VNDetectedPoint/confidence
func (VNDetectedPoint) Init ¶
func (d VNDetectedPoint) Init() VNDetectedPoint
Init initializes the instance.
type VNDetectedPointClass ¶
type VNDetectedPointClass struct {
// contains filtered or unexported fields
}
func GetVNDetectedPointClass ¶
func GetVNDetectedPointClass() VNDetectedPointClass
GetVNDetectedPointClass returns the class object for VNDetectedPoint.
func (VNDetectedPointClass) Alloc ¶
func (vc VNDetectedPointClass) Alloc() VNDetectedPoint
Alloc allocates memory for a new instance of the class.
type VNElementType ¶
type VNElementType int
See: https://developer.apple.com/documentation/Vision/VNElementType
const ( // VNElementTypeDouble: The elements are double-precision floating-point numbers. VNElementTypeDouble VNElementType = 2 // VNElementTypeFloat: The elements are floating-point numbers. VNElementTypeFloat VNElementType = 1 // VNElementTypeUnknown: The element type isn’t known. VNElementTypeUnknown VNElementType = 0 )
func (VNElementType) String ¶
func (e VNElementType) String() string
type VNErrorCode ¶
type VNErrorCode int
See: https://developer.apple.com/documentation/Vision/VNErrorCode
const ( VNErrorDataUnavailable VNErrorCode = 17 // VNErrorIOError: An I/O error for an image, image sequence, or Core ML model. VNErrorIOError VNErrorCode = 6 // VNErrorInternalError: An internal error occurred within the framework. VNErrorInternalError VNErrorCode = 9 // VNErrorInvalidArgument: An app passed an invalid parameter to a request. VNErrorInvalidArgument VNErrorCode = 14 // VNErrorInvalidFormat: The format of the image is invalid. VNErrorInvalidFormat VNErrorCode = 2 // VNErrorInvalidImage: The image is invalid. VNErrorInvalidImage VNErrorCode = 13 // VNErrorInvalidModel: The Core ML model is incompatible with the request. VNErrorInvalidModel VNErrorCode = 15 // VNErrorInvalidOperation: An app requested an unsupported operation. VNErrorInvalidOperation VNErrorCode = 12 // VNErrorInvalidOption: An app specified an invalid option on a request. VNErrorInvalidOption VNErrorCode = 5 // VNErrorMissingOption: A request is missing a required option. VNErrorMissingOption VNErrorCode = 7 // VNErrorNotImplemented: The method isn’t implemented in the underlying model. VNErrorNotImplemented VNErrorCode = 8 // VNErrorOK: The operation finished without error. VNErrorOK VNErrorCode = 0 // VNErrorOperationFailed: The requested operation failed. VNErrorOperationFailed VNErrorCode = 3 // VNErrorOutOfBoundsError: An app attempted to access data that’s out-of-bounds. VNErrorOutOfBoundsError VNErrorCode = 4 // VNErrorOutOfMemory: The system doesn’t have enough memory to complete the request. VNErrorOutOfMemory VNErrorCode = 10 // VNErrorRequestCancelled: An app canceled the request. VNErrorRequestCancelled VNErrorCode = 1 // VNErrorTimeStampNotFound: The system can’t find a timestamp. VNErrorTimeStampNotFound VNErrorCode = 18 // VNErrorTimeout: The requested operation timed out. VNErrorTimeout VNErrorCode = 20 // VNErrorTuriCoreErrorCode: An error occurred during Create ML training due to an invalid transformation or image. VNErrorTuriCoreErrorCode VNErrorCode = -1 // VNErrorUnknownError: An unidentified error occurred. VNErrorUnknownError VNErrorCode = 11 // VNErrorUnsupportedComputeDevice: An app requested an unsupported compute device. VNErrorUnsupportedComputeDevice VNErrorCode = 22 // VNErrorUnsupportedComputeStage: An app requested an unsupported compute stage. VNErrorUnsupportedComputeStage VNErrorCode = 21 // VNErrorUnsupportedRequest: An app attempted an unsupported request. VNErrorUnsupportedRequest VNErrorCode = 19 // VNErrorUnsupportedRevision: An app specified an unsupported request revision. VNErrorUnsupportedRevision VNErrorCode = 16 )
func (VNErrorCode) String ¶
func (e VNErrorCode) String() string
type VNFaceLandmarkRegion ¶
type VNFaceLandmarkRegion struct {
objectivec.Object
}
The abstract superclass for information about a specific face landmark.
Instance Properties ¶
- VNFaceLandmarkRegion.PointCount: The number of points in the face region.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion
func NewVNFaceLandmarkRegion ¶
func NewVNFaceLandmarkRegion() VNFaceLandmarkRegion
NewVNFaceLandmarkRegion creates a new VNFaceLandmarkRegion instance.
func VNFaceLandmarkRegionFromID ¶
func VNFaceLandmarkRegionFromID(id objc.ID) VNFaceLandmarkRegion
VNFaceLandmarkRegionFromID constructs a VNFaceLandmarkRegion from an objc.ID.
The abstract superclass for information about a specific face landmark.
func (VNFaceLandmarkRegion) Autorelease ¶
func (f VNFaceLandmarkRegion) Autorelease() VNFaceLandmarkRegion
Autorelease adds the receiver to the current autorelease pool.
func (VNFaceLandmarkRegion) EncodeWithCoder ¶
func (f VNFaceLandmarkRegion) EncodeWithCoder(coder foundation.INSCoder)
func (VNFaceLandmarkRegion) Init ¶
func (f VNFaceLandmarkRegion) Init() VNFaceLandmarkRegion
Init initializes the instance.
func (VNFaceLandmarkRegion) Landmarks ¶
func (f VNFaceLandmarkRegion) Landmarks() IVNFaceLandmarks2D
The facial features of the detected face.
See: https://developer.apple.com/documentation/vision/vnfaceobservation/landmarks
func (VNFaceLandmarkRegion) PointCount ¶
func (f VNFaceLandmarkRegion) PointCount() uint
The number of points in the face region.
Discussion ¶
The value is zero if no points for a region could be found.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion/pointCount
func (VNFaceLandmarkRegion) RequestRevision ¶
func (f VNFaceLandmarkRegion) RequestRevision() uint
The revision of the VNRequest subclass used to generate the implementing object.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
func (VNFaceLandmarkRegion) SetLandmarks ¶
func (f VNFaceLandmarkRegion) SetLandmarks(value IVNFaceLandmarks2D)
type VNFaceLandmarkRegion2D ¶
type VNFaceLandmarkRegion2D struct {
VNFaceLandmarkRegion
}
2D geometry information for a specific facial feature.
Overview ¶
This class represents the set of all facial landmark regions in 2D, exposed as properties.
Describing Region Points ¶
- VNFaceLandmarkRegion2D.PointsClassification: An enumeration that describes how to interpret the points the region provides.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D
func NewVNFaceLandmarkRegion2D ¶
func NewVNFaceLandmarkRegion2D() VNFaceLandmarkRegion2D
NewVNFaceLandmarkRegion2D creates a new VNFaceLandmarkRegion2D instance.
func VNFaceLandmarkRegion2DFromID ¶
func VNFaceLandmarkRegion2DFromID(id objc.ID) VNFaceLandmarkRegion2D
VNFaceLandmarkRegion2DFromID constructs a VNFaceLandmarkRegion2D from an objc.ID.
2D geometry information for a specific facial feature.
func (VNFaceLandmarkRegion2D) Autorelease ¶
func (f VNFaceLandmarkRegion2D) Autorelease() VNFaceLandmarkRegion2D
Autorelease adds the receiver to the current autorelease pool.
func (VNFaceLandmarkRegion2D) Init ¶
func (f VNFaceLandmarkRegion2D) Init() VNFaceLandmarkRegion2D
Init initializes the instance.
func (VNFaceLandmarkRegion2D) NormalizedPoints ¶
func (f VNFaceLandmarkRegion2D) NormalizedPoints() *corefoundation.CGPoint
A buffer in memory containing normalized landmark points.
Discussion ¶
This pointer points to the address of a buffer containing CGPoint structs representing landmark points.
The target object owns this buffer, which is guaranteed to exist as long as the corresponding VNFaceLandmarkRegion2D exists.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D/normalizedPoints-1o38f
func (VNFaceLandmarkRegion2D) PointsClassification ¶
func (f VNFaceLandmarkRegion2D) PointsClassification() VNPointsClassification
An enumeration that describes how to interpret the points the region provides.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D/pointsClassification
func (VNFaceLandmarkRegion2D) PointsInImageOfSize ¶
func (f VNFaceLandmarkRegion2D) PointsInImageOfSize(imageSize corefoundation.CGSize) *corefoundation.CGPoint
A buffer in memory containing landmark points in the coordinate space of the specified image size.
imageSize: The pixel dimensions of the image in which to present landmark points.
Return Value ¶
A pointer to a buffer containing a CGPoint for each landmark detected in the image, expressed in the coordinate space of the specified image size.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D/pointsInImageOfSize:
func (VNFaceLandmarkRegion2D) PrecisionEstimatesPerPoint ¶
func (f VNFaceLandmarkRegion2D) PrecisionEstimatesPerPoint() []foundation.NSNumber
An array of precision estimates for each landmark point.
Discussion ¶
This property is only populated when you configure your VNDetectFaceLandmarksRequest object with [RequestFaceLandmarksConstellation76Points]. For other constellation types, this array is set to `nil`.
type VNFaceLandmarkRegion2DClass ¶
type VNFaceLandmarkRegion2DClass struct {
// contains filtered or unexported fields
}
func GetVNFaceLandmarkRegion2DClass ¶
func GetVNFaceLandmarkRegion2DClass() VNFaceLandmarkRegion2DClass
GetVNFaceLandmarkRegion2DClass returns the class object for VNFaceLandmarkRegion2D.
func (VNFaceLandmarkRegion2DClass) Alloc ¶
func (vc VNFaceLandmarkRegion2DClass) Alloc() VNFaceLandmarkRegion2D
Alloc allocates memory for a new instance of the class.
type VNFaceLandmarkRegionClass ¶
type VNFaceLandmarkRegionClass struct {
// contains filtered or unexported fields
}
func GetVNFaceLandmarkRegionClass ¶
func GetVNFaceLandmarkRegionClass() VNFaceLandmarkRegionClass
GetVNFaceLandmarkRegionClass returns the class object for VNFaceLandmarkRegion.
func (VNFaceLandmarkRegionClass) Alloc ¶
func (vc VNFaceLandmarkRegionClass) Alloc() VNFaceLandmarkRegion
Alloc allocates memory for a new instance of the class.
type VNFaceLandmarks ¶
type VNFaceLandmarks struct {
objectivec.Object
}
The abstract superclass for containers of face landmark information.
Overview ¶
This class represents the set of all detectable facial landmarks and regions, exposed as properties.
Determining Accuracy ¶
- VNFaceLandmarks.Confidence: A confidence estimate for the detected landmarks.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks
func NewVNFaceLandmarks ¶
func NewVNFaceLandmarks() VNFaceLandmarks
NewVNFaceLandmarks creates a new VNFaceLandmarks instance.
func VNFaceLandmarksFromID ¶
func VNFaceLandmarksFromID(id objc.ID) VNFaceLandmarks
VNFaceLandmarksFromID constructs a VNFaceLandmarks from an objc.ID.
The abstract superclass for containers of face landmark information.
func (VNFaceLandmarks) Autorelease ¶
func (f VNFaceLandmarks) Autorelease() VNFaceLandmarks
Autorelease adds the receiver to the current autorelease pool.
func (VNFaceLandmarks) Confidence ¶
func (f VNFaceLandmarks) Confidence() VNConfidence
A confidence estimate for the detected landmarks.
Discussion ¶
A value of `0` indicates no confidence. A value of `1` indicates full confidence.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks/confidence
func (VNFaceLandmarks) EncodeWithCoder ¶
func (f VNFaceLandmarks) EncodeWithCoder(coder foundation.INSCoder)
func (VNFaceLandmarks) Init ¶
func (f VNFaceLandmarks) Init() VNFaceLandmarks
Init initializes the instance.
func (VNFaceLandmarks) Landmarks ¶
func (f VNFaceLandmarks) Landmarks() IVNFaceLandmarks2D
The facial features of the detected face.
See: https://developer.apple.com/documentation/vision/vnfaceobservation/landmarks
func (VNFaceLandmarks) RequestRevision ¶
func (f VNFaceLandmarks) RequestRevision() uint
The revision of the VNRequest subclass used to generate the implementing object.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
func (VNFaceLandmarks) SetLandmarks ¶
func (f VNFaceLandmarks) SetLandmarks(value IVNFaceLandmarks2D)
type VNFaceLandmarks2D ¶
type VNFaceLandmarks2D struct {
VNFaceLandmarks
}
A collection of facial features that a request detects.
Overview ¶
This class represents the set of all detectable 2D face landmarks and regions, exposed as properties. The coordinates of the face landmarks are normalized to the dimensions of the face observation’s VNFaceLandmarks2D.BoundingBox, with the origin at the bounding box’s lower-left corner. Use the VNImagePointForFaceLandmarkPoint function to convert normalized face landmark points into absolute points within the image’s coordinate system.
Face Landmark Points ¶
- VNFaceLandmarks2D.AllPoints: The region containing all face landmark points.
- VNFaceLandmarks2D.FaceContour: The region containing points that trace the face contour from the left cheek, over the chin, to the right cheek.
- VNFaceLandmarks2D.LeftEye: The region containing points that outline the left eye.
- VNFaceLandmarks2D.RightEye: The region containing points that outline the right eye.
- VNFaceLandmarks2D.LeftEyebrow: The region containing points that trace the left eyebrow.
- VNFaceLandmarks2D.RightEyebrow: The region containing points that trace the right eyebrow.
- VNFaceLandmarks2D.Nose: The region containing points that outline the nose.
- VNFaceLandmarks2D.NoseCrest: The region containing points that trace the center crest of the nose.
- VNFaceLandmarks2D.MedianLine: The region containing points that trace a vertical line down the center of the face.
- VNFaceLandmarks2D.OuterLips: The region containing points that outline the outside of the lips.
- VNFaceLandmarks2D.InnerLips: The region containing points that outline the space between the lips.
- VNFaceLandmarks2D.LeftPupil: The region containing the point where the left pupil is located.
- VNFaceLandmarks2D.RightPupil: The region containing the point where the right pupil is located.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D
func NewVNFaceLandmarks2D ¶
func NewVNFaceLandmarks2D() VNFaceLandmarks2D
NewVNFaceLandmarks2D creates a new VNFaceLandmarks2D instance.
func VNFaceLandmarks2DFromID ¶
func VNFaceLandmarks2DFromID(id objc.ID) VNFaceLandmarks2D
VNFaceLandmarks2DFromID constructs a VNFaceLandmarks2D from an objc.ID.
A collection of facial features that a request detects.
func (VNFaceLandmarks2D) AllPoints ¶
func (f VNFaceLandmarks2D) AllPoints() IVNFaceLandmarkRegion2D
The region containing all face landmark points.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/allPoints
func (VNFaceLandmarks2D) Autorelease ¶
func (f VNFaceLandmarks2D) Autorelease() VNFaceLandmarks2D
Autorelease adds the receiver to the current autorelease pool.
func (VNFaceLandmarks2D) BoundingBox ¶
func (f VNFaceLandmarks2D) BoundingBox() corefoundation.CGRect
The bounding box of the object that the request detects.
See: https://developer.apple.com/documentation/vision/vndetectedobjectobservation/boundingbox
func (VNFaceLandmarks2D) FaceContour ¶
func (f VNFaceLandmarks2D) FaceContour() IVNFaceLandmarkRegion2D
The region containing points that trace the face contour from the left cheek, over the chin, to the right cheek.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/faceContour
func (VNFaceLandmarks2D) Init ¶
func (f VNFaceLandmarks2D) Init() VNFaceLandmarks2D
Init initializes the instance.
func (VNFaceLandmarks2D) InnerLips ¶
func (f VNFaceLandmarks2D) InnerLips() IVNFaceLandmarkRegion2D
The region containing points that outline the space between the lips.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/innerLips
func (VNFaceLandmarks2D) LeftEye ¶
func (f VNFaceLandmarks2D) LeftEye() IVNFaceLandmarkRegion2D
The region containing points that outline the left eye.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/leftEye
func (VNFaceLandmarks2D) LeftEyebrow ¶
func (f VNFaceLandmarks2D) LeftEyebrow() IVNFaceLandmarkRegion2D
The region containing points that trace the left eyebrow.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/leftEyebrow
func (VNFaceLandmarks2D) LeftPupil ¶
func (f VNFaceLandmarks2D) LeftPupil() IVNFaceLandmarkRegion2D
The region containing the point where the left pupil is located.
Discussion ¶
This value may be inaccurate if the eye is blinking.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/leftPupil
func (VNFaceLandmarks2D) MedianLine ¶
func (f VNFaceLandmarks2D) MedianLine() IVNFaceLandmarkRegion2D
The region containing points that trace a vertical line down the center of the face.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/medianLine
func (VNFaceLandmarks2D) Nose ¶
func (f VNFaceLandmarks2D) Nose() IVNFaceLandmarkRegion2D
The region containing points that outline the nose.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/nose
func (VNFaceLandmarks2D) NoseCrest ¶
func (f VNFaceLandmarks2D) NoseCrest() IVNFaceLandmarkRegion2D
The region containing points that trace the center crest of the nose.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/noseCrest
func (VNFaceLandmarks2D) OuterLips ¶
func (f VNFaceLandmarks2D) OuterLips() IVNFaceLandmarkRegion2D
The region containing points that outline the outside of the lips.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/outerLips
func (VNFaceLandmarks2D) RightEye ¶
func (f VNFaceLandmarks2D) RightEye() IVNFaceLandmarkRegion2D
The region containing points that outline the right eye.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/rightEye
func (VNFaceLandmarks2D) RightEyebrow ¶
func (f VNFaceLandmarks2D) RightEyebrow() IVNFaceLandmarkRegion2D
The region containing points that trace the right eyebrow.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/rightEyebrow
func (VNFaceLandmarks2D) RightPupil ¶
func (f VNFaceLandmarks2D) RightPupil() IVNFaceLandmarkRegion2D
The region containing the point where the right pupil is located.
Discussion ¶
This value may be inaccurate if the eye is blinking.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks2D/rightPupil
func (VNFaceLandmarks2D) SetBoundingBox ¶
func (f VNFaceLandmarks2D) SetBoundingBox(value corefoundation.CGRect)
type VNFaceLandmarks2DClass ¶
type VNFaceLandmarks2DClass struct {
// contains filtered or unexported fields
}
func GetVNFaceLandmarks2DClass ¶
func GetVNFaceLandmarks2DClass() VNFaceLandmarks2DClass
GetVNFaceLandmarks2DClass returns the class object for VNFaceLandmarks2D.
func (VNFaceLandmarks2DClass) Alloc ¶
func (vc VNFaceLandmarks2DClass) Alloc() VNFaceLandmarks2D
Alloc allocates memory for a new instance of the class.
type VNFaceLandmarksClass ¶
type VNFaceLandmarksClass struct {
// contains filtered or unexported fields
}
func GetVNFaceLandmarksClass ¶
func GetVNFaceLandmarksClass() VNFaceLandmarksClass
GetVNFaceLandmarksClass returns the class object for VNFaceLandmarks.
func (VNFaceLandmarksClass) Alloc ¶
func (vc VNFaceLandmarksClass) Alloc() VNFaceLandmarks
Alloc allocates memory for a new instance of the class.
type VNFaceObservation ¶
type VNFaceObservation struct {
VNDetectedObjectObservation
}
Face or facial-feature information that an image analysis request detects.
Overview ¶
This type of observation results from a VNDetectFaceRectanglesRequest. It contains information about facial landmarks and regions it finds in the image.
Identifying Landmarks ¶
- VNFaceObservation.Landmarks: The facial features of the detected face.
Determining Facial Orientation ¶
- VNFaceObservation.Roll: The roll angle of a face in radians.
- VNFaceObservation.Yaw: The yaw angle of a face in radians.
- VNFaceObservation.Pitch: The pitch angle of a face in radians.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation
func NewFaceObservationWithBoundingBox ¶
func NewFaceObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNFaceObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewFaceObservationWithRequestRevisionBoundingBox ¶
func NewFaceObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNFaceObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewFaceObservationWithRequestRevisionBoundingBoxRollYawPitch ¶
func NewFaceObservationWithRequestRevisionBoundingBoxRollYawPitch(requestRevision uint, boundingBox corefoundation.CGRect, roll foundation.NSNumber, yaw foundation.NSNumber, pitch foundation.NSNumber) VNFaceObservation
Creates an observation that contains the roll, yaw, and pitch of the face.
requestRevision: The revision of the request.
boundingBox: The bounding rectangle of the detected face landmark.
roll: The rotational angle of the face landmark around the z-axis.
yaw: The rotational angle of the face landmark around the y-axis.
pitch: The rotational angle of the face landmark around the x-axis.
func NewVNFaceObservation ¶
func NewVNFaceObservation() VNFaceObservation
NewVNFaceObservation creates a new VNFaceObservation instance.
func VNFaceObservationFromID ¶
func VNFaceObservationFromID(id objc.ID) VNFaceObservation
VNFaceObservationFromID constructs a VNFaceObservation from an objc.ID.
Face or facial-feature information that an image analysis request detects.
func (VNFaceObservation) Autorelease ¶
func (f VNFaceObservation) Autorelease() VNFaceObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNFaceObservation) FaceCaptureQuality ¶
func (f VNFaceObservation) FaceCaptureQuality() foundation.NSNumber
A value that indicates the quality of the face capture.
Discussion ¶
The capture quality of the face allows you to compare the quality of the face in terms of its capture attributes: lighting, blur, and prime positioning. Use this value to compare the capture quality of a face against other captures of the same face in a specified set.
The value of this property value ranges from `0.0` to `1.0`. Faces with quality closer to `1.0` are better lit, sharper, and more centrally positioned than faces with quality closer to `0.0`.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation/faceCaptureQuality-2o4xv
func (VNFaceObservation) Init ¶
func (f VNFaceObservation) Init() VNFaceObservation
Init initializes the instance.
func (VNFaceObservation) Landmarks ¶
func (f VNFaceObservation) Landmarks() IVNFaceLandmarks2D
The facial features of the detected face.
Discussion ¶
This value is `nil` for face observations produced by a VNDetectFaceRectanglesRequest analysis. Use the VNDetectFaceLandmarksRequest class to find facial features.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation/landmarks
func (VNFaceObservation) Pitch ¶
func (f VNFaceObservation) Pitch() foundation.NSNumber
The pitch angle of a face in radians.
Discussion ¶
This value indicates the rotational angle of the face around the x-axis.
If the request doesn’t calculate the angle, the value is `nil`.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation/pitch
func (VNFaceObservation) Results ¶
func (f VNFaceObservation) Results() IVNFaceObservation
The results of the face-capture quality request.
See: https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequest/results
func (VNFaceObservation) Roll ¶
func (f VNFaceObservation) Roll() foundation.NSNumber
The roll angle of a face in radians.
Discussion ¶
This value indicates the rotational angle of the face around the z-axis.
If the request doesn’t calculate the angle, the value is `nil`.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation/roll
func (VNFaceObservation) SetResults ¶
func (f VNFaceObservation) SetResults(value IVNFaceObservation)
func (VNFaceObservation) Yaw ¶
func (f VNFaceObservation) Yaw() foundation.NSNumber
The yaw angle of a face in radians.
Discussion ¶
This value indicates the rotational angle of the face around the y-axis.
If the request doesn’t calculate the angle, the value is `nil.`
See: https://developer.apple.com/documentation/Vision/VNFaceObservation/yaw
type VNFaceObservationAccepting ¶
type VNFaceObservationAccepting interface {
objectivec.IObject
// An array of [VNFaceObservation](<doc://Vision/documentation/Vision/VNFaceObservation>) objects to process as part of the request.
//
// See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
InputFaceObservations() []VNFaceObservation
// An array of [VNFaceObservation](<doc://Vision/documentation/Vision/VNFaceObservation>) objects to process as part of the request.
//
// See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
SetInputFaceObservations(value []VNFaceObservation)
}
An image analysis request that operates on face observations.
See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting
type VNFaceObservationAcceptingObject ¶
type VNFaceObservationAcceptingObject struct {
objectivec.Object
}
VNFaceObservationAcceptingObject wraps an existing Objective-C object that conforms to the VNFaceObservationAccepting protocol.
func VNFaceObservationAcceptingObjectFromID ¶
func VNFaceObservationAcceptingObjectFromID(id objc.ID) VNFaceObservationAcceptingObject
VNFaceObservationAcceptingObjectFromID constructs a VNFaceObservationAcceptingObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VNFaceObservationAcceptingObject) BaseObject ¶
func (o VNFaceObservationAcceptingObject) BaseObject() objectivec.Object
func (VNFaceObservationAcceptingObject) InputFaceObservations ¶
func (o VNFaceObservationAcceptingObject) InputFaceObservations() []VNFaceObservation
An array of VNFaceObservation objects to process as part of the request.
See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
func (VNFaceObservationAcceptingObject) SetInputFaceObservations ¶
func (o VNFaceObservationAcceptingObject) SetInputFaceObservations(value []VNFaceObservation)
type VNFaceObservationClass ¶
type VNFaceObservationClass struct {
// contains filtered or unexported fields
}
func GetVNFaceObservationClass ¶
func GetVNFaceObservationClass() VNFaceObservationClass
GetVNFaceObservationClass returns the class object for VNFaceObservation.
func (VNFaceObservationClass) Alloc ¶
func (vc VNFaceObservationClass) Alloc() VNFaceObservation
Alloc allocates memory for a new instance of the class.
type VNFeaturePrintObservation ¶
type VNFeaturePrintObservation struct {
VNObservation
}
An observation that provides the recognized feature print.
Fetching Feature Print Data ¶
- VNFeaturePrintObservation.Data: The feature print data.
- VNFeaturePrintObservation.ElementCount: The total number of elements in the data.
Determining Types of Feature Prints ¶
- VNFeaturePrintObservation.ElementType: The type of each element in the data.
Computing Distance Between Features ¶
- VNFeaturePrintObservation.ComputeDistanceToFeaturePrintObservationError: Computes the distance between two feature print observations.
See: https://developer.apple.com/documentation/Vision/VNFeaturePrintObservation
func NewVNFeaturePrintObservation ¶
func NewVNFeaturePrintObservation() VNFeaturePrintObservation
NewVNFeaturePrintObservation creates a new VNFeaturePrintObservation instance.
func VNFeaturePrintObservationFromID ¶
func VNFeaturePrintObservationFromID(id objc.ID) VNFeaturePrintObservation
VNFeaturePrintObservationFromID constructs a VNFeaturePrintObservation from an objc.ID.
An observation that provides the recognized feature print.
func (VNFeaturePrintObservation) Autorelease ¶
func (f VNFeaturePrintObservation) Autorelease() VNFeaturePrintObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNFeaturePrintObservation) ComputeDistanceToFeaturePrintObservationError ¶
func (f VNFeaturePrintObservation) ComputeDistanceToFeaturePrintObservationError(featurePrint VNFeaturePrintObservation) (float32, error)
Computes the distance between two feature print observations.
outDistance: A pointer to store the calculated distance value.
featurePrint: The feature print object whose distance to calculate.
Discussion ¶
Shorter distances indicate greater similarity between feature prints.
See: https://developer.apple.com/documentation/Vision/VNFeaturePrintObservation/computeDistance(_:to:)
func (VNFeaturePrintObservation) Data ¶
func (f VNFeaturePrintObservation) Data() foundation.INSData
The feature print data.
Discussion ¶
The data is divided into separate elements. Determine the type of element using [ElementType], and the number of elements using [ElementCount].
See: https://developer.apple.com/documentation/Vision/VNFeaturePrintObservation/data
func (VNFeaturePrintObservation) ElementCount ¶
func (f VNFeaturePrintObservation) ElementCount() uint
The total number of elements in the data.
See: https://developer.apple.com/documentation/Vision/VNFeaturePrintObservation/elementCount
func (VNFeaturePrintObservation) ElementType ¶
func (f VNFeaturePrintObservation) ElementType() VNElementType
The type of each element in the data.
See: https://developer.apple.com/documentation/Vision/VNFeaturePrintObservation/elementType
func (VNFeaturePrintObservation) Init ¶
func (f VNFeaturePrintObservation) Init() VNFeaturePrintObservation
Init initializes the instance.
type VNFeaturePrintObservationClass ¶
type VNFeaturePrintObservationClass struct {
// contains filtered or unexported fields
}
func GetVNFeaturePrintObservationClass ¶
func GetVNFeaturePrintObservationClass() VNFeaturePrintObservationClass
GetVNFeaturePrintObservationClass returns the class object for VNFeaturePrintObservation.
func (VNFeaturePrintObservationClass) Alloc ¶
func (vc VNFeaturePrintObservationClass) Alloc() VNFeaturePrintObservation
Alloc allocates memory for a new instance of the class.
type VNGenerateAttentionBasedSaliencyImageRequest ¶
type VNGenerateAttentionBasedSaliencyImageRequest struct {
VNImageBasedRequest
}
An object that produces a heat map that identifies the parts of an image most likely to draw attention.
Identifying Request Revisions ¶
- VNGenerateAttentionBasedSaliencyImageRequest.VNGenerateAttentionBasedSaliencyImageRequestRevision1: A constant for specifying revision 1 of the image saliency request.
See: https://developer.apple.com/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequest
func NewGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler ¶
func NewGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateAttentionBasedSaliencyImageRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNGenerateAttentionBasedSaliencyImageRequest ¶
func NewVNGenerateAttentionBasedSaliencyImageRequest() VNGenerateAttentionBasedSaliencyImageRequest
NewVNGenerateAttentionBasedSaliencyImageRequest creates a new VNGenerateAttentionBasedSaliencyImageRequest instance.
func VNGenerateAttentionBasedSaliencyImageRequestFromID ¶
func VNGenerateAttentionBasedSaliencyImageRequestFromID(id objc.ID) VNGenerateAttentionBasedSaliencyImageRequest
VNGenerateAttentionBasedSaliencyImageRequestFromID constructs a VNGenerateAttentionBasedSaliencyImageRequest from an objc.ID.
An object that produces a heat map that identifies the parts of an image most likely to draw attention.
func (VNGenerateAttentionBasedSaliencyImageRequest) Autorelease ¶
func (g VNGenerateAttentionBasedSaliencyImageRequest) Autorelease() VNGenerateAttentionBasedSaliencyImageRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGenerateAttentionBasedSaliencyImageRequest) Init ¶
func (g VNGenerateAttentionBasedSaliencyImageRequest) Init() VNGenerateAttentionBasedSaliencyImageRequest
Init initializes the instance.
func (VNGenerateAttentionBasedSaliencyImageRequest) VNGenerateAttentionBasedSaliencyImageRequestRevision1 ¶
func (g VNGenerateAttentionBasedSaliencyImageRequest) VNGenerateAttentionBasedSaliencyImageRequestRevision1() int
A constant for specifying revision 1 of the image saliency request.
type VNGenerateAttentionBasedSaliencyImageRequestClass ¶
type VNGenerateAttentionBasedSaliencyImageRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGenerateAttentionBasedSaliencyImageRequestClass ¶
func GetVNGenerateAttentionBasedSaliencyImageRequestClass() VNGenerateAttentionBasedSaliencyImageRequestClass
GetVNGenerateAttentionBasedSaliencyImageRequestClass returns the class object for VNGenerateAttentionBasedSaliencyImageRequest.
func (VNGenerateAttentionBasedSaliencyImageRequestClass) Alloc ¶
func (vc VNGenerateAttentionBasedSaliencyImageRequestClass) Alloc() VNGenerateAttentionBasedSaliencyImageRequest
Alloc allocates memory for a new instance of the class.
type VNGenerateForegroundInstanceMaskRequest ¶
type VNGenerateForegroundInstanceMaskRequest struct {
VNImageBasedRequest
}
A request that generates an instance mask of noticable objects to separate from the background.
See: https://developer.apple.com/documentation/Vision/VNGenerateForegroundInstanceMaskRequest
func NewGenerateForegroundInstanceMaskRequestWithCompletionHandler ¶
func NewGenerateForegroundInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateForegroundInstanceMaskRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNGenerateForegroundInstanceMaskRequest ¶
func NewVNGenerateForegroundInstanceMaskRequest() VNGenerateForegroundInstanceMaskRequest
NewVNGenerateForegroundInstanceMaskRequest creates a new VNGenerateForegroundInstanceMaskRequest instance.
func VNGenerateForegroundInstanceMaskRequestFromID ¶
func VNGenerateForegroundInstanceMaskRequestFromID(id objc.ID) VNGenerateForegroundInstanceMaskRequest
VNGenerateForegroundInstanceMaskRequestFromID constructs a VNGenerateForegroundInstanceMaskRequest from an objc.ID.
A request that generates an instance mask of noticable objects to separate from the background.
func (VNGenerateForegroundInstanceMaskRequest) Autorelease ¶
func (g VNGenerateForegroundInstanceMaskRequest) Autorelease() VNGenerateForegroundInstanceMaskRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGenerateForegroundInstanceMaskRequest) VNGenerateForegroundInstanceMaskRequestRevision1 ¶
func (g VNGenerateForegroundInstanceMaskRequest) VNGenerateForegroundInstanceMaskRequestRevision1() int
A constant for specifying the first revision of the foreground instance mask request.
See: https://developer.apple.com/documentation/vision/vngenerateforegroundinstancemaskrequestrevision1
type VNGenerateForegroundInstanceMaskRequestClass ¶
type VNGenerateForegroundInstanceMaskRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGenerateForegroundInstanceMaskRequestClass ¶
func GetVNGenerateForegroundInstanceMaskRequestClass() VNGenerateForegroundInstanceMaskRequestClass
GetVNGenerateForegroundInstanceMaskRequestClass returns the class object for VNGenerateForegroundInstanceMaskRequest.
func (VNGenerateForegroundInstanceMaskRequestClass) Alloc ¶
func (vc VNGenerateForegroundInstanceMaskRequestClass) Alloc() VNGenerateForegroundInstanceMaskRequest
Alloc allocates memory for a new instance of the class.
type VNGenerateImageFeaturePrintRequest ¶
type VNGenerateImageFeaturePrintRequest struct {
VNImageBasedRequest
}
An image-based request to generate feature prints from an image.
Overview ¶
This request returns the feature print data it generates as an array of VNFeaturePrintObservation objects.
Scaling and Cropping Images ¶
- VNGenerateImageFeaturePrintRequest.ImageCropAndScaleOption: An optional setting that tells the algorithm how to scale an input image before generating the feature print.
- VNGenerateImageFeaturePrintRequest.SetImageCropAndScaleOption
Identifying Request Revisions ¶
- VNGenerateImageFeaturePrintRequest.VNGenerateImageFeaturePrintRequestRevision1: A constant for specifying the first revision of the feature-print request.
See: https://developer.apple.com/documentation/Vision/VNGenerateImageFeaturePrintRequest
func NewGenerateImageFeaturePrintRequestWithCompletionHandler ¶
func NewGenerateImageFeaturePrintRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateImageFeaturePrintRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNGenerateImageFeaturePrintRequest ¶
func NewVNGenerateImageFeaturePrintRequest() VNGenerateImageFeaturePrintRequest
NewVNGenerateImageFeaturePrintRequest creates a new VNGenerateImageFeaturePrintRequest instance.
func VNGenerateImageFeaturePrintRequestFromID ¶
func VNGenerateImageFeaturePrintRequestFromID(id objc.ID) VNGenerateImageFeaturePrintRequest
VNGenerateImageFeaturePrintRequestFromID constructs a VNGenerateImageFeaturePrintRequest from an objc.ID.
An image-based request to generate feature prints from an image.
func (VNGenerateImageFeaturePrintRequest) Autorelease ¶
func (g VNGenerateImageFeaturePrintRequest) Autorelease() VNGenerateImageFeaturePrintRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGenerateImageFeaturePrintRequest) ImageCropAndScaleOption ¶
func (g VNGenerateImageFeaturePrintRequest) ImageCropAndScaleOption() VNImageCropAndScaleOption
An optional setting that tells the algorithm how to scale an input image before generating the feature print.
Discussion ¶
Scaling is applied before generating the feature print. The default value is [ImageCropAndScaleOptionScaleFill].
Scaling an image ensures that the entire image fits into the algorithm’s input image dimensions, which may require a change in aspect ratio. Each crop and scale option transforms the input image in a different way:
[scale-crop-options]
func (VNGenerateImageFeaturePrintRequest) Init ¶
func (g VNGenerateImageFeaturePrintRequest) Init() VNGenerateImageFeaturePrintRequest
Init initializes the instance.
func (VNGenerateImageFeaturePrintRequest) SetImageCropAndScaleOption ¶
func (g VNGenerateImageFeaturePrintRequest) SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
func (VNGenerateImageFeaturePrintRequest) VNGenerateImageFeaturePrintRequestRevision1 ¶
func (g VNGenerateImageFeaturePrintRequest) VNGenerateImageFeaturePrintRequestRevision1() int
A constant for specifying the first revision of the feature-print request.
See: https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision1
type VNGenerateImageFeaturePrintRequestClass ¶
type VNGenerateImageFeaturePrintRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGenerateImageFeaturePrintRequestClass ¶
func GetVNGenerateImageFeaturePrintRequestClass() VNGenerateImageFeaturePrintRequestClass
GetVNGenerateImageFeaturePrintRequestClass returns the class object for VNGenerateImageFeaturePrintRequest.
func (VNGenerateImageFeaturePrintRequestClass) Alloc ¶
func (vc VNGenerateImageFeaturePrintRequestClass) Alloc() VNGenerateImageFeaturePrintRequest
Alloc allocates memory for a new instance of the class.
type VNGenerateObjectnessBasedSaliencyImageRequest ¶
type VNGenerateObjectnessBasedSaliencyImageRequest struct {
VNImageBasedRequest
}
A request that generates a heat map that identifies the parts of an image most likely to represent objects.
Overview ¶
The resulting observation, VNSaliencyImageObservation, encodes this data as a heat map, which you can use to highlight regions of interest.
Identifying Request Revisions ¶
- VNGenerateObjectnessBasedSaliencyImageRequest.VNGenerateObjectnessBasedSaliencyImageRequestRevision1: A constant for specifying revision 1 of the image saliency request.
See: https://developer.apple.com/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequest
func NewGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler ¶
func NewGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateObjectnessBasedSaliencyImageRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNGenerateObjectnessBasedSaliencyImageRequest ¶
func NewVNGenerateObjectnessBasedSaliencyImageRequest() VNGenerateObjectnessBasedSaliencyImageRequest
NewVNGenerateObjectnessBasedSaliencyImageRequest creates a new VNGenerateObjectnessBasedSaliencyImageRequest instance.
func VNGenerateObjectnessBasedSaliencyImageRequestFromID ¶
func VNGenerateObjectnessBasedSaliencyImageRequestFromID(id objc.ID) VNGenerateObjectnessBasedSaliencyImageRequest
VNGenerateObjectnessBasedSaliencyImageRequestFromID constructs a VNGenerateObjectnessBasedSaliencyImageRequest from an objc.ID.
A request that generates a heat map that identifies the parts of an image most likely to represent objects.
func (VNGenerateObjectnessBasedSaliencyImageRequest) Autorelease ¶
func (g VNGenerateObjectnessBasedSaliencyImageRequest) Autorelease() VNGenerateObjectnessBasedSaliencyImageRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGenerateObjectnessBasedSaliencyImageRequest) Init ¶
func (g VNGenerateObjectnessBasedSaliencyImageRequest) Init() VNGenerateObjectnessBasedSaliencyImageRequest
Init initializes the instance.
func (VNGenerateObjectnessBasedSaliencyImageRequest) VNGenerateObjectnessBasedSaliencyImageRequestRevision1 ¶
func (g VNGenerateObjectnessBasedSaliencyImageRequest) VNGenerateObjectnessBasedSaliencyImageRequestRevision1() int
A constant for specifying revision 1 of the image saliency request.
type VNGenerateObjectnessBasedSaliencyImageRequestClass ¶
type VNGenerateObjectnessBasedSaliencyImageRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGenerateObjectnessBasedSaliencyImageRequestClass ¶
func GetVNGenerateObjectnessBasedSaliencyImageRequestClass() VNGenerateObjectnessBasedSaliencyImageRequestClass
GetVNGenerateObjectnessBasedSaliencyImageRequestClass returns the class object for VNGenerateObjectnessBasedSaliencyImageRequest.
func (VNGenerateObjectnessBasedSaliencyImageRequestClass) Alloc ¶
func (vc VNGenerateObjectnessBasedSaliencyImageRequestClass) Alloc() VNGenerateObjectnessBasedSaliencyImageRequest
Alloc allocates memory for a new instance of the class.
type VNGenerateOpticalFlowRequest ¶
type VNGenerateOpticalFlowRequest struct {
VNTargetedImageRequest
}
An object that generates directional change vectors for each pixel in the targeted image.
Overview ¶
This request operates at a pixel level, so both images need to have the same dimensions to successfully perform the analysis. Setting a region of interest limits the region in which the analysis occurs. However, the system reports the resulting observation at full resolution.
Optical flow requests are resource-intensive, so create only one request at a time, and release it immediately after generating optical flows.
Configuring the Request ¶
- VNGenerateOpticalFlowRequest.ComputationAccuracy: The accuracy level for computing optical flow.
- VNGenerateOpticalFlowRequest.SetComputationAccuracy
- VNGenerateOpticalFlowRequest.OutputPixelFormat: The output buffer’s pixel format.
- VNGenerateOpticalFlowRequest.SetOutputPixelFormat
- VNGenerateOpticalFlowRequest.KeepNetworkOutput: A Boolean value that indicates whether to keep the raw pixel buffer coming from the machine learning network.
- VNGenerateOpticalFlowRequest.SetKeepNetworkOutput
Identifying Request Revisions ¶
- VNGenerateOpticalFlowRequest.VNGenerateOpticalFlowRequestRevision2: A constant for specifying revision 2 of the optical flow generation request.
- VNGenerateOpticalFlowRequest.VNGenerateOpticalFlowRequestRevision1: A constant for specifying revision 1 of the optical flow generation request.
See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequest
func NewGenerateOpticalFlowRequestWithCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Graphics image.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Graphics image, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Graphics image of known orientation.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCGImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCGImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCIImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCIImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:options: sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request with a completion handler that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientation values. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:orientation:options: sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientations. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:orientation:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCVPixelBuffer:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCVPixelBuffer:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting an image as raw data.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting an image as raw data, executing the completion handler when done.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a raw data image of known orientation.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageData:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageData:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting an image at the specified URL.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting an image at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions ¶
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting an image of known orientation, at the specified URL.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageURL:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageURL:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewVNGenerateOpticalFlowRequest ¶
func NewVNGenerateOpticalFlowRequest() VNGenerateOpticalFlowRequest
NewVNGenerateOpticalFlowRequest creates a new VNGenerateOpticalFlowRequest instance.
func VNGenerateOpticalFlowRequestFromID ¶
func VNGenerateOpticalFlowRequestFromID(id objc.ID) VNGenerateOpticalFlowRequest
VNGenerateOpticalFlowRequestFromID constructs a VNGenerateOpticalFlowRequest from an objc.ID.
An object that generates directional change vectors for each pixel in the targeted image.
func (VNGenerateOpticalFlowRequest) Autorelease ¶
func (g VNGenerateOpticalFlowRequest) Autorelease() VNGenerateOpticalFlowRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGenerateOpticalFlowRequest) ComputationAccuracy ¶
func (g VNGenerateOpticalFlowRequest) ComputationAccuracy() VNGenerateOpticalFlowRequestComputationAccuracy
The accuracy level for computing optical flow.
func (VNGenerateOpticalFlowRequest) Init ¶
func (g VNGenerateOpticalFlowRequest) Init() VNGenerateOpticalFlowRequest
Init initializes the instance.
func (VNGenerateOpticalFlowRequest) KeepNetworkOutput ¶
func (g VNGenerateOpticalFlowRequest) KeepNetworkOutput() bool
A Boolean value that indicates whether to keep the raw pixel buffer coming from the machine learning network.
Discussion ¶
The default is false. When you set this to true, the system ignores [OutputPixelFormat]. Setting this for revision 1 has no effect because it’s not machine learning-based.
See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequest/keepNetworkOutput
func (VNGenerateOpticalFlowRequest) OutputPixelFormat ¶
func (g VNGenerateOpticalFlowRequest) OutputPixelFormat() uint32
The output buffer’s pixel format.
See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequest/outputPixelFormat
func (VNGenerateOpticalFlowRequest) SetComputationAccuracy ¶
func (g VNGenerateOpticalFlowRequest) SetComputationAccuracy(value VNGenerateOpticalFlowRequestComputationAccuracy)
func (VNGenerateOpticalFlowRequest) SetKeepNetworkOutput ¶
func (g VNGenerateOpticalFlowRequest) SetKeepNetworkOutput(value bool)
func (VNGenerateOpticalFlowRequest) SetOutputPixelFormat ¶
func (g VNGenerateOpticalFlowRequest) SetOutputPixelFormat(value uint32)
func (VNGenerateOpticalFlowRequest) VNGenerateOpticalFlowRequestRevision1 ¶
func (g VNGenerateOpticalFlowRequest) VNGenerateOpticalFlowRequestRevision1() int
A constant for specifying revision 1 of the optical flow generation request.
See: https://developer.apple.com/documentation/vision/vngenerateopticalflowrequestrevision1
func (VNGenerateOpticalFlowRequest) VNGenerateOpticalFlowRequestRevision2 ¶
func (g VNGenerateOpticalFlowRequest) VNGenerateOpticalFlowRequestRevision2() int
A constant for specifying revision 2 of the optical flow generation request.
See: https://developer.apple.com/documentation/vision/vngenerateopticalflowrequestrevision2
type VNGenerateOpticalFlowRequestClass ¶
type VNGenerateOpticalFlowRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGenerateOpticalFlowRequestClass ¶
func GetVNGenerateOpticalFlowRequestClass() VNGenerateOpticalFlowRequestClass
GetVNGenerateOpticalFlowRequestClass returns the class object for VNGenerateOpticalFlowRequest.
func (VNGenerateOpticalFlowRequestClass) Alloc ¶
func (vc VNGenerateOpticalFlowRequestClass) Alloc() VNGenerateOpticalFlowRequest
Alloc allocates memory for a new instance of the class.
type VNGenerateOpticalFlowRequestComputationAccuracy ¶
type VNGenerateOpticalFlowRequestComputationAccuracy int
const ( // VNGenerateOpticalFlowRequestComputationAccuracyHigh: High accuracy. VNGenerateOpticalFlowRequestComputationAccuracyHigh VNGenerateOpticalFlowRequestComputationAccuracy = 2 // VNGenerateOpticalFlowRequestComputationAccuracyLow: Low accuracy. VNGenerateOpticalFlowRequestComputationAccuracyLow VNGenerateOpticalFlowRequestComputationAccuracy = 0 // VNGenerateOpticalFlowRequestComputationAccuracyMedium: Medium accuracy. VNGenerateOpticalFlowRequestComputationAccuracyMedium VNGenerateOpticalFlowRequestComputationAccuracy = 1 // VNGenerateOpticalFlowRequestComputationAccuracyVeryHigh: Very high accuracy. VNGenerateOpticalFlowRequestComputationAccuracyVeryHigh VNGenerateOpticalFlowRequestComputationAccuracy = 3 )
func (VNGenerateOpticalFlowRequestComputationAccuracy) String ¶
func (e VNGenerateOpticalFlowRequestComputationAccuracy) String() string
type VNGeneratePersonInstanceMaskRequest ¶
type VNGeneratePersonInstanceMaskRequest struct {
VNImageBasedRequest
}
An object that produces a mask of individual people it finds in the input image.
Identifying Request Revisions ¶
- VNGeneratePersonInstanceMaskRequest.VNGeneratePersonInstanceMaskRequestRevision1: A constant for specifying revision 1 of the person instance mask request.
See: https://developer.apple.com/documentation/Vision/VNGeneratePersonInstanceMaskRequest
func NewGeneratePersonInstanceMaskRequestWithCompletionHandler ¶
func NewGeneratePersonInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGeneratePersonInstanceMaskRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNGeneratePersonInstanceMaskRequest ¶
func NewVNGeneratePersonInstanceMaskRequest() VNGeneratePersonInstanceMaskRequest
NewVNGeneratePersonInstanceMaskRequest creates a new VNGeneratePersonInstanceMaskRequest instance.
func VNGeneratePersonInstanceMaskRequestFromID ¶
func VNGeneratePersonInstanceMaskRequestFromID(id objc.ID) VNGeneratePersonInstanceMaskRequest
VNGeneratePersonInstanceMaskRequestFromID constructs a VNGeneratePersonInstanceMaskRequest from an objc.ID.
An object that produces a mask of individual people it finds in the input image.
func (VNGeneratePersonInstanceMaskRequest) Autorelease ¶
func (g VNGeneratePersonInstanceMaskRequest) Autorelease() VNGeneratePersonInstanceMaskRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGeneratePersonInstanceMaskRequest) VNGeneratePersonInstanceMaskRequestRevision1 ¶
func (g VNGeneratePersonInstanceMaskRequest) VNGeneratePersonInstanceMaskRequestRevision1() int
A constant for specifying revision 1 of the person instance mask request.
See: https://developer.apple.com/documentation/vision/vngeneratepersoninstancemaskrequestrevision1
type VNGeneratePersonInstanceMaskRequestClass ¶
type VNGeneratePersonInstanceMaskRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGeneratePersonInstanceMaskRequestClass ¶
func GetVNGeneratePersonInstanceMaskRequestClass() VNGeneratePersonInstanceMaskRequestClass
GetVNGeneratePersonInstanceMaskRequestClass returns the class object for VNGeneratePersonInstanceMaskRequest.
func (VNGeneratePersonInstanceMaskRequestClass) Alloc ¶
func (vc VNGeneratePersonInstanceMaskRequestClass) Alloc() VNGeneratePersonInstanceMaskRequest
Alloc allocates memory for a new instance of the class.
type VNGeneratePersonSegmentationRequest ¶
type VNGeneratePersonSegmentationRequest struct {
VNStatefulRequest
}
An object that produces a matte image for a person it finds in the input image.
Overview ¶
Perform this request to detect and generate an image mask for a person in an image. The request returns the resulting image mask in an instance of VNPixelBufferObservation.
Configuring the Request ¶
- VNGeneratePersonSegmentationRequest.OutputPixelFormat: The pixel format of the output image.
- VNGeneratePersonSegmentationRequest.SetOutputPixelFormat
- VNGeneratePersonSegmentationRequest.QualityLevel: A value that indicates how the request balances accuracy and performance.
- VNGeneratePersonSegmentationRequest.SetQualityLevel
Getting the supported output pixel formats ¶
- VNGeneratePersonSegmentationRequest.SupportedOutputPixelFormatsAndReturnError: Returns a list of output pixel formats that the request supports.
Identifying Request Revisions ¶
- VNGeneratePersonSegmentationRequest.VNGeneratePersonSegmentationRequestRevision1: A constant for specifying revision 1 of the person segmentation generation request.
See: https://developer.apple.com/documentation/Vision/VNGeneratePersonSegmentationRequest
func NewGeneratePersonSegmentationRequestWithCompletionHandler ¶
func NewGeneratePersonSegmentationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNGeneratePersonSegmentationRequest
Creates a generate person segmentation request with a completion handler.
completionHandler: A completion handler that processes the resuts of the request.
func NewGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNGeneratePersonSegmentationRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNGeneratePersonSegmentationRequest ¶
func NewVNGeneratePersonSegmentationRequest() VNGeneratePersonSegmentationRequest
NewVNGeneratePersonSegmentationRequest creates a new VNGeneratePersonSegmentationRequest instance.
func VNGeneratePersonSegmentationRequestFromID ¶
func VNGeneratePersonSegmentationRequestFromID(id objc.ID) VNGeneratePersonSegmentationRequest
VNGeneratePersonSegmentationRequestFromID constructs a VNGeneratePersonSegmentationRequest from an objc.ID.
An object that produces a matte image for a person it finds in the input image.
func (VNGeneratePersonSegmentationRequest) Autorelease ¶
func (g VNGeneratePersonSegmentationRequest) Autorelease() VNGeneratePersonSegmentationRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNGeneratePersonSegmentationRequest) OutputPixelFormat ¶
func (g VNGeneratePersonSegmentationRequest) OutputPixelFormat() uint32
The pixel format of the output image.
Discussion ¶
The property supports the following values:
- kCVPixelFormatType_OneComponent8 - kCVPixelFormatType_OneComponent16Half - kCVPixelFormatType_OneComponent32Float
The default value is kCVPixelFormatType_OneComponent8.
func (VNGeneratePersonSegmentationRequest) QualityLevel ¶
func (g VNGeneratePersonSegmentationRequest) QualityLevel() VNGeneratePersonSegmentationRequestQualityLevel
A value that indicates how the request balances accuracy and performance.
func (VNGeneratePersonSegmentationRequest) SetOutputPixelFormat ¶
func (g VNGeneratePersonSegmentationRequest) SetOutputPixelFormat(value uint32)
func (VNGeneratePersonSegmentationRequest) SetQualityLevel ¶
func (g VNGeneratePersonSegmentationRequest) SetQualityLevel(value VNGeneratePersonSegmentationRequestQualityLevel)
func (VNGeneratePersonSegmentationRequest) SupportedOutputPixelFormatsAndReturnError ¶
func (g VNGeneratePersonSegmentationRequest) SupportedOutputPixelFormatsAndReturnError() ([]foundation.NSNumber, error)
Returns a list of output pixel formats that the request supports.
func (VNGeneratePersonSegmentationRequest) VNGeneratePersonSegmentationRequestRevision1 ¶
func (g VNGeneratePersonSegmentationRequest) VNGeneratePersonSegmentationRequestRevision1() int
A constant for specifying revision 1 of the person segmentation generation request.
See: https://developer.apple.com/documentation/vision/vngeneratepersonsegmentationrequestrevision1
type VNGeneratePersonSegmentationRequestClass ¶
type VNGeneratePersonSegmentationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNGeneratePersonSegmentationRequestClass ¶
func GetVNGeneratePersonSegmentationRequestClass() VNGeneratePersonSegmentationRequestClass
GetVNGeneratePersonSegmentationRequestClass returns the class object for VNGeneratePersonSegmentationRequest.
func (VNGeneratePersonSegmentationRequestClass) Alloc ¶
func (vc VNGeneratePersonSegmentationRequestClass) Alloc() VNGeneratePersonSegmentationRequest
Alloc allocates memory for a new instance of the class.
type VNGeneratePersonSegmentationRequestQualityLevel ¶
type VNGeneratePersonSegmentationRequestQualityLevel int
const ( // VNGeneratePersonSegmentationRequestQualityLevelAccurate: Prefers image quality over performance. VNGeneratePersonSegmentationRequestQualityLevelAccurate VNGeneratePersonSegmentationRequestQualityLevel = 0 // VNGeneratePersonSegmentationRequestQualityLevelBalanced: Prefers processing that balances image quality and performance. VNGeneratePersonSegmentationRequestQualityLevelBalanced VNGeneratePersonSegmentationRequestQualityLevel = 1 // VNGeneratePersonSegmentationRequestQualityLevelFast: Prefers performance over image quality. VNGeneratePersonSegmentationRequestQualityLevelFast VNGeneratePersonSegmentationRequestQualityLevel = 2 )
func (VNGeneratePersonSegmentationRequestQualityLevel) String ¶
func (e VNGeneratePersonSegmentationRequestQualityLevel) String() string
type VNGeometryUtils ¶
type VNGeometryUtils struct {
objectivec.Object
}
Utility methods to determine the geometries of various Vision types.
See: https://developer.apple.com/documentation/Vision/VNGeometryUtils
func NewVNGeometryUtils ¶
func NewVNGeometryUtils() VNGeometryUtils
NewVNGeometryUtils creates a new VNGeometryUtils instance.
func VNGeometryUtilsFromID ¶
func VNGeometryUtilsFromID(id objc.ID) VNGeometryUtils
VNGeometryUtilsFromID constructs a VNGeometryUtils from an objc.ID.
Utility methods to determine the geometries of various Vision types.
func (VNGeometryUtils) Autorelease ¶
func (g VNGeometryUtils) Autorelease() VNGeometryUtils
Autorelease adds the receiver to the current autorelease pool.
func (VNGeometryUtils) Init ¶
func (g VNGeometryUtils) Init() VNGeometryUtils
Init initializes the instance.
type VNGeometryUtilsClass ¶
type VNGeometryUtilsClass struct {
// contains filtered or unexported fields
}
func GetVNGeometryUtilsClass ¶
func GetVNGeometryUtilsClass() VNGeometryUtilsClass
GetVNGeometryUtilsClass returns the class object for VNGeometryUtils.
func (VNGeometryUtilsClass) Alloc ¶
func (vc VNGeometryUtilsClass) Alloc() VNGeometryUtils
Alloc allocates memory for a new instance of the class.
func (VNGeometryUtilsClass) BoundingCircleForContourError ¶
func (_VNGeometryUtilsClass VNGeometryUtilsClass) BoundingCircleForContourError(contour IVNContour) (VNCircle, error)
Calculates a bounding circle for the specified contour object.
contour: A contour around which to calculate the bounding circle.
Return Value ¶
The bounding VNCircle object.
See: https://developer.apple.com/documentation/Vision/VNGeometryUtils/boundingCircle(for:)-423ll
func (VNGeometryUtilsClass) BoundingCircleForPointsError ¶
func (_VNGeometryUtilsClass VNGeometryUtilsClass) BoundingCircleForPointsError(points []VNPoint) (VNCircle, error)
Calculates a bounding circle for the specified array of points.
points: A collection of points around which to calculate the bounding circle.
Return Value ¶
The bounding VNCircle object.
See: https://developer.apple.com/documentation/Vision/VNGeometryUtils/boundingCircle(for:)-9dggv
func (VNGeometryUtilsClass) BoundingCircleForSIMDPointsPointCountError ¶
func (_VNGeometryUtilsClass VNGeometryUtilsClass) BoundingCircleForSIMDPointsPointCountError(points objectivec.IObject, pointCount int) (VNCircle, error)
Calculates a bounding circle for the specified points.
points: A collection of points around which to calculate the bounding circle.
pointCount: The number of points in the `points` argument.
points is a [simd.simd_float2].
Return Value ¶
The bounding VNCircle object.
func (VNGeometryUtilsClass) CalculateAreaForContourOrientedAreaError ¶
func (_VNGeometryUtilsClass VNGeometryUtilsClass) CalculateAreaForContourOrientedAreaError(contour VNContour, orientedArea bool) (float64, error)
Calculates the area for the specified contour.
area: The output parameter to populate with the calculated contour area.
contour: The contour object for which to calculate the area.
orientedArea: A Boolean value that indicates whether to calculate the signed area (positive for counterclockwise-oriented contours and negative for clockwise-oriented contours). If you specify [false], the returned area is always positive. // [false]: https://developer.apple.com/documentation/Swift/false
Discussion ¶
Attempting to calculate the area for a contour containing random points, or with self-crossing edges, produces undefined results.
See: https://developer.apple.com/documentation/Vision/VNGeometryUtils/calculateArea(_:for:orientedArea:)
func (VNGeometryUtilsClass) CalculatePerimeterForContourError ¶
func (_VNGeometryUtilsClass VNGeometryUtilsClass) CalculatePerimeterForContourError(contour VNContour) (float64, error)
Calculates the perimeter of a closed contour.
perimeter: The output parameter to populate with the calculated contour perimeter.
contour: The contour object for which to calculate the perimeter.
See: https://developer.apple.com/documentation/Vision/VNGeometryUtils/calculatePerimeter(_:for:)
type VNHomographicImageRegistrationRequest ¶
type VNHomographicImageRegistrationRequest struct {
VNImageRegistrationRequest
}
An image-analysis request that determines the perspective warp matrix necessary to align the content of two images.
Overview ¶
Create and perform a homographic image registration request to align content in two images through a homography. A is an isomorphism of projected spaces, a bijection that maps lines to lines.
Identifying Request Revisions ¶
- VNHomographicImageRegistrationRequest.VNHomographicImageRegistrationRequestRevision1: A constant for specifying revision 1 of the homographic image registration request.
See: https://developer.apple.com/documentation/Vision/VNHomographicImageRegistrationRequest
func NewHomographicImageRegistrationRequestWithCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Graphics image.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Graphics image, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Graphics image of known orientation.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCGImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCGImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCIImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCIImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:options: sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request with a completion handler that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientation values. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:orientation:options: sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientations. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:orientation:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCVPixelBuffer:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCVPixelBuffer:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting an image as raw data.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting an image as raw data, executing the completion handler when done.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a raw data image of known orientation.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageData:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageData:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting an image at the specified URL.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting an image at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions ¶
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting an image of known orientation, at the specified URL.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageURL:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageURL:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewVNHomographicImageRegistrationRequest ¶
func NewVNHomographicImageRegistrationRequest() VNHomographicImageRegistrationRequest
NewVNHomographicImageRegistrationRequest creates a new VNHomographicImageRegistrationRequest instance.
func VNHomographicImageRegistrationRequestFromID ¶
func VNHomographicImageRegistrationRequestFromID(id objc.ID) VNHomographicImageRegistrationRequest
VNHomographicImageRegistrationRequestFromID constructs a VNHomographicImageRegistrationRequest from an objc.ID.
An image-analysis request that determines the perspective warp matrix necessary to align the content of two images.
func (VNHomographicImageRegistrationRequest) Autorelease ¶
func (h VNHomographicImageRegistrationRequest) Autorelease() VNHomographicImageRegistrationRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNHomographicImageRegistrationRequest) VNHomographicImageRegistrationRequestRevision1 ¶
func (h VNHomographicImageRegistrationRequest) VNHomographicImageRegistrationRequestRevision1() int
A constant for specifying revision 1 of the homographic image registration request.
See: https://developer.apple.com/documentation/vision/vnhomographicimageregistrationrequestrevision1
type VNHomographicImageRegistrationRequestClass ¶
type VNHomographicImageRegistrationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNHomographicImageRegistrationRequestClass ¶
func GetVNHomographicImageRegistrationRequestClass() VNHomographicImageRegistrationRequestClass
GetVNHomographicImageRegistrationRequestClass returns the class object for VNHomographicImageRegistrationRequest.
type VNHorizonObservation ¶
type VNHorizonObservation struct {
VNObservation
}
The horizon angle information that an image-analysis request detects.
Overview ¶
Instances of this class result from invoking a VNDetectHorizonRequest, and report the VNHorizonObservation.Angle and VNHorizonObservation.Transform of the horizon in an image.
Evaluating the Horizon ¶
- VNHorizonObservation.Angle: The angle of the observed horizon.
- VNHorizonObservation.Transform: The transform to apply to the detected horizon.
- VNHorizonObservation.TransformForImageWidthHeight: Creates an affine transform for the specified image width and height.
See: https://developer.apple.com/documentation/Vision/VNHorizonObservation
func NewVNHorizonObservation ¶
func NewVNHorizonObservation() VNHorizonObservation
NewVNHorizonObservation creates a new VNHorizonObservation instance.
func VNHorizonObservationFromID ¶
func VNHorizonObservationFromID(id objc.ID) VNHorizonObservation
VNHorizonObservationFromID constructs a VNHorizonObservation from an objc.ID.
The horizon angle information that an image-analysis request detects.
func (VNHorizonObservation) Angle ¶
func (h VNHorizonObservation) Angle() float64
The angle of the observed horizon.
Discussion ¶
Use the angle to orient the image in an upright position and make the detected horizon level.
See: https://developer.apple.com/documentation/Vision/VNHorizonObservation/angle
func (VNHorizonObservation) Autorelease ¶
func (h VNHorizonObservation) Autorelease() VNHorizonObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNHorizonObservation) Init ¶
func (h VNHorizonObservation) Init() VNHorizonObservation
Init initializes the instance.
func (VNHorizonObservation) Transform ¶
func (h VNHorizonObservation) Transform() corefoundation.CGAffineTransform
The transform to apply to the detected horizon.
Discussion ¶
Apply the transform’s inverse to orient the image in an upright position and make the detected horizon level.
See: https://developer.apple.com/documentation/Vision/VNHorizonObservation/transform
func (VNHorizonObservation) TransformForImageWidthHeight ¶
func (h VNHorizonObservation) TransformForImageWidthHeight(width uintptr, height uintptr) corefoundation.CGAffineTransform
Creates an affine transform for the specified image width and height.
width: The width of the image.
height: The height of the image.
Return Value ¶
An affine transform.
type VNHorizonObservationClass ¶
type VNHorizonObservationClass struct {
// contains filtered or unexported fields
}
func GetVNHorizonObservationClass ¶
func GetVNHorizonObservationClass() VNHorizonObservationClass
GetVNHorizonObservationClass returns the class object for VNHorizonObservation.
func (VNHorizonObservationClass) Alloc ¶
func (vc VNHorizonObservationClass) Alloc() VNHorizonObservation
Alloc allocates memory for a new instance of the class.
type VNHumanBodyPose3DObservation ¶
type VNHumanBodyPose3DObservation struct {
VNRecognizedPoints3DObservation
}
An observation that provides the 3D body points the request recognizes.
Accessing Points ¶
- VNHumanBodyPose3DObservation.AvailableJointNames: The names of the available joints in the observation.
- VNHumanBodyPose3DObservation.AvailableJointsGroupNames: The available joint group names in the observation.
- VNHumanBodyPose3DObservation.RecognizedPointForJointNameError: Returns the point for a joint name that the observation recognizes.
- VNHumanBodyPose3DObservation.RecognizedPointsForJointsGroupNameError: Returns a collection of points for the group name you specify.
Getting the Joint Position ¶
- VNHumanBodyPose3DObservation.PointInImageForJointNameError: Returns a 2D point for the joint name you specify, relative to the input image.
Getting the Parent Joint Name ¶
- VNHumanBodyPose3DObservation.ParentJointNameForJointName: Returns the parent joint of the joint name you specify.
Getting the Body Height ¶
- VNHumanBodyPose3DObservation.HeightEstimation: The technique the framework uses to estimate body height.
- VNHumanBodyPose3DObservation.BodyHeight: The estimated human body height, in meters.
Getting the Camera Position ¶
- VNHumanBodyPose3DObservation.CameraOriginMatrix: A transform from the skeleton hip to the camera.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation
func NewVNHumanBodyPose3DObservation ¶
func NewVNHumanBodyPose3DObservation() VNHumanBodyPose3DObservation
NewVNHumanBodyPose3DObservation creates a new VNHumanBodyPose3DObservation instance.
func VNHumanBodyPose3DObservationFromID ¶
func VNHumanBodyPose3DObservationFromID(id objc.ID) VNHumanBodyPose3DObservation
VNHumanBodyPose3DObservationFromID constructs a VNHumanBodyPose3DObservation from an objc.ID.
An observation that provides the 3D body points the request recognizes.
func (VNHumanBodyPose3DObservation) Autorelease ¶
func (h VNHumanBodyPose3DObservation) Autorelease() VNHumanBodyPose3DObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNHumanBodyPose3DObservation) AvailableJointNames ¶
func (h VNHumanBodyPose3DObservation) AvailableJointNames() []string
The names of the available joints in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/availableJointNames
func (VNHumanBodyPose3DObservation) AvailableJointsGroupNames ¶
func (h VNHumanBodyPose3DObservation) AvailableJointsGroupNames() []string
The available joint group names in the observation.
func (VNHumanBodyPose3DObservation) BodyHeight ¶
func (h VNHumanBodyPose3DObservation) BodyHeight() float32
The estimated human body height, in meters.
Discussion ¶
The framework returns an accurate height if [HeightEstimation] is [HumanBodyPose3DObservationHeightEstimationMeasured]; otherwise, it returns a [HumanBodyPose3DObservationHeightEstimationReference] height.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/bodyHeight
func (VNHumanBodyPose3DObservation) CameraOriginMatrix ¶
func (h VNHumanBodyPose3DObservation) CameraOriginMatrix() objectivec.IObject
A transform from the skeleton hip to the camera.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/cameraOriginMatrix
func (VNHumanBodyPose3DObservation) GetCameraRelativePositionForJointNameError ¶
func (h VNHumanBodyPose3DObservation) GetCameraRelativePositionForJointNameError(modelPositionOut objectivec.IObject, jointName VNHumanBodyPose3DObservationJointName) (bool, error)
Gets a position relative to the camera for the body joint you specify.
modelPositionOut: The reference to the position.
jointName: The name of the humany body joint.
error: If an error occurs, an error object that describes the error; otherwise, `nil`.
modelPositionOut is a [simd.simd_float4x4].
Return Value ¶
A Boolean value that indicates the success of determining the position.
func (VNHumanBodyPose3DObservation) HeightEstimation ¶
func (h VNHumanBodyPose3DObservation) HeightEstimation() VNHumanBodyPose3DObservationHeightEstimation
The technique the framework uses to estimate body height.
func (VNHumanBodyPose3DObservation) Init ¶
func (h VNHumanBodyPose3DObservation) Init() VNHumanBodyPose3DObservation
Init initializes the instance.
func (VNHumanBodyPose3DObservation) ParentJointNameForJointName ¶
func (h VNHumanBodyPose3DObservation) ParentJointNameForJointName(jointName VNHumanBodyPose3DObservationJointName) VNHumanBodyPose3DObservationJointName
Returns the parent joint of the joint name you specify.
jointName: The name of the body joint to return the parent of.
Return Value ¶
The name of the parent joint.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/parentJointName(_:)
func (VNHumanBodyPose3DObservation) PointInImageForJointNameError ¶
func (h VNHumanBodyPose3DObservation) PointInImageForJointNameError(jointName VNHumanBodyPose3DObservationJointName) (IVNPoint, error)
Returns a 2D point for the joint name you specify, relative to the input image.
jointName: The name of the human body joint.
Return Value ¶
A projection of the 3D position onto the original 2D image in normalized, lower left origin coordinates.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/pointInImage(_:)
func (VNHumanBodyPose3DObservation) RecognizedPointForJointNameError ¶
func (h VNHumanBodyPose3DObservation) RecognizedPointForJointNameError(jointName VNHumanBodyPose3DObservationJointName) (IVNHumanBodyRecognizedPoint3D, error)
Returns the point for a joint name that the observation recognizes.
jointName: The joint name to retrieve.
Return Value ¶
The point for the joint name.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/recognizedPoint(_:)
func (VNHumanBodyPose3DObservation) RecognizedPointsForJointsGroupNameError ¶
func (h VNHumanBodyPose3DObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanBodyPose3DObservationJointsGroupName) (foundation.INSDictionary, error)
Returns a collection of points for the group name you specify.
jointsGroupName: The name of the human body joints group.
Return Value ¶
A collection of points.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/recognizedPoints(_:)
type VNHumanBodyPose3DObservationClass ¶
type VNHumanBodyPose3DObservationClass struct {
// contains filtered or unexported fields
}
func GetVNHumanBodyPose3DObservationClass ¶
func GetVNHumanBodyPose3DObservationClass() VNHumanBodyPose3DObservationClass
GetVNHumanBodyPose3DObservationClass returns the class object for VNHumanBodyPose3DObservation.
func (VNHumanBodyPose3DObservationClass) Alloc ¶
func (vc VNHumanBodyPose3DObservationClass) Alloc() VNHumanBodyPose3DObservation
Alloc allocates memory for a new instance of the class.
type VNHumanBodyPose3DObservationHeightEstimation ¶
type VNHumanBodyPose3DObservationHeightEstimation int
const ( // VNHumanBodyPose3DObservationHeightEstimationMeasured: A technique that uses LiDAR depth data to measure body height, in meters. VNHumanBodyPose3DObservationHeightEstimationMeasured VNHumanBodyPose3DObservationHeightEstimation = 1 // VNHumanBodyPose3DObservationHeightEstimationReference: A technique that uses a reference height. VNHumanBodyPose3DObservationHeightEstimationReference VNHumanBodyPose3DObservationHeightEstimation = 0 )
func (VNHumanBodyPose3DObservationHeightEstimation) String ¶
func (e VNHumanBodyPose3DObservationHeightEstimation) String() string
type VNHumanBodyPose3DObservationJointName ¶
type VNHumanBodyPose3DObservationJointName = string
VNHumanBodyPose3DObservationJointName is the joint names for a 3D body pose.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/JointName
type VNHumanBodyPose3DObservationJointsGroupName ¶
type VNHumanBodyPose3DObservationJointsGroupName = string
VNHumanBodyPose3DObservationJointsGroupName is the joint group names for a 3D body pose.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/JointsGroupName
type VNHumanBodyPoseObservation ¶
type VNHumanBodyPoseObservation struct {
VNRecognizedPointsObservation
}
An observation that provides the body points the analysis recognized.
Accessing Points ¶
- VNHumanBodyPoseObservation.AvailableJointNames: The names of the available joints in the observation.
- VNHumanBodyPoseObservation.AvailableJointsGroupNames: The available joint group names in the observation.
- VNHumanBodyPoseObservation.RecognizedPointForJointNameError: Retrieves the recognized point for a joint name.
- VNHumanBodyPoseObservation.RecognizedPointsForJointsGroupNameError: Retrieves the recognized points associated with the joint group name.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation
func NewVNHumanBodyPoseObservation ¶
func NewVNHumanBodyPoseObservation() VNHumanBodyPoseObservation
NewVNHumanBodyPoseObservation creates a new VNHumanBodyPoseObservation instance.
func VNHumanBodyPoseObservationFromID ¶
func VNHumanBodyPoseObservationFromID(id objc.ID) VNHumanBodyPoseObservation
VNHumanBodyPoseObservationFromID constructs a VNHumanBodyPoseObservation from an objc.ID.
An observation that provides the body points the analysis recognized.
func (VNHumanBodyPoseObservation) Autorelease ¶
func (h VNHumanBodyPoseObservation) Autorelease() VNHumanBodyPoseObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNHumanBodyPoseObservation) AvailableJointNames ¶
func (h VNHumanBodyPoseObservation) AvailableJointNames() []string
The names of the available joints in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation/availableJointNames
func (VNHumanBodyPoseObservation) AvailableJointsGroupNames ¶
func (h VNHumanBodyPoseObservation) AvailableJointsGroupNames() []string
The available joint group names in the observation.
func (VNHumanBodyPoseObservation) Init ¶
func (h VNHumanBodyPoseObservation) Init() VNHumanBodyPoseObservation
Init initializes the instance.
func (VNHumanBodyPoseObservation) RecognizedPointForJointNameError ¶
func (h VNHumanBodyPoseObservation) RecognizedPointForJointNameError(jointName VNHumanBodyPoseObservationJointName) (IVNRecognizedPoint, error)
Retrieves the recognized point for a joint name.
jointName: The joint name of the point to retrieve.
Return Value ¶
The point for the joint name.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation/recognizedPoint(_:)
func (VNHumanBodyPoseObservation) RecognizedPointsForJointsGroupNameError ¶
func (h VNHumanBodyPoseObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanBodyPoseObservationJointsGroupName) (foundation.INSDictionary, error)
Retrieves the recognized points associated with the joint group name.
jointsGroupName: The joint group name of the points to retrieve.
Return Value ¶
The array of points associated with the joint group name.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation/recognizedPoints(_:)
type VNHumanBodyPoseObservationClass ¶
type VNHumanBodyPoseObservationClass struct {
// contains filtered or unexported fields
}
func GetVNHumanBodyPoseObservationClass ¶
func GetVNHumanBodyPoseObservationClass() VNHumanBodyPoseObservationClass
GetVNHumanBodyPoseObservationClass returns the class object for VNHumanBodyPoseObservation.
func (VNHumanBodyPoseObservationClass) Alloc ¶
func (vc VNHumanBodyPoseObservationClass) Alloc() VNHumanBodyPoseObservation
Alloc allocates memory for a new instance of the class.
type VNHumanBodyPoseObservationJointName ¶
type VNHumanBodyPoseObservationJointName = string
VNHumanBodyPoseObservationJointName is the supported joint names for the body pose.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation/JointName
type VNHumanBodyPoseObservationJointsGroupName ¶
type VNHumanBodyPoseObservationJointsGroupName = string
VNHumanBodyPoseObservationJointsGroupName is the supported joint group names for the body pose.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPoseObservation/JointsGroupName
type VNHumanBodyRecognizedPoint3D ¶
type VNHumanBodyRecognizedPoint3D struct {
VNRecognizedPoint3D
}
A recognized 3D point that includes a parent joint.
Getting the Position ¶
- VNHumanBodyRecognizedPoint3D.LocalPosition: The three-dimensional position.
Getting the Parent Joint ¶
- VNHumanBodyRecognizedPoint3D.ParentJoint: The parent joint in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyRecognizedPoint3D
func NewHumanBodyRecognizedPoint3DWithPosition ¶
func NewHumanBodyRecognizedPoint3DWithPosition(position objectivec.IObject) VNHumanBodyRecognizedPoint3D
Creates a point object with the position you specify.
position: The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(position:) position is a [simd.simd_float4x4].
func NewVNHumanBodyRecognizedPoint3D ¶
func NewVNHumanBodyRecognizedPoint3D() VNHumanBodyRecognizedPoint3D
NewVNHumanBodyRecognizedPoint3D creates a new VNHumanBodyRecognizedPoint3D instance.
func VNHumanBodyRecognizedPoint3DFromID ¶
func VNHumanBodyRecognizedPoint3DFromID(id objc.ID) VNHumanBodyRecognizedPoint3D
VNHumanBodyRecognizedPoint3DFromID constructs a VNHumanBodyRecognizedPoint3D from an objc.ID.
A recognized 3D point that includes a parent joint.
func (VNHumanBodyRecognizedPoint3D) Autorelease ¶
func (h VNHumanBodyRecognizedPoint3D) Autorelease() VNHumanBodyRecognizedPoint3D
Autorelease adds the receiver to the current autorelease pool.
func (VNHumanBodyRecognizedPoint3D) Init ¶
func (h VNHumanBodyRecognizedPoint3D) Init() VNHumanBodyRecognizedPoint3D
Init initializes the instance.
func (VNHumanBodyRecognizedPoint3D) LocalPosition ¶
func (h VNHumanBodyRecognizedPoint3D) LocalPosition() objectivec.IObject
The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyRecognizedPoint3D/localPosition
func (VNHumanBodyRecognizedPoint3D) ParentJoint ¶
func (h VNHumanBodyRecognizedPoint3D) ParentJoint() VNHumanBodyPose3DObservationJointName
The parent joint in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyRecognizedPoint3D/parentJoint
type VNHumanBodyRecognizedPoint3DClass ¶
type VNHumanBodyRecognizedPoint3DClass struct {
// contains filtered or unexported fields
}
func GetVNHumanBodyRecognizedPoint3DClass ¶
func GetVNHumanBodyRecognizedPoint3DClass() VNHumanBodyRecognizedPoint3DClass
GetVNHumanBodyRecognizedPoint3DClass returns the class object for VNHumanBodyRecognizedPoint3D.
func (VNHumanBodyRecognizedPoint3DClass) Alloc ¶
func (vc VNHumanBodyRecognizedPoint3DClass) Alloc() VNHumanBodyRecognizedPoint3D
Alloc allocates memory for a new instance of the class.
type VNHumanHandPoseObservation ¶
type VNHumanHandPoseObservation struct {
VNRecognizedPointsObservation
}
An observation that provides the hand points the analysis recognized.
Retrieving Points ¶
- VNHumanHandPoseObservation.AvailableJointNames: The names of the available joints in the observation.
- VNHumanHandPoseObservation.AvailableJointsGroupNames: The joint group names available in the observation.
- VNHumanHandPoseObservation.RecognizedPointForJointNameError: Retrieves the recognized point for a joint name.
- VNHumanHandPoseObservation.RecognizedPointsForJointsGroupNameError: Retrieves the recognized points associated with the joint group name.
Determining the Chirality ¶
- VNHumanHandPoseObservation.Chirality: The chirality, or handedness, of a pose.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation
func NewVNHumanHandPoseObservation ¶
func NewVNHumanHandPoseObservation() VNHumanHandPoseObservation
NewVNHumanHandPoseObservation creates a new VNHumanHandPoseObservation instance.
func VNHumanHandPoseObservationFromID ¶
func VNHumanHandPoseObservationFromID(id objc.ID) VNHumanHandPoseObservation
VNHumanHandPoseObservationFromID constructs a VNHumanHandPoseObservation from an objc.ID.
An observation that provides the hand points the analysis recognized.
func (VNHumanHandPoseObservation) Autorelease ¶
func (h VNHumanHandPoseObservation) Autorelease() VNHumanHandPoseObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNHumanHandPoseObservation) AvailableJointNames ¶
func (h VNHumanHandPoseObservation) AvailableJointNames() []string
The names of the available joints in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation/availableJointNames
func (VNHumanHandPoseObservation) AvailableJointsGroupNames ¶
func (h VNHumanHandPoseObservation) AvailableJointsGroupNames() []string
The joint group names available in the observation.
func (VNHumanHandPoseObservation) Chirality ¶
func (h VNHumanHandPoseObservation) Chirality() VNChirality
The chirality, or handedness, of a pose.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation/chirality
func (VNHumanHandPoseObservation) Init ¶
func (h VNHumanHandPoseObservation) Init() VNHumanHandPoseObservation
Init initializes the instance.
func (VNHumanHandPoseObservation) RecognizedPointForJointNameError ¶
func (h VNHumanHandPoseObservation) RecognizedPointForJointNameError(jointName VNHumanHandPoseObservationJointName) (IVNRecognizedPoint, error)
Retrieves the recognized point for a joint name.
jointName: The joint name of the point to retrieve.
Return Value ¶
The point for the joint name.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation/recognizedPoint(_:)
func (VNHumanHandPoseObservation) RecognizedPointsForJointsGroupNameError ¶
func (h VNHumanHandPoseObservation) RecognizedPointsForJointsGroupNameError(jointsGroupName VNHumanHandPoseObservationJointsGroupName) (foundation.INSDictionary, error)
Retrieves the recognized points associated with the joint group name.
jointsGroupName: The joint group name of the points to retrieve.
Return Value ¶
The array of points associated with the joint group name.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation/recognizedPoints(_:)
type VNHumanHandPoseObservationClass ¶
type VNHumanHandPoseObservationClass struct {
// contains filtered or unexported fields
}
func GetVNHumanHandPoseObservationClass ¶
func GetVNHumanHandPoseObservationClass() VNHumanHandPoseObservationClass
GetVNHumanHandPoseObservationClass returns the class object for VNHumanHandPoseObservation.
func (VNHumanHandPoseObservationClass) Alloc ¶
func (vc VNHumanHandPoseObservationClass) Alloc() VNHumanHandPoseObservation
Alloc allocates memory for a new instance of the class.
type VNHumanHandPoseObservationJointName ¶
type VNHumanHandPoseObservationJointName = string
VNHumanHandPoseObservationJointName is the supported joint names for the hand pose.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation/JointName
type VNHumanHandPoseObservationJointsGroupName ¶
type VNHumanHandPoseObservationJointsGroupName = string
VNHumanHandPoseObservationJointsGroupName is the supported joint group names for the hand pose.
See: https://developer.apple.com/documentation/Vision/VNHumanHandPoseObservation/JointsGroupName
type VNHumanObservation ¶
type VNHumanObservation struct {
VNDetectedObjectObservation
}
An object that represents a person that the request detects.
Inspecting the Observation ¶
- VNHumanObservation.UpperBodyOnly: A Boolean value that indicates whether the observation represents an upper-body or full-body rectangle.
See: https://developer.apple.com/documentation/Vision/VNHumanObservation
func NewHumanObservationWithBoundingBox ¶
func NewHumanObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNHumanObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewHumanObservationWithRequestRevisionBoundingBox ¶
func NewHumanObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNHumanObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewVNHumanObservation ¶
func NewVNHumanObservation() VNHumanObservation
NewVNHumanObservation creates a new VNHumanObservation instance.
func VNHumanObservationFromID ¶
func VNHumanObservationFromID(id objc.ID) VNHumanObservation
VNHumanObservationFromID constructs a VNHumanObservation from an objc.ID.
An object that represents a person that the request detects.
func (VNHumanObservation) Autorelease ¶
func (h VNHumanObservation) Autorelease() VNHumanObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNHumanObservation) Init ¶
func (h VNHumanObservation) Init() VNHumanObservation
Init initializes the instance.
func (VNHumanObservation) UpperBodyOnly ¶
func (h VNHumanObservation) UpperBodyOnly() bool
A Boolean value that indicates whether the observation represents an upper-body or full-body rectangle.
See: https://developer.apple.com/documentation/Vision/VNHumanObservation/upperBodyOnly
type VNHumanObservationClass ¶
type VNHumanObservationClass struct {
// contains filtered or unexported fields
}
func GetVNHumanObservationClass ¶
func GetVNHumanObservationClass() VNHumanObservationClass
GetVNHumanObservationClass returns the class object for VNHumanObservation.
func (VNHumanObservationClass) Alloc ¶
func (vc VNHumanObservationClass) Alloc() VNHumanObservation
Alloc allocates memory for a new instance of the class.
type VNImageAestheticsScoresObservation ¶
type VNImageAestheticsScoresObservation struct {
VNObservation
}
An object that represents the overall score of aesthetic attributes for an image.
Parsing Observation Content ¶
- VNImageAestheticsScoresObservation.OverallScore: A score which incorporates aesthetic score, failure score, and utility labels.
- VNImageAestheticsScoresObservation.IsUtility: A Boolean value that represents images that are not necessarily of poor image quality, but may not have memorable or exciting content.
See: https://developer.apple.com/documentation/Vision/VNImageAestheticsScoresObservation
func NewVNImageAestheticsScoresObservation ¶
func NewVNImageAestheticsScoresObservation() VNImageAestheticsScoresObservation
NewVNImageAestheticsScoresObservation creates a new VNImageAestheticsScoresObservation instance.
func VNImageAestheticsScoresObservationFromID ¶
func VNImageAestheticsScoresObservationFromID(id objc.ID) VNImageAestheticsScoresObservation
VNImageAestheticsScoresObservationFromID constructs a VNImageAestheticsScoresObservation from an objc.ID.
An object that represents the overall score of aesthetic attributes for an image.
func (VNImageAestheticsScoresObservation) Autorelease ¶
func (i VNImageAestheticsScoresObservation) Autorelease() VNImageAestheticsScoresObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNImageAestheticsScoresObservation) Init ¶
func (i VNImageAestheticsScoresObservation) Init() VNImageAestheticsScoresObservation
Init initializes the instance.
func (VNImageAestheticsScoresObservation) IsUtility ¶
func (i VNImageAestheticsScoresObservation) IsUtility() bool
A Boolean value that represents images that are not necessarily of poor image quality, but may not have memorable or exciting content.
See: https://developer.apple.com/documentation/Vision/VNImageAestheticsScoresObservation/isUtility
func (VNImageAestheticsScoresObservation) OverallScore ¶
func (i VNImageAestheticsScoresObservation) OverallScore() float32
A score which incorporates aesthetic score, failure score, and utility labels.
Discussion ¶
This returns a value within the range of `-1` and `1`, where `-1` is least desirable and `1` is most desirable.
See: https://developer.apple.com/documentation/Vision/VNImageAestheticsScoresObservation/overallScore
func (VNImageAestheticsScoresObservation) Results ¶
func (i VNImageAestheticsScoresObservation) Results() IVNImageAestheticsScoresObservation
The results of the aesthetics request.
See: https://developer.apple.com/documentation/vision/vncalculateimageaestheticsscoresrequest/results
func (VNImageAestheticsScoresObservation) SetResults ¶
func (i VNImageAestheticsScoresObservation) SetResults(value IVNImageAestheticsScoresObservation)
type VNImageAestheticsScoresObservationClass ¶
type VNImageAestheticsScoresObservationClass struct {
// contains filtered or unexported fields
}
func GetVNImageAestheticsScoresObservationClass ¶
func GetVNImageAestheticsScoresObservationClass() VNImageAestheticsScoresObservationClass
GetVNImageAestheticsScoresObservationClass returns the class object for VNImageAestheticsScoresObservation.
func (VNImageAestheticsScoresObservationClass) Alloc ¶
func (vc VNImageAestheticsScoresObservationClass) Alloc() VNImageAestheticsScoresObservation
Alloc allocates memory for a new instance of the class.
type VNImageAlignmentObservation ¶
type VNImageAlignmentObservation struct {
VNObservation
}
The abstract superclass for image-analysis results that describe the relative alignment of two images.
Overview ¶
This abstract superclass forms the basis of image alignment or registration output. You receive its subclasses, such as VNImageTranslationAlignmentObservation and VNImageHomographicAlignmentObservation, by performing specific registration requests. Don’t create one of these classes yourself.
See: https://developer.apple.com/documentation/Vision/VNImageAlignmentObservation
func NewVNImageAlignmentObservation ¶
func NewVNImageAlignmentObservation() VNImageAlignmentObservation
NewVNImageAlignmentObservation creates a new VNImageAlignmentObservation instance.
func VNImageAlignmentObservationFromID ¶
func VNImageAlignmentObservationFromID(id objc.ID) VNImageAlignmentObservation
VNImageAlignmentObservationFromID constructs a VNImageAlignmentObservation from an objc.ID.
The abstract superclass for image-analysis results that describe the relative alignment of two images.
func (VNImageAlignmentObservation) Autorelease ¶
func (i VNImageAlignmentObservation) Autorelease() VNImageAlignmentObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNImageAlignmentObservation) Init ¶
func (i VNImageAlignmentObservation) Init() VNImageAlignmentObservation
Init initializes the instance.
type VNImageAlignmentObservationClass ¶
type VNImageAlignmentObservationClass struct {
// contains filtered or unexported fields
}
func GetVNImageAlignmentObservationClass ¶
func GetVNImageAlignmentObservationClass() VNImageAlignmentObservationClass
GetVNImageAlignmentObservationClass returns the class object for VNImageAlignmentObservation.
func (VNImageAlignmentObservationClass) Alloc ¶
func (vc VNImageAlignmentObservationClass) Alloc() VNImageAlignmentObservation
Alloc allocates memory for a new instance of the class.
type VNImageBasedRequest ¶
type VNImageBasedRequest struct {
VNRequest
}
The abstract superclass for image-analysis requests that focus on a specific part of an image.
Overview ¶
Other Vision request handlers that operate on still images inherit from this abstract base class. Don’t use it directly.
Configuring a Request ¶
- VNImageBasedRequest.RegionOfInterest: The region of the image in which Vision will perform the request.
- VNImageBasedRequest.SetRegionOfInterest
See: https://developer.apple.com/documentation/Vision/VNImageBasedRequest
func NewImageBasedRequestWithCompletionHandler ¶
func NewImageBasedRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNImageBasedRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNImageBasedRequest ¶
func NewVNImageBasedRequest() VNImageBasedRequest
NewVNImageBasedRequest creates a new VNImageBasedRequest instance.
func VNImageBasedRequestFromID ¶
func VNImageBasedRequestFromID(id objc.ID) VNImageBasedRequest
VNImageBasedRequestFromID constructs a VNImageBasedRequest from an objc.ID.
The abstract superclass for image-analysis requests that focus on a specific part of an image.
func (VNImageBasedRequest) Autorelease ¶
func (i VNImageBasedRequest) Autorelease() VNImageBasedRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNImageBasedRequest) Init ¶
func (i VNImageBasedRequest) Init() VNImageBasedRequest
Init initializes the instance.
func (VNImageBasedRequest) RegionOfInterest ¶
func (i VNImageBasedRequest) RegionOfInterest() corefoundation.CGRect
The region of the image in which Vision will perform the request.
Discussion ¶
The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image’s lower-left corner.
The default value is `{ { 0, 0 }, { 1, 1 } }`.
See: https://developer.apple.com/documentation/Vision/VNImageBasedRequest/regionOfInterest
func (VNImageBasedRequest) SetRegionOfInterest ¶
func (i VNImageBasedRequest) SetRegionOfInterest(value corefoundation.CGRect)
type VNImageBasedRequestClass ¶
type VNImageBasedRequestClass struct {
// contains filtered or unexported fields
}
func GetVNImageBasedRequestClass ¶
func GetVNImageBasedRequestClass() VNImageBasedRequestClass
GetVNImageBasedRequestClass returns the class object for VNImageBasedRequest.
func (VNImageBasedRequestClass) Alloc ¶
func (vc VNImageBasedRequestClass) Alloc() VNImageBasedRequest
Alloc allocates memory for a new instance of the class.
type VNImageCropAndScaleOption ¶
type VNImageCropAndScaleOption int
See: https://developer.apple.com/documentation/Vision/VNImageCropAndScaleOption
const ( // VNImageCropAndScaleOptionCenterCrop: An option that scales the image to fit its shorter side within the input dimensions, while preserving its aspect ratio, and center-crops the image. VNImageCropAndScaleOptionCenterCrop VNImageCropAndScaleOption = 0 // VNImageCropAndScaleOptionScaleFill: An option that scales the image to fill the input dimensions, resizing it if necessary. VNImageCropAndScaleOptionScaleFill VNImageCropAndScaleOption = 2 // VNImageCropAndScaleOptionScaleFillRotate90CCW: An option that rotates the image 90 degrees counterclockwise and then scales it to fill the input dimensions. VNImageCropAndScaleOptionScaleFillRotate90CCW VNImageCropAndScaleOption = 256 // VNImageCropAndScaleOptionScaleFit: An option that scales the image to fit its longer side within the input dimensions, while preserving its aspect ratio, and center-crops the image. VNImageCropAndScaleOptionScaleFit VNImageCropAndScaleOption = 1 // VNImageCropAndScaleOptionScaleFitRotate90CCW: An option that rotates the image 90 degrees counterclockwise and then scales it, while preserving its aspect ratio, to fit on the long side. VNImageCropAndScaleOptionScaleFitRotate90CCW VNImageCropAndScaleOption = 256 )
func (VNImageCropAndScaleOption) String ¶
func (e VNImageCropAndScaleOption) String() string
type VNImageHomographicAlignmentObservation ¶
type VNImageHomographicAlignmentObservation struct {
VNImageAlignmentObservation
}
An object that represents a perspective warp transformation.
Overview ¶
This type of observation results from a VNHomographicImageRegistrationRequest, informing the VNImageHomographicAlignmentObservation.WarpTransform performed to align the input images.
Accessing the Transform ¶
- VNImageHomographicAlignmentObservation.WarpTransform: The warp transform matrix to morph the floating image into the reference image.
See: https://developer.apple.com/documentation/Vision/VNImageHomographicAlignmentObservation
func NewVNImageHomographicAlignmentObservation ¶
func NewVNImageHomographicAlignmentObservation() VNImageHomographicAlignmentObservation
NewVNImageHomographicAlignmentObservation creates a new VNImageHomographicAlignmentObservation instance.
func VNImageHomographicAlignmentObservationFromID ¶
func VNImageHomographicAlignmentObservationFromID(id objc.ID) VNImageHomographicAlignmentObservation
VNImageHomographicAlignmentObservationFromID constructs a VNImageHomographicAlignmentObservation from an objc.ID.
An object that represents a perspective warp transformation.
func (VNImageHomographicAlignmentObservation) Autorelease ¶
func (i VNImageHomographicAlignmentObservation) Autorelease() VNImageHomographicAlignmentObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNImageHomographicAlignmentObservation) WarpTransform ¶
func (i VNImageHomographicAlignmentObservation) WarpTransform() objectivec.IObject
The warp transform matrix to morph the floating image into the reference image.
type VNImageHomographicAlignmentObservationClass ¶
type VNImageHomographicAlignmentObservationClass struct {
// contains filtered or unexported fields
}
func GetVNImageHomographicAlignmentObservationClass ¶
func GetVNImageHomographicAlignmentObservationClass() VNImageHomographicAlignmentObservationClass
GetVNImageHomographicAlignmentObservationClass returns the class object for VNImageHomographicAlignmentObservation.
func (VNImageHomographicAlignmentObservationClass) Alloc ¶
func (vc VNImageHomographicAlignmentObservationClass) Alloc() VNImageHomographicAlignmentObservation
Alloc allocates memory for a new instance of the class.
type VNImageOption ¶
type VNImageOption = string
VNImageOption is an option key passed into an image request handler that takes an auxiliary image.
See: https://developer.apple.com/documentation/Vision/VNImageOption
type VNImageRegistrationRequest ¶
type VNImageRegistrationRequest struct {
VNTargetedImageRequest
}
The abstract superclass for image-analysis requests that align images according to their content.
Overview ¶
This abstract superclass forms the basis of image alignment or registration requests. Make specific requests through one of its subclasses, VNTranslationalImageRegistrationRequest or VNHomographicImageRegistrationRequest. Don’t create an instance of this superclass yourself.
See: https://developer.apple.com/documentation/Vision/VNImageRegistrationRequest
func NewImageRegistrationRequestWithCompletionHandler ¶
func NewImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewImageRegistrationRequestWithTargetedCGImageOptions ¶
func NewImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a Core Graphics image.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
func NewImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting a Core Graphics image, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptions ¶
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a Core Graphics image of known orientation.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCGImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCGImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCIImageOptions ¶
func NewImageRegistrationRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
func NewImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptions ¶
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCIImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCIImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptions ¶
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:options: sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request with a completion handler that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientation values. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:orientation:options: sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientations. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:orientation:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptions ¶
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCVPixelBuffer:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCVPixelBuffer:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedImageDataOptions ¶
func NewImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting an image as raw data.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting an image as raw data, executing the completion handler when done.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptions ¶
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a raw data image of known orientation.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageData:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageData:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedImageURLOptions ¶
func NewImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting an image at the specified URL.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting an image at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptions ¶
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting an image of known orientation, at the specified URL.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageURL:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNImageRegistrationRequest
Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageURL:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewVNImageRegistrationRequest ¶
func NewVNImageRegistrationRequest() VNImageRegistrationRequest
NewVNImageRegistrationRequest creates a new VNImageRegistrationRequest instance.
func VNImageRegistrationRequestFromID ¶
func VNImageRegistrationRequestFromID(id objc.ID) VNImageRegistrationRequest
VNImageRegistrationRequestFromID constructs a VNImageRegistrationRequest from an objc.ID.
The abstract superclass for image-analysis requests that align images according to their content.
func (VNImageRegistrationRequest) Autorelease ¶
func (i VNImageRegistrationRequest) Autorelease() VNImageRegistrationRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNImageRegistrationRequest) Init ¶
func (i VNImageRegistrationRequest) Init() VNImageRegistrationRequest
Init initializes the instance.
type VNImageRegistrationRequestClass ¶
type VNImageRegistrationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNImageRegistrationRequestClass ¶
func GetVNImageRegistrationRequestClass() VNImageRegistrationRequestClass
GetVNImageRegistrationRequestClass returns the class object for VNImageRegistrationRequest.
func (VNImageRegistrationRequestClass) Alloc ¶
func (vc VNImageRegistrationRequestClass) Alloc() VNImageRegistrationRequest
Alloc allocates memory for a new instance of the class.
type VNImageRequestHandler ¶
type VNImageRequestHandler struct {
objectivec.Object
}
An object that processes one or more image-analysis request pertaining to a single image.
Overview ¶
Instantiate this handler to perform Vision requests on a single image. You specify the image and, optionally, a completion handler at the time of creation, and call VNImageRequestHandler.PerformRequestsError to begin executing the request.
Creating a Request Handler ¶
- VNImageRequestHandler.InitWithCGImageOptions: Creates a handler to be used for performing requests on Core Graphics images.
- VNImageRequestHandler.InitWithCGImageOrientationOptions: Creates a handler to be used for performing requests on a Core Graphics image with known orientation.
- VNImageRequestHandler.InitWithCIImageOptions: Creates a handler to use for performing requests on Core Image image data.
- VNImageRequestHandler.InitWithCIImageOrientationOptions: Creates a handler to be used for performing requests on Core Image image data of a known orientation.
- VNImageRequestHandler.InitWithCVPixelBufferOptions: Creates a handler for performing requests on a Core Video pixel buffer.
- VNImageRequestHandler.InitWithCVPixelBufferOrientationOptions: Creates a handler for performing requests on a Core Video pixel buffer of a known orientation.
- VNImageRequestHandler.InitWithCVPixelBufferDepthDataOrientationOptions
- VNImageRequestHandler.InitWithCMSampleBufferOptions: Creates a request handler that performs requests on an image contained within a sample buffer.
- VNImageRequestHandler.InitWithCMSampleBufferOrientationOptions: Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer.
- VNImageRequestHandler.InitWithCMSampleBufferDepthDataOrientationOptions: Creates a request handler that performs requests on an image in a sample buffer that contains depth data.
- VNImageRequestHandler.InitWithDataOptions: Creates a handler to use for performing requests on an image in a data object.
- VNImageRequestHandler.InitWithDataOrientationOptions: Creates a handler to use for performing requests on an image of known orientation.
- VNImageRequestHandler.InitWithURLOptions: Creates a handler to be used for performing requests on an image at the specified URL.
- VNImageRequestHandler.InitWithURLOrientationOptions: Creates a handler to be used for performing requests on an image with known orientation, at the specified URL.
Executing a Request Handler ¶
- VNImageRequestHandler.PerformRequestsError: Schedules Vision requests to perform.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler
func NewImageRequestHandlerWithCGImageOptions ¶
func NewImageRequestHandlerWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on Core Graphics images.
image: A [CGImage] containing the image to be used for performing the requests. Image content is immutable. // [CGImage]: https://developer.apple.com/documentation/CoreGraphics/CGImage
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cgImage:options:)
func NewImageRequestHandlerWithCGImageOrientationOptions ¶
func NewImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on a Core Graphics image with known orientation.
image: A [CGImage] containing the image to be used for performing the requests. Image content is immutable. // [CGImage]: https://developer.apple.com/documentation/CoreGraphics/CGImage
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cgImage:orientation:options:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithCIImageOptions ¶
func NewImageRequestHandlerWithCIImageOptions(image coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to use for performing requests on Core Image image data.
image: A [CIImage] containing the image to be used for performing the requests. Image content is immutable. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: An optional dictionary containing [properties] keys to auxiliary image data. // [properties]: https://developer.apple.com/documentation/Vision/VNImageOption/properties
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(ciImage:options:)
func NewImageRequestHandlerWithCIImageOrientationOptions ¶
func NewImageRequestHandlerWithCIImageOrientationOptions(image coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on Core Image image data of a known orientation.
image: A [CIImage] containing the image to be used for performing the requests. Image content is immutable. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(ciImage:orientation:options:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions ¶
func NewImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer objectivec.IObject, depthData objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a request handler that performs requests on an image in a sample buffer that contains depth data.
sampleBuffer: The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.
depthData: The depth data to associate with the image.
orientation: The EXIF orientation of the image.
options: A dictionary that specifies auxiliary information about the image.
Discussion ¶
Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cmSampleBuffer:depthData:orientation:options:) sampleBuffer is a [coremedia.CMSampleBufferRef]. depthData is a [avfoundation.AVDepthData]. orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithCMSampleBufferOptions ¶
func NewImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a request handler that performs requests on an image contained within a sample buffer.
sampleBuffer: The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.
options: A dictionary that specifies auxiliary information about the image.
Discussion ¶
Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cmSampleBuffer:options:) sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewImageRequestHandlerWithCMSampleBufferOrientationOptions ¶
func NewImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer.
sampleBuffer: The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.
orientation: The EXIF orientation of the image.
options: A dictionary that specifies auxiliary information about the image.
Discussion ¶
Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cmSampleBuffer:orientation:options:) sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions ¶
func NewImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cvPixelBuffer:depthData:orientation:options:) depthData is a [avfoundation.AVDepthData]. orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithCVPixelBufferOptions ¶
func NewImageRequestHandlerWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler for performing requests on a Core Video pixel buffer.
pixelBuffer: A pixel buffer that contains the image to use for performing the requests. The contents can’t change for the lifetime of the request handler.
options: A dictionary that specifies auxiliary information about the image.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cvPixelBuffer:options:)
func NewImageRequestHandlerWithCVPixelBufferOrientationOptions ¶
func NewImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler for performing requests on a Core Video pixel buffer of a known orientation.
pixelBuffer: A pixel buffer that contains the image to use for performing the requests. The contents can’t change for the lifetime of the request handler.
orientation: The orientation of the input image.
options: A dictionary that specifies auxiliary information about the image.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cvPixelBuffer:orientation:options:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithDataOptions ¶
func NewImageRequestHandlerWithDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to use for performing requests on an image in a data object.
imageData: Data containing the image to be used for performing the requests. Image content is immutable.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
Discussion ¶
The intended use cases of this type of initializer include compressed images and network downloads, where a client may receive a JPEG from a website or the cloud.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(data:options:)
func NewImageRequestHandlerWithDataOrientationOptions ¶
func NewImageRequestHandlerWithDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to use for performing requests on an image of known orientation.
imageData: Data containing the image to be used for performing the requests. Image content is immutable.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
Discussion ¶
The intended use cases of this type of initializer include compressed images and network downloads, where a client may receive a JPEG from a website or the cloud.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(data:orientation:options:) orientation is a [imageio.CGImagePropertyOrientation].
func NewImageRequestHandlerWithURLOptions ¶
func NewImageRequestHandlerWithURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on an image at the specified URL.
imageURL: A URL pointing to the image to be used for performing the requests. The image must be in a format supported by [Image I/O]. Image content is immutable. // [Image I/O]: https://developer.apple.com/documentation/ImageIO
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(url:options:)
func NewImageRequestHandlerWithURLOrientationOptions ¶
func NewImageRequestHandlerWithURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on an image with known orientation, at the specified URL.
imageURL: A URL pointing to the image to be used for performing the requests. The image must be in a format supported by [Image I/O]. Image content is immutable. // [Image I/O]: https://developer.apple.com/documentation/ImageIO
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(url:orientation:options:) orientation is a [imageio.CGImagePropertyOrientation].
func NewVNImageRequestHandler ¶
func NewVNImageRequestHandler() VNImageRequestHandler
NewVNImageRequestHandler creates a new VNImageRequestHandler instance.
func VNImageRequestHandlerFromID ¶
func VNImageRequestHandlerFromID(id objc.ID) VNImageRequestHandler
VNImageRequestHandlerFromID constructs a VNImageRequestHandler from an objc.ID.
An object that processes one or more image-analysis request pertaining to a single image.
func (VNImageRequestHandler) Autorelease ¶
func (i VNImageRequestHandler) Autorelease() VNImageRequestHandler
Autorelease adds the receiver to the current autorelease pool.
func (VNImageRequestHandler) Init ¶
func (i VNImageRequestHandler) Init() VNImageRequestHandler
Init initializes the instance.
func (VNImageRequestHandler) InitWithCGImageOptions ¶
func (i VNImageRequestHandler) InitWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on Core Graphics images.
image: A [CGImage] containing the image to be used for performing the requests. Image content is immutable. // [CGImage]: https://developer.apple.com/documentation/CoreGraphics/CGImage
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cgImage:options:)
func (VNImageRequestHandler) InitWithCGImageOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on a Core Graphics image with known orientation.
image: A [CGImage] containing the image to be used for performing the requests. Image content is immutable. // [CGImage]: https://developer.apple.com/documentation/CoreGraphics/CGImage
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNImageRequestHandler) InitWithCIImageOptions ¶
func (i VNImageRequestHandler) InitWithCIImageOptions(image coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to use for performing requests on Core Image image data.
image: A [CIImage] containing the image to be used for performing the requests. Image content is immutable. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: An optional dictionary containing [properties] keys to auxiliary image data. // [properties]: https://developer.apple.com/documentation/Vision/VNImageOption/properties
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(ciImage:options:)
func (VNImageRequestHandler) InitWithCIImageOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCIImageOrientationOptions(image coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on Core Image image data of a known orientation.
image: A [CIImage] containing the image to be used for performing the requests. Image content is immutable. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNImageRequestHandler) InitWithCMSampleBufferDepthDataOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer objectivec.IObject, depthData objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a request handler that performs requests on an image in a sample buffer that contains depth data.
sampleBuffer: The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.
depthData: The depth data to associate with the image.
orientation: The EXIF orientation of the image.
options: A dictionary that specifies auxiliary information about the image.
sampleBuffer is a [coremedia.CMSampleBufferRef].
depthData is a [avfoundation.AVDepthData].
orientation is a [imageio.CGImagePropertyOrientation].
Discussion ¶
Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.
func (VNImageRequestHandler) InitWithCMSampleBufferOptions ¶
func (i VNImageRequestHandler) InitWithCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a request handler that performs requests on an image contained within a sample buffer.
sampleBuffer: The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.
options: A dictionary that specifies auxiliary information about the image.
sampleBuffer is a [coremedia.CMSampleBufferRef].
Discussion ¶
Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cmSampleBuffer:options:)
func (VNImageRequestHandler) InitWithCMSampleBufferOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer.
sampleBuffer: The sample buffer that contains the image to analyze. If the sample buffer doesn’t contain an image buffer with image data, the system raises an error.
orientation: The EXIF orientation of the image.
options: A dictionary that specifies auxiliary information about the image.
sampleBuffer is a [coremedia.CMSampleBufferRef].
orientation is a [imageio.CGImagePropertyOrientation].
Discussion ¶
Sample buffers may contain metadata, like the camera intrinsics. Vision algorithms that support this metadata use it in their analysis, unless overwritten by the options you specify.
func (VNImageRequestHandler) InitWithCVPixelBufferDepthDataOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
depthData is a [avfoundation.AVDepthData].
orientation is a [imageio.CGImagePropertyOrientation].
func (VNImageRequestHandler) InitWithCVPixelBufferOptions ¶
func (i VNImageRequestHandler) InitWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler for performing requests on a Core Video pixel buffer.
pixelBuffer: A pixel buffer that contains the image to use for performing the requests. The contents can’t change for the lifetime of the request handler.
options: A dictionary that specifies auxiliary information about the image.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cvPixelBuffer:options:)
func (VNImageRequestHandler) InitWithCVPixelBufferOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler for performing requests on a Core Video pixel buffer of a known orientation.
pixelBuffer: A pixel buffer that contains the image to use for performing the requests. The contents can’t change for the lifetime of the request handler.
orientation: The orientation of the input image.
options: A dictionary that specifies auxiliary information about the image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNImageRequestHandler) InitWithDataOptions ¶
func (i VNImageRequestHandler) InitWithDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to use for performing requests on an image in a data object.
imageData: Data containing the image to be used for performing the requests. Image content is immutable.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
Discussion ¶
The intended use cases of this type of initializer include compressed images and network downloads, where a client may receive a JPEG from a website or the cloud.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(data:options:)
func (VNImageRequestHandler) InitWithDataOrientationOptions ¶
func (i VNImageRequestHandler) InitWithDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to use for performing requests on an image of known orientation.
imageData: Data containing the image to be used for performing the requests. Image content is immutable.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
orientation is a [imageio.CGImagePropertyOrientation].
Discussion ¶
The intended use cases of this type of initializer include compressed images and network downloads, where a client may receive a JPEG from a website or the cloud.
func (VNImageRequestHandler) InitWithURLOptions ¶
func (i VNImageRequestHandler) InitWithURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on an image at the specified URL.
imageURL: A URL pointing to the image to be used for performing the requests. The image must be in a format supported by [Image I/O]. Image content is immutable. // [Image I/O]: https://developer.apple.com/documentation/ImageIO
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(url:options:)
func (VNImageRequestHandler) InitWithURLOrientationOptions ¶
func (i VNImageRequestHandler) InitWithURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNImageRequestHandler
Creates a handler to be used for performing requests on an image with known orientation, at the specified URL.
imageURL: A URL pointing to the image to be used for performing the requests. The image must be in a format supported by [Image I/O]. Image content is immutable. // [Image I/O]: https://developer.apple.com/documentation/ImageIO
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNImageRequestHandler) PerformRequestsError ¶
func (i VNImageRequestHandler) PerformRequestsError(requests []VNRequest) (bool, error)
Schedules Vision requests to perform.
requests: An array of Vision requests to perform.
Discussion ¶
The function returns after all requests have either completed or failed. Check individual requests and errors for their respective successes and failures.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/perform(_:)
type VNImageRequestHandlerClass ¶
type VNImageRequestHandlerClass struct {
// contains filtered or unexported fields
}
func GetVNImageRequestHandlerClass ¶
func GetVNImageRequestHandlerClass() VNImageRequestHandlerClass
GetVNImageRequestHandlerClass returns the class object for VNImageRequestHandler.
func (VNImageRequestHandlerClass) Alloc ¶
func (vc VNImageRequestHandlerClass) Alloc() VNImageRequestHandler
Alloc allocates memory for a new instance of the class.
type VNImageTranslationAlignmentObservation ¶
type VNImageTranslationAlignmentObservation struct {
VNImageAlignmentObservation
}
Affine transform information that an image-alignment request produces.
Overview ¶
This type of observation results from a VNTranslationalImageRegistrationRequest, informing the VNImageTranslationAlignmentObservation.AlignmentTransform performed to align the input images.
Determining Alignment ¶
- VNImageTranslationAlignmentObservation.AlignmentTransform: The alignment transform to align the floating image with the reference image.
Identifying Request Revisions ¶
- VNImageTranslationAlignmentObservation.VNTranslationalImageRegistrationRequestRevision1: A constant for specifying revision 1 of the translational image registration request.
See: https://developer.apple.com/documentation/Vision/VNImageTranslationAlignmentObservation
func NewVNImageTranslationAlignmentObservation ¶
func NewVNImageTranslationAlignmentObservation() VNImageTranslationAlignmentObservation
NewVNImageTranslationAlignmentObservation creates a new VNImageTranslationAlignmentObservation instance.
func VNImageTranslationAlignmentObservationFromID ¶
func VNImageTranslationAlignmentObservationFromID(id objc.ID) VNImageTranslationAlignmentObservation
VNImageTranslationAlignmentObservationFromID constructs a VNImageTranslationAlignmentObservation from an objc.ID.
Affine transform information that an image-alignment request produces.
func (VNImageTranslationAlignmentObservation) AlignmentTransform ¶
func (i VNImageTranslationAlignmentObservation) AlignmentTransform() corefoundation.CGAffineTransform
The alignment transform to align the floating image with the reference image.
func (VNImageTranslationAlignmentObservation) Autorelease ¶
func (i VNImageTranslationAlignmentObservation) Autorelease() VNImageTranslationAlignmentObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNImageTranslationAlignmentObservation) VNTranslationalImageRegistrationRequestRevision1 ¶
func (i VNImageTranslationAlignmentObservation) VNTranslationalImageRegistrationRequestRevision1() int
A constant for specifying revision 1 of the translational image registration request.
See: https://developer.apple.com/documentation/vision/vntranslationalimageregistrationrequestrevision1
type VNImageTranslationAlignmentObservationClass ¶
type VNImageTranslationAlignmentObservationClass struct {
// contains filtered or unexported fields
}
func GetVNImageTranslationAlignmentObservationClass ¶
func GetVNImageTranslationAlignmentObservationClass() VNImageTranslationAlignmentObservationClass
GetVNImageTranslationAlignmentObservationClass returns the class object for VNImageTranslationAlignmentObservation.
func (VNImageTranslationAlignmentObservationClass) Alloc ¶
func (vc VNImageTranslationAlignmentObservationClass) Alloc() VNImageTranslationAlignmentObservation
Alloc allocates memory for a new instance of the class.
type VNInstanceMaskObservation ¶
type VNInstanceMaskObservation struct {
VNObservation
}
An observation that contains an instance mask that labels instances in the mask.
Accessing Instances ¶
- VNInstanceMaskObservation.AllInstances: The collection that contains all instances, excluding the background.
- VNInstanceMaskObservation.InstanceMask: The resulting mask that represents all instances.
Creating a Mask ¶
- VNInstanceMaskObservation.GenerateMaskForInstancesError: Creates a low-resolution mask from the instances you specify.
- VNInstanceMaskObservation.GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError: Creates a high-resolution image where everything becomes transparent black, except for the instances you specify.
- VNInstanceMaskObservation.GenerateScaledMaskForImageForInstancesFromRequestHandlerError: Creates a high-resolution mask where everything becomes transparent black, except for the instances you specify.
See: https://developer.apple.com/documentation/Vision/VNInstanceMaskObservation
func NewVNInstanceMaskObservation ¶
func NewVNInstanceMaskObservation() VNInstanceMaskObservation
NewVNInstanceMaskObservation creates a new VNInstanceMaskObservation instance.
func VNInstanceMaskObservationFromID ¶
func VNInstanceMaskObservationFromID(id objc.ID) VNInstanceMaskObservation
VNInstanceMaskObservationFromID constructs a VNInstanceMaskObservation from an objc.ID.
An observation that contains an instance mask that labels instances in the mask.
func (VNInstanceMaskObservation) AllInstances ¶
func (i VNInstanceMaskObservation) AllInstances() foundation.NSIndexSet
The collection that contains all instances, excluding the background.
See: https://developer.apple.com/documentation/Vision/VNInstanceMaskObservation/allInstances
func (VNInstanceMaskObservation) Autorelease ¶
func (i VNInstanceMaskObservation) Autorelease() VNInstanceMaskObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNInstanceMaskObservation) GenerateMaskForInstancesError ¶
func (i VNInstanceMaskObservation) GenerateMaskForInstancesError(instances foundation.NSIndexSet) (corevideo.CVImageBufferRef, error)
Creates a low-resolution mask from the instances you specify.
instances: The collection of instances.
Return Value ¶
The pixel buffer that contains the image.
func (VNInstanceMaskObservation) GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError ¶
func (i VNInstanceMaskObservation) GenerateMaskedImageOfInstancesFromRequestHandlerCroppedToInstancesExtentError(instances foundation.NSIndexSet, requestHandler IVNImageRequestHandler, cropResult bool) (corevideo.CVImageBufferRef, error)
Creates a high-resolution image where everything becomes transparent black, except for the instances you specify.
instances: The collection of instances.
requestHandler: The image request callback.
cropResult: A Boolean value that indicates whether to crop the image to the smallest rectangle that contains all instances.
Return Value ¶
The pixel buffer that contains the image.
func (VNInstanceMaskObservation) GenerateScaledMaskForImageForInstancesFromRequestHandlerError ¶
func (i VNInstanceMaskObservation) GenerateScaledMaskForImageForInstancesFromRequestHandlerError(instances foundation.NSIndexSet, requestHandler IVNImageRequestHandler) (corevideo.CVImageBufferRef, error)
Creates a high-resolution mask where everything becomes transparent black, except for the instances you specify.
instances: The collection of instances.
requestHandler: The image request callback.
Return Value ¶
The pixel buffer that contains the image.
func (VNInstanceMaskObservation) Init ¶
func (i VNInstanceMaskObservation) Init() VNInstanceMaskObservation
Init initializes the instance.
func (VNInstanceMaskObservation) InstanceMask ¶
func (i VNInstanceMaskObservation) InstanceMask() corevideo.CVImageBufferRef
The resulting mask that represents all instances.
Discussion ¶
A pixel can only correspond to one instance. A `0` represents the background, and all other values represent the indices of the instances.
See: https://developer.apple.com/documentation/Vision/VNInstanceMaskObservation/instanceMask
func (VNInstanceMaskObservation) VNGenerateForegroundInstanceMaskRequestRevision1 ¶
func (i VNInstanceMaskObservation) VNGenerateForegroundInstanceMaskRequestRevision1() int
A constant for specifying the first revision of the foreground instance mask request.
See: https://developer.apple.com/documentation/vision/vngenerateforegroundinstancemaskrequestrevision1
type VNInstanceMaskObservationClass ¶
type VNInstanceMaskObservationClass struct {
// contains filtered or unexported fields
}
func GetVNInstanceMaskObservationClass ¶
func GetVNInstanceMaskObservationClass() VNInstanceMaskObservationClass
GetVNInstanceMaskObservationClass returns the class object for VNInstanceMaskObservation.
func (VNInstanceMaskObservationClass) Alloc ¶
func (vc VNInstanceMaskObservationClass) Alloc() VNInstanceMaskObservation
Alloc allocates memory for a new instance of the class.
type VNObservation ¶
type VNObservation struct {
objectivec.Object
}
The abstract superclass for analysis results.
Overview ¶
Observations resulting from Vision image analysis requests inherit from this abstract base class. Don’t use this abstract superclass directly.
Tracking Observations ¶
- VNObservation.Uuid: A unique identifier assigned to the Vision observation.
Evaluating Observations ¶
- VNObservation.TimeRange: The time range of the reported observation.
- VNObservation.Confidence: The level of confidence in the observation’s accuracy.
See: https://developer.apple.com/documentation/Vision/VNObservation
func NewVNObservation ¶
func NewVNObservation() VNObservation
NewVNObservation creates a new VNObservation instance.
func VNObservationFromID ¶
func VNObservationFromID(id objc.ID) VNObservation
VNObservationFromID constructs a VNObservation from an objc.ID.
The abstract superclass for analysis results.
func (VNObservation) Autorelease ¶
func (o VNObservation) Autorelease() VNObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNObservation) Confidence ¶
func (o VNObservation) Confidence() VNConfidence
The level of confidence in the observation’s accuracy.
Discussion ¶
The Vision framework normalizes this value to `[0.0, 1.0]` under most circumstances. A value of `0.0` indicates no confidence. A value of `1.0` indicates highest confidence, or the observation doesn’t support or assign meaning to confidence.
See: https://developer.apple.com/documentation/Vision/VNObservation/confidence
func (VNObservation) EncodeWithCoder ¶
func (o VNObservation) EncodeWithCoder(coder foundation.INSCoder)
func (VNObservation) Init ¶
func (o VNObservation) Init() VNObservation
Init initializes the instance.
func (VNObservation) RequestRevision ¶
func (o VNObservation) RequestRevision() uint
The revision of the VNRequest subclass used to generate the implementing object.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
func (VNObservation) TimeRange ¶
func (o VNObservation) TimeRange() objectivec.IObject
The time range of the reported observation.
Discussion ¶
When evaluating a sequence of image buffers, use this property to determine each observation’s start time and duration. If a request doesn’t support time ranges, or the time range is unknown, the value of this property is zero.
See: https://developer.apple.com/documentation/Vision/VNObservation/timeRange
func (VNObservation) Uuid ¶
func (o VNObservation) Uuid() foundation.NSUUID
A unique identifier assigned to the Vision observation.
See: https://developer.apple.com/documentation/Vision/VNObservation/uuid
type VNObservationClass ¶
type VNObservationClass struct {
// contains filtered or unexported fields
}
func GetVNObservationClass ¶
func GetVNObservationClass() VNObservationClass
GetVNObservationClass returns the class object for VNObservation.
func (VNObservationClass) Alloc ¶
func (vc VNObservationClass) Alloc() VNObservation
Alloc allocates memory for a new instance of the class.
type VNPixelBufferObservation ¶
type VNPixelBufferObservation struct {
VNObservation
}
An object that represents an image that an image-analysis request produces.
Overview ¶
This type of observation results from performing a VNCoreMLRequest image analysis with a Core ML model that has an image-to-image processing role. For example, this observation might result from a model that analyzes the style of one image and then transfers that style to a different image.
Vision infers that an MLModel object is an image-to-image model if that model includes an image. Its VNPixelBufferObservation.ModelDescription object includes an image-typed feature description in its VNPixelBufferObservation.OutputDescriptionsByName dictionary.
Parsing Observation Content ¶
- VNPixelBufferObservation.PixelBuffer: The image that results from a request with image output.
- VNPixelBufferObservation.FeatureName: A feature name that the CoreML model defines.
See: https://developer.apple.com/documentation/Vision/VNPixelBufferObservation
func NewVNPixelBufferObservation ¶
func NewVNPixelBufferObservation() VNPixelBufferObservation
NewVNPixelBufferObservation creates a new VNPixelBufferObservation instance.
func VNPixelBufferObservationFromID ¶
func VNPixelBufferObservationFromID(id objc.ID) VNPixelBufferObservation
VNPixelBufferObservationFromID constructs a VNPixelBufferObservation from an objc.ID.
An object that represents an image that an image-analysis request produces.
func (VNPixelBufferObservation) Autorelease ¶
func (p VNPixelBufferObservation) Autorelease() VNPixelBufferObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNPixelBufferObservation) FeatureName ¶
func (p VNPixelBufferObservation) FeatureName() string
A feature name that the CoreML model defines.
Discussion ¶
This value is nil if the observation isn’t the result of a VNCoreMLRequest operation.
See: https://developer.apple.com/documentation/Vision/VNPixelBufferObservation/featureName
func (VNPixelBufferObservation) Init ¶
func (p VNPixelBufferObservation) Init() VNPixelBufferObservation
Init initializes the instance.
func (VNPixelBufferObservation) ModelDescription ¶
func (p VNPixelBufferObservation) ModelDescription() coreml.MLModelDescription
Model information you use at runtime during development, which Xcode also displays in its Core ML model editor view.
See: https://developer.apple.com/documentation/CoreML/MLModel/modelDescription
func (VNPixelBufferObservation) OutputDescriptionsByName ¶
func (p VNPixelBufferObservation) OutputDescriptionsByName() coreml.MLFeatureDescription
A dictionary of output feature descriptions, which the model keys by the output’s name.
See: https://developer.apple.com/documentation/CoreML/MLModelDescription/outputDescriptionsByName
func (VNPixelBufferObservation) PixelBuffer ¶
func (p VNPixelBufferObservation) PixelBuffer() corevideo.CVImageBufferRef
The image that results from a request with image output.
Discussion ¶
VNCoreMLRequest produces observations that contain images in pixel buffer format. The confidence level is always `1.0`.
See: https://developer.apple.com/documentation/Vision/VNPixelBufferObservation/pixelBuffer
func (VNPixelBufferObservation) SetModelDescription ¶
func (p VNPixelBufferObservation) SetModelDescription(value coreml.MLModelDescription)
func (VNPixelBufferObservation) SetOutputDescriptionsByName ¶
func (p VNPixelBufferObservation) SetOutputDescriptionsByName(value coreml.MLFeatureDescription)
type VNPixelBufferObservationClass ¶
type VNPixelBufferObservationClass struct {
// contains filtered or unexported fields
}
func GetVNPixelBufferObservationClass ¶
func GetVNPixelBufferObservationClass() VNPixelBufferObservationClass
GetVNPixelBufferObservationClass returns the class object for VNPixelBufferObservation.
func (VNPixelBufferObservationClass) Alloc ¶
func (vc VNPixelBufferObservationClass) Alloc() VNPixelBufferObservation
Alloc allocates memory for a new instance of the class.
type VNPoint ¶
type VNPoint struct {
objectivec.Object
}
An immutable object that represents a single 2D point in an image.
Creating a Point ¶
- VNPoint.InitWithXY: Creates a point object with the specified coordinates.
- VNPoint.InitWithLocation: Creates a point object from the specified Core Graphics point.
Inspecting a Point ¶
- VNPoint.X: The x-coordinate.
- VNPoint.Y: The y-coordinate.
- VNPoint.Location: The Core Graphics point for this point.
Calculating Distance ¶
- VNPoint.DistanceToPoint: Returns the distance to another point.
See: https://developer.apple.com/documentation/Vision/VNPoint
func NewPointWithLocation ¶
func NewPointWithLocation(location corefoundation.CGPoint) VNPoint
Creates a point object from the specified Core Graphics point.
location: The Core Graphics point.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(location:)
func NewPointWithXY ¶
Creates a point object with the specified coordinates.
x: The x-coordinate value.
y: The y-coordinate value.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(x:y:)
func VNPointFromID ¶
VNPointFromID constructs a VNPoint from an objc.ID.
An immutable object that represents a single 2D point in an image.
func (VNPoint) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (VNPoint) DistanceToPoint ¶
Returns the distance to another point.
point: The point for which to calculate the distance.
Return Value ¶
The calculated distance.
See: https://developer.apple.com/documentation/Vision/VNPoint/distance(_:)
func (VNPoint) EncodeWithCoder ¶
func (p VNPoint) EncodeWithCoder(coder foundation.INSCoder)
func (VNPoint) InitWithLocation ¶
func (p VNPoint) InitWithLocation(location corefoundation.CGPoint) VNPoint
Creates a point object from the specified Core Graphics point.
location: The Core Graphics point.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(location:)
func (VNPoint) InitWithXY ¶
Creates a point object with the specified coordinates.
x: The x-coordinate value.
y: The y-coordinate value.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(x:y:)
func (VNPoint) Location ¶
func (p VNPoint) Location() corefoundation.CGPoint
The Core Graphics point for this point.
See: https://developer.apple.com/documentation/Vision/VNPoint/location
func (VNPoint) X ¶
The x-coordinate.
See: https://developer.apple.com/documentation/Vision/VNPoint/x
func (VNPoint) Y ¶
The y-coordinate.
See: https://developer.apple.com/documentation/Vision/VNPoint/y
type VNPoint3D ¶
type VNPoint3D struct {
objectivec.Object
}
An object that represents a 3D point in an image.
Creating a Point ¶
- VNPoint3D.InitWithPosition: Creates a point object with the position you specify.
Getting the Position ¶
- VNPoint3D.Position: The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D
func NewPoint3DWithPosition ¶
func NewPoint3DWithPosition(position objectivec.IObject) VNPoint3D
Creates a point object with the position you specify.
position: The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(position:) position is a [simd.simd_float4x4].
func VNPoint3DFromID ¶
VNPoint3DFromID constructs a VNPoint3D from an objc.ID.
An object that represents a 3D point in an image.
func (VNPoint3D) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (VNPoint3D) EncodeWithCoder ¶
func (p VNPoint3D) EncodeWithCoder(coder foundation.INSCoder)
func (VNPoint3D) InitWithPosition ¶
func (p VNPoint3D) InitWithPosition(position objectivec.IObject) VNPoint3D
Creates a point object with the position you specify.
position: The three-dimensional position.
position is a [simd.simd_float4x4].
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(position:)
func (VNPoint3D) Position ¶
func (p VNPoint3D) Position() objectivec.IObject
The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D/position
type VNPoint3DClass ¶
type VNPoint3DClass struct {
// contains filtered or unexported fields
}
func GetVNPoint3DClass ¶
func GetVNPoint3DClass() VNPoint3DClass
GetVNPoint3DClass returns the class object for VNPoint3D.
func (VNPoint3DClass) Alloc ¶
func (vc VNPoint3DClass) Alloc() VNPoint3D
Alloc allocates memory for a new instance of the class.
type VNPointClass ¶
type VNPointClass struct {
// contains filtered or unexported fields
}
func GetVNPointClass ¶
func GetVNPointClass() VNPointClass
GetVNPointClass returns the class object for VNPoint.
func (VNPointClass) Alloc ¶
func (vc VNPointClass) Alloc() VNPoint
Alloc allocates memory for a new instance of the class.
func (VNPointClass) PointByApplyingVectorToPoint ¶
func (_VNPointClass VNPointClass) PointByApplyingVectorToPoint(vector IVNVector, point IVNPoint) VNPoint
Creates a point object that’s shifted by the X and Y offsets of the specified vector.
vector: The vector to apply to offset the point.
point: The point to translate by the vector’s X and Y offsets.
See: https://developer.apple.com/documentation/Vision/VNPoint/apply(_:to:)
func (VNPointClass) ZeroPoint ¶
func (_VNPointClass VNPointClass) ZeroPoint() VNPoint
A point object that represents the origin.
Discussion ¶
The origin point is (0.0, 0.0).
See: https://developer.apple.com/documentation/Vision/VNPoint/zero
type VNPointsClassification ¶
type VNPointsClassification int
See: https://developer.apple.com/documentation/Vision/VNPointsClassification
const ( VNPointsClassificationClosedPath VNPointsClassification = 2 VNPointsClassificationDisconnected VNPointsClassification = 0 VNPointsClassificationOpenPath VNPointsClassification = 1 )
func (VNPointsClassification) String ¶
func (e VNPointsClassification) String() string
type VNRecognizeAnimalsRequest ¶
type VNRecognizeAnimalsRequest struct {
VNImageBasedRequest
}
A request that recognizes animals in an image.
Overview ¶
Use the knownAnimalIdentifiers(forRevision:) method to determine which animals the request supports.
Identifying Animals ¶
- VNRecognizeAnimalsRequest.SupportedIdentifiersAndReturnError: Returns the identifiers of the animals that the request detects.
Identifying Request Revisions ¶
- VNRecognizeAnimalsRequest.VNRecognizeAnimalsRequestRevision2: A constant for specifying revision 2 of the animal recognition request.
- VNRecognizeAnimalsRequest.VNRecognizeAnimalsRequestRevision1: A constant for specifying revision 1 of the animal recognition request.
See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequest
func NewRecognizeAnimalsRequestWithCompletionHandler ¶
func NewRecognizeAnimalsRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNRecognizeAnimalsRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNRecognizeAnimalsRequest ¶
func NewVNRecognizeAnimalsRequest() VNRecognizeAnimalsRequest
NewVNRecognizeAnimalsRequest creates a new VNRecognizeAnimalsRequest instance.
func VNRecognizeAnimalsRequestFromID ¶
func VNRecognizeAnimalsRequestFromID(id objc.ID) VNRecognizeAnimalsRequest
VNRecognizeAnimalsRequestFromID constructs a VNRecognizeAnimalsRequest from an objc.ID.
A request that recognizes animals in an image.
func (VNRecognizeAnimalsRequest) Autorelease ¶
func (r VNRecognizeAnimalsRequest) Autorelease() VNRecognizeAnimalsRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizeAnimalsRequest) Init ¶
func (r VNRecognizeAnimalsRequest) Init() VNRecognizeAnimalsRequest
Init initializes the instance.
func (VNRecognizeAnimalsRequest) SupportedIdentifiersAndReturnError ¶
func (r VNRecognizeAnimalsRequest) SupportedIdentifiersAndReturnError() ([]string, error)
Returns the identifiers of the animals that the request detects.
Return Value ¶
The animal identifiers.
See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequest/supportedIdentifiers()
func (VNRecognizeAnimalsRequest) VNRecognizeAnimalsRequestRevision1 ¶
func (r VNRecognizeAnimalsRequest) VNRecognizeAnimalsRequestRevision1() int
A constant for specifying revision 1 of the animal recognition request.
See: https://developer.apple.com/documentation/vision/vnrecognizeanimalsrequestrevision1
func (VNRecognizeAnimalsRequest) VNRecognizeAnimalsRequestRevision2 ¶
func (r VNRecognizeAnimalsRequest) VNRecognizeAnimalsRequestRevision2() int
A constant for specifying revision 2 of the animal recognition request.
See: https://developer.apple.com/documentation/vision/vnrecognizeanimalsrequestrevision2
type VNRecognizeAnimalsRequestClass ¶
type VNRecognizeAnimalsRequestClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizeAnimalsRequestClass ¶
func GetVNRecognizeAnimalsRequestClass() VNRecognizeAnimalsRequestClass
GetVNRecognizeAnimalsRequestClass returns the class object for VNRecognizeAnimalsRequest.
func (VNRecognizeAnimalsRequestClass) Alloc ¶
func (vc VNRecognizeAnimalsRequestClass) Alloc() VNRecognizeAnimalsRequest
Alloc allocates memory for a new instance of the class.
type VNRecognizeTextRequest ¶
type VNRecognizeTextRequest struct {
VNImageBasedRequest
}
An image-analysis request that finds and recognizes text in an image.
Overview ¶
By default, a text recognition request first locates all possible glyphs or characters in the input image, and then analyzes each string. To specify or limit the languages to find in the request, set the VNRecognizeTextRequest.RecognitionLanguages property to an array that contains the names of the languages of text you want to recognize. Vision returns the result of this request in a VNRecognizedTextObservation object.
Customizing Recognition Constraints ¶
- VNRecognizeTextRequest.MinimumTextHeight: The minimum height, relative to the image height, of the text to recognize.
- VNRecognizeTextRequest.SetMinimumTextHeight
- VNRecognizeTextRequest.RecognitionLevel: A value that determines whether the request prioritizes accuracy or speed in text recognition.
- VNRecognizeTextRequest.SetRecognitionLevel
Specifying the Language ¶
- VNRecognizeTextRequest.AutomaticallyDetectsLanguage: A Boolean value that indicates whether to attempt detecting the language to use the appropriate model for recognition and language correction.
- VNRecognizeTextRequest.SetAutomaticallyDetectsLanguage
- VNRecognizeTextRequest.RecognitionLanguages: An array of languages to detect, in priority order.
- VNRecognizeTextRequest.SetRecognitionLanguages
- VNRecognizeTextRequest.UsesLanguageCorrection: A Boolean value that indicates whether the request applies language correction during the recognition process.
- VNRecognizeTextRequest.SetUsesLanguageCorrection
- VNRecognizeTextRequest.CustomWords: An array of strings to supplement the recognized languages at the word-recognition stage.
- VNRecognizeTextRequest.SetCustomWords
- VNRecognizeTextRequest.SupportedRecognitionLanguagesAndReturnError: Returns the identifiers of the languages that the request supports.
Identifying Request Revisions ¶
- VNRecognizeTextRequest.VNRecognizeTextRequestRevision3: A constant for specifying revision 3 of the text recognition request.
- VNRecognizeTextRequest.VNRecognizeTextRequestRevision2: A constant for specifying revision 2 of the text recognition request.
- VNRecognizeTextRequest.VNRecognizeTextRequestRevision1: A constant for specifying revision 1 of the text recognition request.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest
func NewRecognizeTextRequestWithCompletionHandler ¶
func NewRecognizeTextRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNRecognizeTextRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNRecognizeTextRequest ¶
func NewVNRecognizeTextRequest() VNRecognizeTextRequest
NewVNRecognizeTextRequest creates a new VNRecognizeTextRequest instance.
func VNRecognizeTextRequestFromID ¶
func VNRecognizeTextRequestFromID(id objc.ID) VNRecognizeTextRequest
VNRecognizeTextRequestFromID constructs a VNRecognizeTextRequest from an objc.ID.
An image-analysis request that finds and recognizes text in an image.
func (VNRecognizeTextRequest) AutomaticallyDetectsLanguage ¶
func (r VNRecognizeTextRequest) AutomaticallyDetectsLanguage() bool
A Boolean value that indicates whether to attempt detecting the language to use the appropriate model for recognition and language correction.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest/automaticallyDetectsLanguage
func (VNRecognizeTextRequest) Autorelease ¶
func (r VNRecognizeTextRequest) Autorelease() VNRecognizeTextRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizeTextRequest) CustomWords ¶
func (r VNRecognizeTextRequest) CustomWords() []string
An array of strings to supplement the recognized languages at the word-recognition stage.
Discussion ¶
Custom words take precedence over the standard lexicon. The request ignores this value if [UsesLanguageCorrection] is false.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest/customWords
func (VNRecognizeTextRequest) Indeterminate ¶
func (r VNRecognizeTextRequest) Indeterminate() bool
A Boolean set to true when a request can’t determine its progress in fractions completed.
Discussion ¶
A value of true doesn’t mean that the request will run forever. Rather, it means that the nature of the request can’t be broken down into identifiable fractions to report. The [ProgressHandler] will still be called at suitable intervals.
See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/indeterminate
func (VNRecognizeTextRequest) Init ¶
func (r VNRecognizeTextRequest) Init() VNRecognizeTextRequest
Init initializes the instance.
func (VNRecognizeTextRequest) MinimumTextHeight ¶
func (r VNRecognizeTextRequest) MinimumTextHeight() float32
The minimum height, relative to the image height, of the text to recognize.
Discussion ¶
Specify a floating-point number relative to the image height. For example, to limit recognition to text that’s half of the image height, use `0.5`. Increasing the size reduces memory consumption and expedites recognition with the tradeoff of ignoring text smaller than the minimum height. The default value is 1/32, or `0.03125`.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest/minimumTextHeight
func (VNRecognizeTextRequest) ProgressHandler ¶
func (r VNRecognizeTextRequest) ProgressHandler() VNRequestProgressHandler
A block of code executed periodically during a Vision request to report progress on long-running tasks.
Discussion ¶
The progress handler is an optional method that allows clients of the request to report progress to the user or to display partial results as they become available. The Vision framework may call this handler on a different dispatch queue from the thread on which you initiated the original request, so ensure that your handler can execute asynchronously, in a thread-safe manner.
See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/progressHandler
func (VNRecognizeTextRequest) RecognitionLanguages ¶
func (r VNRecognizeTextRequest) RecognitionLanguages() []string
An array of languages to detect, in priority order.
Discussion ¶
The order of the languages in the array defines the order in which languages are used during language processing and text recognition.
Specify the languages as ISO language codes.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest/recognitionLanguages
func (VNRecognizeTextRequest) RecognitionLevel ¶
func (r VNRecognizeTextRequest) RecognitionLevel() VNRequestTextRecognitionLevel
A value that determines whether the request prioritizes accuracy or speed in text recognition.
Discussion ¶
The recognition level determines which techniques the request uses during the text recognition. Set this value to [RequestTextRecognitionLevelFast] to prioritize speed over accuracy, and to [RequestTextRecognitionLevelAccurate] for longer, more computationally intensive recognition.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest/recognitionLevel
func (VNRecognizeTextRequest) SetAutomaticallyDetectsLanguage ¶
func (r VNRecognizeTextRequest) SetAutomaticallyDetectsLanguage(value bool)
func (VNRecognizeTextRequest) SetCustomWords ¶
func (r VNRecognizeTextRequest) SetCustomWords(value []string)
func (VNRecognizeTextRequest) SetMinimumTextHeight ¶
func (r VNRecognizeTextRequest) SetMinimumTextHeight(value float32)
func (VNRecognizeTextRequest) SetProgressHandler ¶
func (r VNRecognizeTextRequest) SetProgressHandler(value VNRequestProgressHandler)
func (VNRecognizeTextRequest) SetRecognitionLanguages ¶
func (r VNRecognizeTextRequest) SetRecognitionLanguages(value []string)
func (VNRecognizeTextRequest) SetRecognitionLevel ¶
func (r VNRecognizeTextRequest) SetRecognitionLevel(value VNRequestTextRecognitionLevel)
func (VNRecognizeTextRequest) SetUsesLanguageCorrection ¶
func (r VNRecognizeTextRequest) SetUsesLanguageCorrection(value bool)
func (VNRecognizeTextRequest) SupportedRecognitionLanguagesAndReturnError ¶
func (r VNRecognizeTextRequest) SupportedRecognitionLanguagesAndReturnError() ([]string, error)
Returns the identifiers of the languages that the request supports.
Return Value ¶
The language identifiers.
func (VNRecognizeTextRequest) UsesLanguageCorrection ¶
func (r VNRecognizeTextRequest) UsesLanguageCorrection() bool
A Boolean value that indicates whether the request applies language correction during the recognition process.
Discussion ¶
When this value is true, Vision applies language correction during the recognition process. Disabling this property returns the raw recognition results, which provides performance benefits but less accurate results.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest/usesLanguageCorrection
func (VNRecognizeTextRequest) VNRecognizeTextRequestRevision1 ¶
func (r VNRecognizeTextRequest) VNRecognizeTextRequestRevision1() int
A constant for specifying revision 1 of the text recognition request.
See: https://developer.apple.com/documentation/vision/vnrecognizetextrequestrevision1
func (VNRecognizeTextRequest) VNRecognizeTextRequestRevision2 ¶
func (r VNRecognizeTextRequest) VNRecognizeTextRequestRevision2() int
A constant for specifying revision 2 of the text recognition request.
See: https://developer.apple.com/documentation/vision/vnrecognizetextrequestrevision2
func (VNRecognizeTextRequest) VNRecognizeTextRequestRevision3 ¶
func (r VNRecognizeTextRequest) VNRecognizeTextRequestRevision3() int
A constant for specifying revision 3 of the text recognition request.
See: https://developer.apple.com/documentation/vision/vnrecognizetextrequestrevision3
type VNRecognizeTextRequestClass ¶
type VNRecognizeTextRequestClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizeTextRequestClass ¶
func GetVNRecognizeTextRequestClass() VNRecognizeTextRequestClass
GetVNRecognizeTextRequestClass returns the class object for VNRecognizeTextRequest.
func (VNRecognizeTextRequestClass) Alloc ¶
func (vc VNRecognizeTextRequestClass) Alloc() VNRecognizeTextRequest
Alloc allocates memory for a new instance of the class.
type VNRecognizedObjectObservation ¶
type VNRecognizedObjectObservation struct {
VNDetectedObjectObservation
}
A detected object observation with an array of classification labels that classify the recognized object.
Overview ¶
The confidence of the classifications sum up to `1.0.` Multiply the classification confidence with the confidence of this observation.
Classifying a Recognized Object ¶
- VNRecognizedObjectObservation.Labels: An array of observations that classify the recognized object.
See: https://developer.apple.com/documentation/Vision/VNRecognizedObjectObservation
func NewRecognizedObjectObservationWithBoundingBox ¶
func NewRecognizedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewRecognizedObjectObservationWithRequestRevisionBoundingBox ¶
func NewRecognizedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewVNRecognizedObjectObservation ¶
func NewVNRecognizedObjectObservation() VNRecognizedObjectObservation
NewVNRecognizedObjectObservation creates a new VNRecognizedObjectObservation instance.
func VNRecognizedObjectObservationFromID ¶
func VNRecognizedObjectObservationFromID(id objc.ID) VNRecognizedObjectObservation
VNRecognizedObjectObservationFromID constructs a VNRecognizedObjectObservation from an objc.ID.
A detected object observation with an array of classification labels that classify the recognized object.
func (VNRecognizedObjectObservation) Autorelease ¶
func (r VNRecognizedObjectObservation) Autorelease() VNRecognizedObjectObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedObjectObservation) Init ¶
func (r VNRecognizedObjectObservation) Init() VNRecognizedObjectObservation
Init initializes the instance.
func (VNRecognizedObjectObservation) Labels ¶
func (r VNRecognizedObjectObservation) Labels() []VNClassificationObservation
An array of observations that classify the recognized object.
See: https://developer.apple.com/documentation/Vision/VNRecognizedObjectObservation/labels
type VNRecognizedObjectObservationClass ¶
type VNRecognizedObjectObservationClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedObjectObservationClass ¶
func GetVNRecognizedObjectObservationClass() VNRecognizedObjectObservationClass
GetVNRecognizedObjectObservationClass returns the class object for VNRecognizedObjectObservation.
func (VNRecognizedObjectObservationClass) Alloc ¶
func (vc VNRecognizedObjectObservationClass) Alloc() VNRecognizedObjectObservation
Alloc allocates memory for a new instance of the class.
type VNRecognizedPoint ¶
type VNRecognizedPoint struct {
VNDetectedPoint
}
An object that represents a normalized point in an image, along with an identifier label and a confidence value.
Inspecting a Point ¶
- VNRecognizedPoint.Identifier: The point’s identifier label.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoint
func NewRecognizedPointWithLocation ¶
func NewRecognizedPointWithLocation(location corefoundation.CGPoint) VNRecognizedPoint
Creates a point object from the specified Core Graphics point.
location: The Core Graphics point.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(location:)
func NewRecognizedPointWithXY ¶
func NewRecognizedPointWithXY(x float64, y float64) VNRecognizedPoint
Creates a point object with the specified coordinates.
x: The x-coordinate value.
y: The y-coordinate value.
See: https://developer.apple.com/documentation/Vision/VNPoint/init(x:y:)
func NewVNRecognizedPoint ¶
func NewVNRecognizedPoint() VNRecognizedPoint
NewVNRecognizedPoint creates a new VNRecognizedPoint instance.
func VNRecognizedPointFromID ¶
func VNRecognizedPointFromID(id objc.ID) VNRecognizedPoint
VNRecognizedPointFromID constructs a VNRecognizedPoint from an objc.ID.
An object that represents a normalized point in an image, along with an identifier label and a confidence value.
func (VNRecognizedPoint) Autorelease ¶
func (r VNRecognizedPoint) Autorelease() VNRecognizedPoint
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedPoint) Identifier ¶
func (r VNRecognizedPoint) Identifier() VNRecognizedPointKey
The point’s identifier label.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoint/identifier
func (VNRecognizedPoint) Init ¶
func (r VNRecognizedPoint) Init() VNRecognizedPoint
Init initializes the instance.
type VNRecognizedPoint3D ¶
type VNRecognizedPoint3D struct {
VNPoint3D
}
A 3D point that includes an identifier to the point.
Getting the Identifier ¶
- VNRecognizedPoint3D.Identifier: The identifier that provides context about what kind of point the request recognizes.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoint3D
func NewRecognizedPoint3DWithPosition ¶
func NewRecognizedPoint3DWithPosition(position objectivec.IObject) VNRecognizedPoint3D
Creates a point object with the position you specify.
position: The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(position:) position is a [simd.simd_float4x4].
func NewVNRecognizedPoint3D ¶
func NewVNRecognizedPoint3D() VNRecognizedPoint3D
NewVNRecognizedPoint3D creates a new VNRecognizedPoint3D instance.
func VNRecognizedPoint3DFromID ¶
func VNRecognizedPoint3DFromID(id objc.ID) VNRecognizedPoint3D
VNRecognizedPoint3DFromID constructs a VNRecognizedPoint3D from an objc.ID.
A 3D point that includes an identifier to the point.
func (VNRecognizedPoint3D) Autorelease ¶
func (r VNRecognizedPoint3D) Autorelease() VNRecognizedPoint3D
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedPoint3D) Identifier ¶
func (r VNRecognizedPoint3D) Identifier() VNRecognizedPointKey
The identifier that provides context about what kind of point the request recognizes.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoint3D/identifier
func (VNRecognizedPoint3D) Init ¶
func (r VNRecognizedPoint3D) Init() VNRecognizedPoint3D
Init initializes the instance.
type VNRecognizedPoint3DClass ¶
type VNRecognizedPoint3DClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedPoint3DClass ¶
func GetVNRecognizedPoint3DClass() VNRecognizedPoint3DClass
GetVNRecognizedPoint3DClass returns the class object for VNRecognizedPoint3D.
func (VNRecognizedPoint3DClass) Alloc ¶
func (vc VNRecognizedPoint3DClass) Alloc() VNRecognizedPoint3D
Alloc allocates memory for a new instance of the class.
type VNRecognizedPointClass ¶
type VNRecognizedPointClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedPointClass ¶
func GetVNRecognizedPointClass() VNRecognizedPointClass
GetVNRecognizedPointClass returns the class object for VNRecognizedPoint.
func (VNRecognizedPointClass) Alloc ¶
func (vc VNRecognizedPointClass) Alloc() VNRecognizedPoint
Alloc allocates memory for a new instance of the class.
type VNRecognizedPointGroupKey ¶
type VNRecognizedPointGroupKey = string
VNRecognizedPointGroupKey is the data type for all recognized-point group keys.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey
var ( // VNRecognizedPoint3DGroupKeyAll is a group key identifying all three-dimensional landmarks. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/point3DGroupKeyAll VNRecognizedPoint3DGroupKeyAll VNRecognizedPointGroupKey // VNRecognizedPointGroupKeyAll is a group key identifying all landmarks. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/all VNRecognizedPointGroupKeyAll VNRecognizedPointGroupKey )
type VNRecognizedPointKey ¶
type VNRecognizedPointKey = string
VNRecognizedPointKey is the data type for all recognized point keys.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey
type VNRecognizedPoints3DObservation ¶
type VNRecognizedPoints3DObservation struct {
VNObservation
}
An observation that provides the 3D points for a request.
Inspecting the Observation ¶
- VNRecognizedPoints3DObservation.AvailableKeys: The available point keys in the observation.
- VNRecognizedPoints3DObservation.AvailableGroupKeys: The available point group keys in the observation.
- VNRecognizedPoints3DObservation.RecognizedPointForKeyError: Returns a point for a key you specify.
- VNRecognizedPoints3DObservation.RecognizedPointsForGroupKeyError: Returns a point for a group key you specify.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoints3DObservation
func NewVNRecognizedPoints3DObservation ¶
func NewVNRecognizedPoints3DObservation() VNRecognizedPoints3DObservation
NewVNRecognizedPoints3DObservation creates a new VNRecognizedPoints3DObservation instance.
func VNRecognizedPoints3DObservationFromID ¶
func VNRecognizedPoints3DObservationFromID(id objc.ID) VNRecognizedPoints3DObservation
VNRecognizedPoints3DObservationFromID constructs a VNRecognizedPoints3DObservation from an objc.ID.
An observation that provides the 3D points for a request.
func (VNRecognizedPoints3DObservation) Autorelease ¶
func (r VNRecognizedPoints3DObservation) Autorelease() VNRecognizedPoints3DObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedPoints3DObservation) AvailableGroupKeys ¶
func (r VNRecognizedPoints3DObservation) AvailableGroupKeys() []string
The available point group keys in the observation.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoints3DObservation/availableGroupKeys
func (VNRecognizedPoints3DObservation) AvailableKeys ¶
func (r VNRecognizedPoints3DObservation) AvailableKeys() []string
The available point keys in the observation.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPoints3DObservation/availableKeys
func (VNRecognizedPoints3DObservation) Init ¶
func (r VNRecognizedPoints3DObservation) Init() VNRecognizedPoints3DObservation
Init initializes the instance.
func (VNRecognizedPoints3DObservation) RecognizedPointForKeyError ¶
func (r VNRecognizedPoints3DObservation) RecognizedPointForKeyError(pointKey VNRecognizedPointKey) (IVNRecognizedPoint3D, error)
Returns a point for a key you specify.
pointKey: The key of the point to retrieve.
Return Value ¶
The point the observation associates with the key.
func (VNRecognizedPoints3DObservation) RecognizedPointsForGroupKeyError ¶
func (r VNRecognizedPoints3DObservation) RecognizedPointsForGroupKeyError(groupKey VNRecognizedPointGroupKey) (foundation.INSDictionary, error)
Returns a point for a group key you specify.
groupKey: The group key to retrieve points for.
Return Value ¶
A dictionary of labeled points for the group.
type VNRecognizedPoints3DObservationClass ¶
type VNRecognizedPoints3DObservationClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedPoints3DObservationClass ¶
func GetVNRecognizedPoints3DObservationClass() VNRecognizedPoints3DObservationClass
GetVNRecognizedPoints3DObservationClass returns the class object for VNRecognizedPoints3DObservation.
func (VNRecognizedPoints3DObservationClass) Alloc ¶
func (vc VNRecognizedPoints3DObservationClass) Alloc() VNRecognizedPoints3DObservation
Alloc allocates memory for a new instance of the class.
type VNRecognizedPointsObservation ¶
type VNRecognizedPointsObservation struct {
VNObservation
}
An observation that provides the points the analysis recognized.
Inspecting the Observation ¶
- VNRecognizedPointsObservation.AvailableKeys: The available point keys in the observation.
- VNRecognizedPointsObservation.AvailableGroupKeys: The available point group keys in the observation.
- VNRecognizedPointsObservation.RecognizedPointForKeyError: Retrieves a recognized point for a key.
- VNRecognizedPointsObservation.RecognizedPointsForGroupKeyError: Retrieves the recognized points for a key.
Converting Points for Core ML ¶
- VNRecognizedPointsObservation.KeypointsMultiArrayAndReturnError: Retrieves the grouping of normalized point coordinates and confidence scores in a format compatible with Core ML.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointsObservation
func NewVNRecognizedPointsObservation ¶
func NewVNRecognizedPointsObservation() VNRecognizedPointsObservation
NewVNRecognizedPointsObservation creates a new VNRecognizedPointsObservation instance.
func VNRecognizedPointsObservationFromID ¶
func VNRecognizedPointsObservationFromID(id objc.ID) VNRecognizedPointsObservation
VNRecognizedPointsObservationFromID constructs a VNRecognizedPointsObservation from an objc.ID.
An observation that provides the points the analysis recognized.
func (VNRecognizedPointsObservation) Autorelease ¶
func (r VNRecognizedPointsObservation) Autorelease() VNRecognizedPointsObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedPointsObservation) AvailableGroupKeys ¶
func (r VNRecognizedPointsObservation) AvailableGroupKeys() []string
The available point group keys in the observation.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointsObservation/availableGroupKeys
func (VNRecognizedPointsObservation) AvailableKeys ¶
func (r VNRecognizedPointsObservation) AvailableKeys() []string
The available point keys in the observation.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointsObservation/availableKeys
func (VNRecognizedPointsObservation) Init ¶
func (r VNRecognizedPointsObservation) Init() VNRecognizedPointsObservation
Init initializes the instance.
func (VNRecognizedPointsObservation) KeypointsMultiArrayAndReturnError ¶
func (r VNRecognizedPointsObservation) KeypointsMultiArrayAndReturnError() (coreml.MLMultiArray, error)
Retrieves the grouping of normalized point coordinates and confidence scores in a format compatible with Core ML.
Return Value ¶
The key points converted to an MLMultiArray.
See: https://developer.apple.com/documentation/Vision/VNRecognizedPointsObservation/keypointsMultiArray()
func (VNRecognizedPointsObservation) RecognizedPointForKeyError ¶
func (r VNRecognizedPointsObservation) RecognizedPointForKeyError(pointKey VNRecognizedPointKey) (IVNRecognizedPoint, error)
Retrieves a recognized point for a key.
pointKey: The key of the point to retrieve.
Return Value ¶
The recognized point associated with the key.
func (VNRecognizedPointsObservation) RecognizedPointsForGroupKeyError ¶
func (r VNRecognizedPointsObservation) RecognizedPointsForGroupKeyError(groupKey VNRecognizedPointGroupKey) (foundation.INSDictionary, error)
Retrieves the recognized points for a key.
groupKey: The group key to retrieve recognized points for.
Return Value ¶
A dictionary of labeled points for the group.
type VNRecognizedPointsObservationClass ¶
type VNRecognizedPointsObservationClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedPointsObservationClass ¶
func GetVNRecognizedPointsObservationClass() VNRecognizedPointsObservationClass
GetVNRecognizedPointsObservationClass returns the class object for VNRecognizedPointsObservation.
func (VNRecognizedPointsObservationClass) Alloc ¶
func (vc VNRecognizedPointsObservationClass) Alloc() VNRecognizedPointsObservation
Alloc allocates memory for a new instance of the class.
type VNRecognizedText ¶
type VNRecognizedText struct {
objectivec.Object
}
Text recognized in an image through a text recognition request.
Overview ¶
A single VNRecognizedTextObservation can contain multiple recognized text objects—one for each candidate.
Determining Recognized Text ¶
- VNRecognizedText.String: The top candidate for recognized text.
- VNRecognizedText.Confidence: A normalized confidence score for the text recognition result.
See: https://developer.apple.com/documentation/Vision/VNRecognizedText
func NewVNRecognizedText ¶
func NewVNRecognizedText() VNRecognizedText
NewVNRecognizedText creates a new VNRecognizedText instance.
func VNRecognizedTextFromID ¶
func VNRecognizedTextFromID(id objc.ID) VNRecognizedText
VNRecognizedTextFromID constructs a VNRecognizedText from an objc.ID.
Text recognized in an image through a text recognition request.
func (VNRecognizedText) Autorelease ¶
func (r VNRecognizedText) Autorelease() VNRecognizedText
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedText) BoundingBoxForRangeError ¶
func (r VNRecognizedText) BoundingBoxForRangeError(range_ foundation.NSRange) (IVNRectangleObservation, error)
Calculates the bounding box around the characters in the range of a string.
range: The range of the characters in the text string to draw a bounding box around.
error: An error that contains information about failed computation of the bounding box, or `nil` if no error occurred.
Discussion ¶
Bounding boxes aren’t always an exact fit around the characters. Use them to display in user interfaces to provide general guidance, but avoid using their contents for image processing.
The bounding box that returns from this method differs based on the value of [RecognitionLevel], as follows:
[Table data omitted]
See: https://developer.apple.com/documentation/Vision/VNRecognizedText/boundingBoxForRange:error:
func (VNRecognizedText) Confidence ¶
func (r VNRecognizedText) Confidence() VNConfidence
A normalized confidence score for the text recognition result.
Discussion ¶
The confidence level is a normalized value between `0.0` and `1.0`, where `1.0` represents the highest confidence.
See: https://developer.apple.com/documentation/Vision/VNRecognizedText/confidence
func (VNRecognizedText) EncodeWithCoder ¶
func (r VNRecognizedText) EncodeWithCoder(coder foundation.INSCoder)
func (VNRecognizedText) Init ¶
func (r VNRecognizedText) Init() VNRecognizedText
Init initializes the instance.
func (VNRecognizedText) RequestRevision ¶
func (r VNRecognizedText) RequestRevision() uint
The revision of the VNRequest subclass used to generate the implementing object.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
func (VNRecognizedText) String ¶
func (r VNRecognizedText) String() string
The top candidate for recognized text.
See: https://developer.apple.com/documentation/Vision/VNRecognizedText/string
type VNRecognizedTextClass ¶
type VNRecognizedTextClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedTextClass ¶
func GetVNRecognizedTextClass() VNRecognizedTextClass
GetVNRecognizedTextClass returns the class object for VNRecognizedText.
func (VNRecognizedTextClass) Alloc ¶
func (vc VNRecognizedTextClass) Alloc() VNRecognizedText
Alloc allocates memory for a new instance of the class.
type VNRecognizedTextObservation ¶
type VNRecognizedTextObservation struct {
VNRectangleObservation
}
A request that detects and recognizes regions of text in an image.
Overview ¶
This type of observation results from a VNRecognizeTextRequest. It contains information about both the location and content of text and glyphs that Vision recognized in the input image.
Obtaining Recognized Text ¶
- VNRecognizedTextObservation.TopCandidates: Requests the top candidates for a recognized text string.
See: https://developer.apple.com/documentation/Vision/VNRecognizedTextObservation
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNRecognizedTextObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
bottomLeft: The lower-left corner point.
bottomRight: The lower-right corner point.
topRight: The upper-right corner point.
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNRecognizedTextObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
topRight: The upper-right corner point.
bottomRight: The lower-right corner point.
bottomLeft: The lower-left corner point.
func NewRecognizedTextObservationWithBoundingBox ¶
func NewRecognizedTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedTextObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewRecognizedTextObservationWithRequestRevisionBoundingBox ¶
func NewRecognizedTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedTextObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewVNRecognizedTextObservation ¶
func NewVNRecognizedTextObservation() VNRecognizedTextObservation
NewVNRecognizedTextObservation creates a new VNRecognizedTextObservation instance.
func VNRecognizedTextObservationFromID ¶
func VNRecognizedTextObservationFromID(id objc.ID) VNRecognizedTextObservation
VNRecognizedTextObservationFromID constructs a VNRecognizedTextObservation from an objc.ID.
A request that detects and recognizes regions of text in an image.
func (VNRecognizedTextObservation) Autorelease ¶
func (r VNRecognizedTextObservation) Autorelease() VNRecognizedTextObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNRecognizedTextObservation) Init ¶
func (r VNRecognizedTextObservation) Init() VNRecognizedTextObservation
Init initializes the instance.
func (VNRecognizedTextObservation) TopCandidates ¶
func (r VNRecognizedTextObservation) TopCandidates(maxCandidateCount uint) []VNRecognizedText
Requests the top candidates for a recognized text string.
maxCandidateCount: The maximum number of candidates to return. This can’t exceed 10.
Return Value ¶
An array of the top candidates, sorted by decreasing confidence score.
Discussion ¶
This function returns no more than candidates, but it may return fewer than candidates.
See: https://developer.apple.com/documentation/Vision/VNRecognizedTextObservation/topCandidates(_:)
type VNRecognizedTextObservationClass ¶
type VNRecognizedTextObservationClass struct {
// contains filtered or unexported fields
}
func GetVNRecognizedTextObservationClass ¶
func GetVNRecognizedTextObservationClass() VNRecognizedTextObservationClass
GetVNRecognizedTextObservationClass returns the class object for VNRecognizedTextObservation.
func (VNRecognizedTextObservationClass) Alloc ¶
func (vc VNRecognizedTextObservationClass) Alloc() VNRecognizedTextObservation
Alloc allocates memory for a new instance of the class.
type VNRectangleObservation ¶
type VNRectangleObservation struct {
VNDetectedObjectObservation
}
An object that represents the four vertices of a detected rectangle.
Accessing the Coordinates ¶
- VNRectangleObservation.BottomLeft: The coordinates of the lower-left corner of the observation bounding box.
- VNRectangleObservation.BottomRight: The coordinates of the lower-right corner of the observation bounding box.
- VNRectangleObservation.TopLeft: The coordinates of the upper-left corner of the observation bounding box.
- VNRectangleObservation.TopRight: The coordinates of the upper-right corner of the observation bounding box.
See: https://developer.apple.com/documentation/Vision/VNRectangleObservation
func NewRectangleObservationWithBoundingBox ¶
func NewRectangleObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRectangleObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewRectangleObservationWithRequestRevisionBoundingBox ¶
func NewRectangleObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRectangleObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNRectangleObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
bottomLeft: The lower-left corner point.
bottomRight: The lower-right corner point.
topRight: The upper-right corner point.
func NewRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNRectangleObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
topRight: The upper-right corner point.
bottomRight: The lower-right corner point.
bottomLeft: The lower-left corner point.
func NewVNRectangleObservation ¶
func NewVNRectangleObservation() VNRectangleObservation
NewVNRectangleObservation creates a new VNRectangleObservation instance.
func VNRectangleObservationFromID ¶
func VNRectangleObservationFromID(id objc.ID) VNRectangleObservation
VNRectangleObservationFromID constructs a VNRectangleObservation from an objc.ID.
An object that represents the four vertices of a detected rectangle.
func (VNRectangleObservation) Autorelease ¶
func (r VNRectangleObservation) Autorelease() VNRectangleObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNRectangleObservation) BottomLeft ¶
func (r VNRectangleObservation) BottomLeft() corefoundation.CGPoint
The coordinates of the lower-left corner of the observation bounding box.
See: https://developer.apple.com/documentation/Vision/VNRectangleObservation/bottomLeft
func (VNRectangleObservation) BottomRight ¶
func (r VNRectangleObservation) BottomRight() corefoundation.CGPoint
The coordinates of the lower-right corner of the observation bounding box.
See: https://developer.apple.com/documentation/Vision/VNRectangleObservation/bottomRight
func (VNRectangleObservation) Init ¶
func (r VNRectangleObservation) Init() VNRectangleObservation
Init initializes the instance.
func (VNRectangleObservation) Results ¶
func (r VNRectangleObservation) Results() IVNRectangleObservation
The results of a document segmentation request.
See: https://developer.apple.com/documentation/vision/vndetectdocumentsegmentationrequest/results
func (VNRectangleObservation) SetResults ¶
func (r VNRectangleObservation) SetResults(value IVNRectangleObservation)
func (VNRectangleObservation) TopLeft ¶
func (r VNRectangleObservation) TopLeft() corefoundation.CGPoint
The coordinates of the upper-left corner of the observation bounding box.
See: https://developer.apple.com/documentation/Vision/VNRectangleObservation/topLeft
func (VNRectangleObservation) TopRight ¶
func (r VNRectangleObservation) TopRight() corefoundation.CGPoint
The coordinates of the upper-right corner of the observation bounding box.
See: https://developer.apple.com/documentation/Vision/VNRectangleObservation/topRight
type VNRectangleObservationClass ¶
type VNRectangleObservationClass struct {
// contains filtered or unexported fields
}
func GetVNRectangleObservationClass ¶
func GetVNRectangleObservationClass() VNRectangleObservationClass
GetVNRectangleObservationClass returns the class object for VNRectangleObservation.
func (VNRectangleObservationClass) Alloc ¶
func (vc VNRectangleObservationClass) Alloc() VNRectangleObservation
Alloc allocates memory for a new instance of the class.
type VNRequest ¶
type VNRequest struct {
objectivec.Object
}
The abstract superclass for analysis requests.
Overview ¶
Other Vision request handlers that perform image analysis inherit from this abstract base class. Instantiate one of its subclasses to perform image analysis.
Initializing a Request ¶
- VNRequest.InitWithCompletionHandler: Creates a new Vision request with an optional completion handler.
Configuring a Request ¶
- VNRequest.CompletionHandler: The completion handler the system invokes after the request finishes processing.
- VNRequest.PreferBackgroundProcessing: A hint to minimize the resource burden of the request.
- VNRequest.SetPreferBackgroundProcessing
- VNRequest.Results: The collection of observation results generated by request processing.
- VNRequest.Revision: The specific algorithm or implementation revision that’s used to perform the request.
- VNRequest.SetRevision
- VNRequest.UsesCPUOnly: A Boolean signifying that the Vision request should execute exclusively on the CPU.
- VNRequest.SetUsesCPUOnly
Configuring the Compute Device ¶
- VNRequest.SupportedComputeStageDevices: The collection of compute devices per stage that a request supports.
- VNRequest.SetSupportedComputeStageDevices
Canceling a Request ¶
- VNRequest.Cancel: Cancels the request before it can finish executing.
See: https://developer.apple.com/documentation/Vision/VNRequest
func NewRequestWithCompletionHandler ¶
func NewRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func VNRequestFromID ¶
VNRequestFromID constructs a VNRequest from an objc.ID.
The abstract superclass for analysis requests.
func (VNRequest) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (VNRequest) Cancel ¶
func (r VNRequest) Cancel()
Cancels the request before it can finish executing.
See: https://developer.apple.com/documentation/Vision/VNRequest/cancel()
func (VNRequest) CompletionHandler ¶
func (r VNRequest) CompletionHandler() VNRequestCompletionHandler
The completion handler the system invokes after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/completionHandler
func (VNRequest) ComputeDeviceForComputeStage ¶
func (r VNRequest) ComputeDeviceForComputeStage(computeStage VNComputeStage) coreml.MLComputeDeviceProtocol
Returns the compute device for a compute stage.
computeStage: The compute stage to inspect.
Return Value ¶
The current compute device; otherwise, `nil` if one isn’t assigned.
See: https://developer.apple.com/documentation/Vision/VNRequest/computeDeviceForComputeStage:
func (VNRequest) InitWithCompletionHandler ¶
func (r VNRequest) InitWithCompletionHandler(completionHandler ErrorHandler) VNRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func (VNRequest) PreferBackgroundProcessing ¶
A hint to minimize the resource burden of the request.
Discussion ¶
If set to true, this property reduces the request’s memory footprint, processing footprint, and CPU/GPU contention at the potential cost of longer execution time.
Setting this value can help ensure that Vision processing doesn’t block UI updates and other rendering on the main thread.
See: https://developer.apple.com/documentation/Vision/VNRequest/preferBackgroundProcessing
func (VNRequest) Results ¶
func (r VNRequest) Results() []VNObservation
The collection of observation results generated by request processing.
Discussion ¶
If the request fails, this property is nil. Otherwise, it contains an array of VNObservation subclasses specific to the VNRequest subclass.
Don’t access this property until the request has finished processing.
See: https://developer.apple.com/documentation/Vision/VNRequest/results
func (VNRequest) Revision ¶
The specific algorithm or implementation revision that’s used to perform the request.
See: https://developer.apple.com/documentation/Vision/VNRequest/revision
func (VNRequest) SetComputeDeviceForComputeStage ¶
func (r VNRequest) SetComputeDeviceForComputeStage(computeDevice coreml.MLComputeDeviceProtocol, computeStage VNComputeStage)
Assigns a compute device for a compute stage.
computeDevice: The compute device to assign to the compute stage.
computeStage: The compute stage.
Discussion ¶
If the parameter `computeDevice` is `nil`, the framework removes any explicit compute device assignment and allows the framework to select the device.
Configure any compute device for a given compute stage. When performing a request, the system makes a validity check. Call [SupportedComputeStageDevicesAndReturnError] to get valid compute devices for a request’s compute stages.
See: https://developer.apple.com/documentation/Vision/VNRequest/setComputeDevice:forComputeStage:
func (VNRequest) SetPreferBackgroundProcessing ¶
func (VNRequest) SetRevision ¶
func (VNRequest) SetSupportedComputeStageDevices ¶
func (r VNRequest) SetSupportedComputeStageDevices(value objectivec.IObject)
func (VNRequest) SetUsesCPUOnly ¶
func (VNRequest) SupportedComputeStageDevices ¶
func (r VNRequest) SupportedComputeStageDevices() objectivec.IObject
The collection of compute devices per stage that a request supports.
See: https://developer.apple.com/documentation/vision/vnrequest/supportedcomputestagedevices
func (VNRequest) SupportedComputeStageDevicesAndReturnError ¶
func (r VNRequest) SupportedComputeStageDevicesAndReturnError() (foundation.INSDictionary, error)
The collection of compute devices per stage that a request supports.
Return Value ¶
A dictionary of per-stage compute devices; otherwise, `nil` if an error occurs.
func (VNRequest) UsesCPUOnly ¶
A Boolean signifying that the Vision request should execute exclusively on the CPU.
Discussion ¶
This value defaults to false to signify that the Vision request is free to leverage the GPU to accelerate its processing.
See: https://developer.apple.com/documentation/Vision/VNRequest/usesCPUOnly
type VNRequestClass ¶
type VNRequestClass struct {
// contains filtered or unexported fields
}
func GetVNRequestClass ¶
func GetVNRequestClass() VNRequestClass
GetVNRequestClass returns the class object for VNRequest.
func (VNRequestClass) Alloc ¶
func (vc VNRequestClass) Alloc() VNRequest
Alloc allocates memory for a new instance of the class.
func (VNRequestClass) CurrentRevision ¶
func (_VNRequestClass VNRequestClass) CurrentRevision() uint
The current revison supported by the request.
See: https://developer.apple.com/documentation/Vision/VNRequest/currentRevision
func (VNRequestClass) DefaultRevision ¶
func (_VNRequestClass VNRequestClass) DefaultRevision() uint
The revision of the latest request for the particular SDK linked with the client application.
See: https://developer.apple.com/documentation/Vision/VNRequest/defaultRevision
func (VNRequestClass) SupportedRevisions ¶
func (_VNRequestClass VNRequestClass) SupportedRevisions() foundation.NSIndexSet
The collection of currently-supported algorithm versions for the class of request.
Discussion ¶
This method allows clients to inspect at runtime what capabilities are available for each class of VNRequest in the Vision framework.
See: https://developer.apple.com/documentation/Vision/VNRequest/supportedRevisions
type VNRequestCompletionHandler ¶
type VNRequestCompletionHandler = func(VNRequest, foundation.NSError)
VNRequestCompletionHandler is a type alias to encapsulate the syntax for the completion handler the system calls after the request finishes processing.
See: https://developer.apple.com/documentation/Vision/VNRequestCompletionHandler
type VNRequestFaceLandmarksConstellation ¶
type VNRequestFaceLandmarksConstellation int
See: https://developer.apple.com/documentation/Vision/VNRequestFaceLandmarksConstellation
const ( // VNRequestFaceLandmarksConstellation65Points: A constellation with 65 points. VNRequestFaceLandmarksConstellation65Points VNRequestFaceLandmarksConstellation = 1 // VNRequestFaceLandmarksConstellation76Points: A constellation with 76 points. VNRequestFaceLandmarksConstellation76Points VNRequestFaceLandmarksConstellation = 2 // VNRequestFaceLandmarksConstellationNotDefined: An undefined constellation. VNRequestFaceLandmarksConstellationNotDefined VNRequestFaceLandmarksConstellation = 0 )
func (VNRequestFaceLandmarksConstellation) String ¶
func (e VNRequestFaceLandmarksConstellation) String() string
type VNRequestProgressHandler ¶
type VNRequestProgressHandler = func(VNRequest, float64, foundation.NSError)
VNRequestProgressHandler is a block executed at intervals during the processing of a Vision request.
See: https://developer.apple.com/documentation/Vision/VNRequestProgressHandler
type VNRequestProgressProviding ¶
type VNRequestProgressProviding interface {
objectivec.IObject
// A block of code executed periodically during a Vision request to report progress on long-running tasks.
//
// See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/progressHandler
ProgressHandler() VNRequestProgressHandler
// A Boolean set to true when a request can’t determine its progress in fractions completed.
//
// See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/indeterminate
Indeterminate() bool
// A block of code executed periodically during a Vision request to report progress on long-running tasks.
//
// See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/progressHandler
SetProgressHandler(value VNRequestProgressHandler)
}
A protocol for providing progress information on long-running tasks in Vision.
See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding
type VNRequestProgressProvidingObject ¶
type VNRequestProgressProvidingObject struct {
objectivec.Object
}
VNRequestProgressProvidingObject wraps an existing Objective-C object that conforms to the VNRequestProgressProviding protocol.
func VNRequestProgressProvidingObjectFromID ¶
func VNRequestProgressProvidingObjectFromID(id objc.ID) VNRequestProgressProvidingObject
VNRequestProgressProvidingObjectFromID constructs a VNRequestProgressProvidingObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VNRequestProgressProvidingObject) BaseObject ¶
func (o VNRequestProgressProvidingObject) BaseObject() objectivec.Object
func (VNRequestProgressProvidingObject) Indeterminate ¶
func (o VNRequestProgressProvidingObject) Indeterminate() bool
A Boolean set to true when a request can’t determine its progress in fractions completed.
See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/indeterminate
func (VNRequestProgressProvidingObject) ProgressHandler ¶
func (o VNRequestProgressProvidingObject) ProgressHandler() VNRequestProgressHandler
A block of code executed periodically during a Vision request to report progress on long-running tasks.
See: https://developer.apple.com/documentation/Vision/VNRequestProgressProviding/progressHandler
func (VNRequestProgressProvidingObject) SetProgressHandler ¶
func (o VNRequestProgressProvidingObject) SetProgressHandler(value VNRequestProgressHandler)
type VNRequestRevisionProviding ¶
type VNRequestRevisionProviding interface {
objectivec.IObject
// The revision of the [VNRequest](<doc://Vision/documentation/Vision/VNRequest>) subclass used to generate the implementing object.
//
// See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
RequestRevision() uint
}
A protocol for specifying the revision number of Vision algorithms.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding
type VNRequestRevisionProvidingObject ¶
type VNRequestRevisionProvidingObject struct {
objectivec.Object
}
VNRequestRevisionProvidingObject wraps an existing Objective-C object that conforms to the VNRequestRevisionProviding protocol.
func VNRequestRevisionProvidingObjectFromID ¶
func VNRequestRevisionProvidingObjectFromID(id objc.ID) VNRequestRevisionProvidingObject
VNRequestRevisionProvidingObjectFromID constructs a VNRequestRevisionProvidingObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VNRequestRevisionProvidingObject) BaseObject ¶
func (o VNRequestRevisionProvidingObject) BaseObject() objectivec.Object
func (VNRequestRevisionProvidingObject) RequestRevision ¶
func (o VNRequestRevisionProvidingObject) RequestRevision() uint
The revision of the VNRequest subclass used to generate the implementing object.
See: https://developer.apple.com/documentation/Vision/VNRequestRevisionProviding/requestRevision
type VNRequestTextRecognitionLevel ¶
type VNRequestTextRecognitionLevel int
See: https://developer.apple.com/documentation/Vision/VNRequestTextRecognitionLevel
const ( // VNRequestTextRecognitionLevelAccurate: Accurate text recognition takes more time to produce a more comprehensive result. VNRequestTextRecognitionLevelAccurate VNRequestTextRecognitionLevel = 0 // VNRequestTextRecognitionLevelFast: Fast text recognition returns results more quickly at the expense of accuracy. VNRequestTextRecognitionLevelFast VNRequestTextRecognitionLevel = 1 )
func (VNRequestTextRecognitionLevel) String ¶
func (e VNRequestTextRecognitionLevel) String() string
type VNRequestTrackingLevel ¶
type VNRequestTrackingLevel int
See: https://developer.apple.com/documentation/Vision/VNRequestTrackingLevel
const ( // VNRequestTrackingLevelAccurate: Tracking level that favors location accuracy over speed. VNRequestTrackingLevelAccurate VNRequestTrackingLevel = 0 // VNRequestTrackingLevelFast: Tracking level that favors speed over location accuracy. VNRequestTrackingLevelFast VNRequestTrackingLevel = 1 )
func (VNRequestTrackingLevel) String ¶
func (e VNRequestTrackingLevel) String() string
type VNSaliencyImageObservation ¶
type VNSaliencyImageObservation struct {
VNPixelBufferObservation
}
An observation that contains a grayscale heat map of important areas across an image.
Overview ¶
The heat map is a CVPixelBuffer in a one-component floating-point pixel format. Its dimensions are 64 x 64 when fetched in real time, or 68 x 68 when requested in its deferred form.
Locating Salient Regions ¶
- VNSaliencyImageObservation.SalientObjects: A collection of objects describing the distinct areas of the saliency heat map.
See: https://developer.apple.com/documentation/Vision/VNSaliencyImageObservation
func NewVNSaliencyImageObservation ¶
func NewVNSaliencyImageObservation() VNSaliencyImageObservation
NewVNSaliencyImageObservation creates a new VNSaliencyImageObservation instance.
func VNSaliencyImageObservationFromID ¶
func VNSaliencyImageObservationFromID(id objc.ID) VNSaliencyImageObservation
VNSaliencyImageObservationFromID constructs a VNSaliencyImageObservation from an objc.ID.
An observation that contains a grayscale heat map of important areas across an image.
func (VNSaliencyImageObservation) Autorelease ¶
func (s VNSaliencyImageObservation) Autorelease() VNSaliencyImageObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNSaliencyImageObservation) Init ¶
func (s VNSaliencyImageObservation) Init() VNSaliencyImageObservation
Init initializes the instance.
func (VNSaliencyImageObservation) SalientObjects ¶
func (s VNSaliencyImageObservation) SalientObjects() []VNRectangleObservation
A collection of objects describing the distinct areas of the saliency heat map.
Discussion ¶
The objects in this array don’t follow any specific ordering. It’s up to your app to iterate across the observations and apply desired ordering.
Requesting this array lazily computes the bounds of salient objects within the image.
See: https://developer.apple.com/documentation/Vision/VNSaliencyImageObservation/salientObjects
type VNSaliencyImageObservationClass ¶
type VNSaliencyImageObservationClass struct {
// contains filtered or unexported fields
}
func GetVNSaliencyImageObservationClass ¶
func GetVNSaliencyImageObservationClass() VNSaliencyImageObservationClass
GetVNSaliencyImageObservationClass returns the class object for VNSaliencyImageObservation.
func (VNSaliencyImageObservationClass) Alloc ¶
func (vc VNSaliencyImageObservationClass) Alloc() VNSaliencyImageObservation
Alloc allocates memory for a new instance of the class.
type VNSequenceRequestHandler ¶
type VNSequenceRequestHandler struct {
objectivec.Object
}
An object that processes image-analysis requests for each frame in a sequence.
Overview ¶
Instantiate this handler to perform Vision requests on a series of images. Unlike the VNImageRequestHandler, you don’t specify the image on creation. Instead, you supply each image frame one by one as you continue to call one of the `perform` methods.
Performing a Sequence Request ¶
- VNSequenceRequestHandler.PerformRequestsOnCGImageError: Schedules Vision requests to be performed on a Core Graphics image.
- VNSequenceRequestHandler.PerformRequestsOnCGImageOrientationError: Schedules one or more Vision requests to be performed on a Core Graphics image with known orientation.
- VNSequenceRequestHandler.PerformRequestsOnCIImageError: Schedules one or more Vision requests to be performed on Core Image image data.
- VNSequenceRequestHandler.PerformRequestsOnCIImageOrientationError: Schedules one or more Vision requests to be performed on Core Image image data with known orientation.
- VNSequenceRequestHandler.PerformRequestsOnCVPixelBufferError: Schedules one or more Vision requests to be performed on a Core Video pixel buffer.
- VNSequenceRequestHandler.PerformRequestsOnCVPixelBufferOrientationError: Schedules one or more Vision requests to be performed on a Core Video pixel buffer with known orientation.
- VNSequenceRequestHandler.PerformRequestsOnCMSampleBufferError: Performs one or more requests on an image contained within a sample buffer.
- VNSequenceRequestHandler.PerformRequestsOnCMSampleBufferOrientationError: Performs one or more requests on an image of a specified orientation contained within a sample buffer.
- VNSequenceRequestHandler.PerformRequestsOnImageDataError: Schedules one or more Vision requests to be performed on raw image data.
- VNSequenceRequestHandler.PerformRequestsOnImageDataOrientationError: Schedules one or more Vision requests to be performed on raw data containing an image with known orientation.
- VNSequenceRequestHandler.PerformRequestsOnImageURLError: Schedules one or more Vision requests to be performed on an image.
- VNSequenceRequestHandler.PerformRequestsOnImageURLOrientationError: Schedules one or more Vision requests to be performed on an image with known orientation, at a specific URL.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler
func NewVNSequenceRequestHandler ¶
func NewVNSequenceRequestHandler() VNSequenceRequestHandler
NewVNSequenceRequestHandler creates a new VNSequenceRequestHandler instance.
func VNSequenceRequestHandlerFromID ¶
func VNSequenceRequestHandlerFromID(id objc.ID) VNSequenceRequestHandler
VNSequenceRequestHandlerFromID constructs a VNSequenceRequestHandler from an objc.ID.
An object that processes image-analysis requests for each frame in a sequence.
func (VNSequenceRequestHandler) Autorelease ¶
func (s VNSequenceRequestHandler) Autorelease() VNSequenceRequestHandler
Autorelease adds the receiver to the current autorelease pool.
func (VNSequenceRequestHandler) Init ¶
func (s VNSequenceRequestHandler) Init() VNSequenceRequestHandler
Init initializes the instance.
func (VNSequenceRequestHandler) PerformRequestsOnCGImageError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCGImageError(requests []VNRequest, image coregraphics.CGImageRef) (bool, error)
Schedules Vision requests to be performed on a Core Graphics image.
requests: An array of VNRequest requests to perform.
image: The input [CGImage] on which to perform the request. // [CGImage]: https://developer.apple.com/documentation/CoreGraphics/CGImage
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-3zt7l
func (VNSequenceRequestHandler) PerformRequestsOnCGImageOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCGImageOrientationError(requests []VNRequest, image coregraphics.CGImageRef, orientation objectivec.IObject) (bool, error)
Schedules one or more Vision requests to be performed on a Core Graphics image with known orientation.
requests: An array of VNRequest requests to perform.
image: The input [CGImage] on which to perform the request. // [CGImage]: https://developer.apple.com/documentation/CoreGraphics/CGImage
orientation: The orientation of the input `image`.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNSequenceRequestHandler) PerformRequestsOnCIImageError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCIImageError(requests []VNRequest, image coreimage.CIImage) (bool, error)
Schedules one or more Vision requests to be performed on Core Image image data.
requests: An array of VNRequest requests to perform.
image: The input [CIImage] on which to perform the request. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-9jtgj
func (VNSequenceRequestHandler) PerformRequestsOnCIImageOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCIImageOrientationError(requests []VNRequest, image coreimage.CIImage, orientation objectivec.IObject) (bool, error)
Schedules one or more Vision requests to be performed on Core Image image data with known orientation.
requests: An array of VNRequest requests to perform.
image: The input [CIImage] on which to perform the request. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the input `image`.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferError(requests []VNRequest, sampleBuffer objectivec.IObject) (bool, error)
Performs one or more requests on an image contained within a sample buffer.
requests: The array of requests to perform.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
sampleBuffer is a [coremedia.CMSampleBufferRef].
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-45e73
func (VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferOrientationError(requests []VNRequest, sampleBuffer objectivec.IObject, orientation objectivec.IObject) (bool, error)
Performs one or more requests on an image of a specified orientation contained within a sample buffer.
requests: The array of requests to perform.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The orientation of the image contained within the sample buffer.
sampleBuffer is a [coremedia.CMSampleBufferRef].
orientation is a [imageio.CGImagePropertyOrientation].
func (VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef) (bool, error)
Schedules one or more Vision requests to be performed on a Core Video pixel buffer.
requests: An array of VNRequest requests to perform.
pixelBuffer: The input [CVPixelBuffer] on which to perform the request. // [CVPixelBuffer]: https://developer.apple.com/documentation/CoreVideo/CVPixelBuffer
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-3d7nt
func (VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferOrientationError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject) (bool, error)
Schedules one or more Vision requests to be performed on a Core Video pixel buffer with known orientation.
requests: An array of VNRequest requests to perform.
pixelBuffer: The input [CVPixelBuffer] on which to perform the request. // [CVPixelBuffer]: https://developer.apple.com/documentation/CoreVideo/CVPixelBuffer
orientation: The orientation of the input `image`.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNSequenceRequestHandler) PerformRequestsOnImageDataError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnImageDataError(requests []VNRequest, imageData foundation.INSData) (bool, error)
Schedules one or more Vision requests to be performed on raw image data.
requests: An array of VNRequest requests to perform.
imageData: The input image data on which to perform the request.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:onImageData:)
func (VNSequenceRequestHandler) PerformRequestsOnImageDataOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnImageDataOrientationError(requests []VNRequest, imageData foundation.INSData, orientation objectivec.IObject) (bool, error)
Schedules one or more Vision requests to be performed on raw data containing an image with known orientation.
requests: An array of VNRequest requests to perform.
imageData: The input image data on which to perform the request.
orientation: The orientation of the input image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNSequenceRequestHandler) PerformRequestsOnImageURLError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnImageURLError(requests []VNRequest, imageURL foundation.INSURL) (bool, error)
Schedules one or more Vision requests to be performed on an image.
requests: An array of VNRequest requests to perform.
imageURL: A URL pointing to the image on which to perform the request.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:onImageURL:)
func (VNSequenceRequestHandler) PerformRequestsOnImageURLOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnImageURLOrientationError(requests []VNRequest, imageURL foundation.INSURL, orientation objectivec.IObject) (bool, error)
Schedules one or more Vision requests to be performed on an image with known orientation, at a specific URL.
requests: An array of VNRequest requests to perform.
imageURL: A URL pointing to the image on which to perform the request.
orientation: The orientation of the input image.
orientation is a [imageio.CGImagePropertyOrientation].
type VNSequenceRequestHandlerClass ¶
type VNSequenceRequestHandlerClass struct {
// contains filtered or unexported fields
}
func GetVNSequenceRequestHandlerClass ¶
func GetVNSequenceRequestHandlerClass() VNSequenceRequestHandlerClass
GetVNSequenceRequestHandlerClass returns the class object for VNSequenceRequestHandler.
func (VNSequenceRequestHandlerClass) Alloc ¶
func (vc VNSequenceRequestHandlerClass) Alloc() VNSequenceRequestHandler
Alloc allocates memory for a new instance of the class.
type VNStatefulRequest ¶
type VNStatefulRequest struct {
VNImageBasedRequest
}
An abstract request type that builds evidence of a condition over time.
Initializing a Request ¶
- VNStatefulRequest.InitWithFrameAnalysisSpacingCompletionHandler: Initializes a video-based request.
Configuring the Request ¶
- VNStatefulRequest.MinimumLatencyFrameCount: The minimum number of frames a request processes before reporting an observation.
- VNStatefulRequest.FrameAnalysisSpacing: A time value that indicates the interval between analysis operations.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest
func NewStatefulRequestWithCompletionHandler ¶
func NewStatefulRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNStatefulRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewStatefulRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewStatefulRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNStatefulRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNStatefulRequest ¶
func NewVNStatefulRequest() VNStatefulRequest
NewVNStatefulRequest creates a new VNStatefulRequest instance.
func VNStatefulRequestFromID ¶
func VNStatefulRequestFromID(id objc.ID) VNStatefulRequest
VNStatefulRequestFromID constructs a VNStatefulRequest from an objc.ID.
An abstract request type that builds evidence of a condition over time.
func (VNStatefulRequest) Autorelease ¶
func (s VNStatefulRequest) Autorelease() VNStatefulRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNStatefulRequest) FrameAnalysisSpacing ¶
func (s VNStatefulRequest) FrameAnalysisSpacing() objectivec.IObject
A time value that indicates the interval between analysis operations.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/frameAnalysisSpacing
func (VNStatefulRequest) Init ¶
func (s VNStatefulRequest) Init() VNStatefulRequest
Init initializes the instance.
func (VNStatefulRequest) InitWithFrameAnalysisSpacingCompletionHandler ¶
func (s VNStatefulRequest) InitWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler ErrorHandler) VNStatefulRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
frameAnalysisSpacing is a [coremedia.CMTime].
func (VNStatefulRequest) MinimumLatencyFrameCount ¶
func (s VNStatefulRequest) MinimumLatencyFrameCount() int
The minimum number of frames a request processes before reporting an observation.
Discussion ¶
Video-based requests often need a minimum number of frames before they can report an observation. For example, a movement detection request requires a minimum of five frames before it can generate an observation. This value indicates how responsive a request is at processing incoming data.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/minimumLatencyFrameCount
type VNStatefulRequestClass ¶
type VNStatefulRequestClass struct {
// contains filtered or unexported fields
}
func GetVNStatefulRequestClass ¶
func GetVNStatefulRequestClass() VNStatefulRequestClass
GetVNStatefulRequestClass returns the class object for VNStatefulRequest.
func (VNStatefulRequestClass) Alloc ¶
func (vc VNStatefulRequestClass) Alloc() VNStatefulRequest
Alloc allocates memory for a new instance of the class.
type VNTargetedImageRequest ¶
type VNTargetedImageRequest struct {
VNImageBasedRequest
}
The abstract superclass for image analysis requests that operate on both the processed image and a secondary image.
Overview ¶
Other Vision request handlers that operate on both the processed image and a secondary image inherit from this abstract base class. Instantiate one of its subclasses to perform image analysis, and pass in auxiliary image data by filling in the `options` dictionary at initialization.
Creating a Request ¶
- VNTargetedImageRequest.InitWithTargetedCGImageOptionsCompletionHandler: Creates a new request targeting a Core Graphics image, executing the completion handler when done.
- VNTargetedImageRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler: Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
- VNTargetedImageRequest.InitWithTargetedCIImageOptionsCompletionHandler: Creates a new request targeting a Core Image image.
- VNTargetedImageRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler: Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
- VNTargetedImageRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler: Creates a new request targeting an image in a pixel buffer.
- VNTargetedImageRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler: Creates a new request targeting an image in a pixel buffer of known orientation.
- VNTargetedImageRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler: Creates a new request with a completion handler that targets an image in a sample buffer.
- VNTargetedImageRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler: Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
- VNTargetedImageRequest.InitWithTargetedImageDataOptionsCompletionHandler: Creates a new request targeting an image as raw data, executing the completion handler when done.
- VNTargetedImageRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler: Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
- VNTargetedImageRequest.InitWithTargetedImageURLOptionsCompletionHandler: Creates a new request targeting an image at the specified URL, executing the completion handler when done.
- VNTargetedImageRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler: Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest
func NewTargetedImageRequestWithCompletionHandler ¶
func NewTargetedImageRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewTargetedImageRequestWithTargetedCGImageOptions ¶
func NewTargetedImageRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTargetedImageRequestWithTargetedCGImageOrientationOptions ¶
func NewTargetedImageRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image of known orientation.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCGImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCGImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCIImageOptions ¶
func NewTargetedImageRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
func NewTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTargetedImageRequestWithTargetedCIImageOrientationOptions ¶
func NewTargetedImageRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCIImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCIImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCMSampleBufferOptions ¶
func NewTargetedImageRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:options: sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request with a completion handler that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientation values. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:orientation:options: sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientations. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:orientation:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCVPixelBufferOptions ¶
func NewTargetedImageRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCVPixelBuffer:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCVPixelBuffer:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedImageDataOptions ¶
func NewTargetedImageRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image as raw data.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting an image as raw data, executing the completion handler when done.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTargetedImageRequestWithTargetedImageDataOrientationOptions ¶
func NewTargetedImageRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a raw data image of known orientation.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageData:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageData:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedImageURLOptions ¶
func NewTargetedImageRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image at the specified URL.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting an image at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTargetedImageRequestWithTargetedImageURLOrientationOptions ¶
func NewTargetedImageRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image of known orientation, at the specified URL.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageURL:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTargetedImageRequest
Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageURL:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewVNTargetedImageRequest ¶
func NewVNTargetedImageRequest() VNTargetedImageRequest
NewVNTargetedImageRequest creates a new VNTargetedImageRequest instance.
func VNTargetedImageRequestFromID ¶
func VNTargetedImageRequestFromID(id objc.ID) VNTargetedImageRequest
VNTargetedImageRequestFromID constructs a VNTargetedImageRequest from an objc.ID.
The abstract superclass for image analysis requests that operate on both the processed image and a secondary image.
func (VNTargetedImageRequest) Autorelease ¶
func (t VNTargetedImageRequest) Autorelease() VNTargetedImageRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTargetedImageRequest) Init ¶
func (t VNTargetedImageRequest) Init() VNTargetedImageRequest
Init initializes the instance.
func (VNTargetedImageRequest) InitWithTargetedCGImageOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCGImageOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image of known orientation.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCIImageOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCIImageOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
sampleBuffer is a [coremedia.CMSampleBufferRef].
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request with a completion handler that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
sampleBuffer is a [coremedia.CMSampleBufferRef].
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientation values. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
sampleBuffer is a [coremedia.CMSampleBufferRef].
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientations. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
sampleBuffer is a [coremedia.CMSampleBufferRef].
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedImageDataOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image as raw data.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedImageDataOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting an image as raw data, executing the completion handler when done.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a raw data image of known orientation.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedImageURLOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image at the specified URL.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedImageURLOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting an image at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting an image of known orientation, at the specified URL.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
orientation is a [imageio.CGImagePropertyOrientation].
func (VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler ErrorHandler) VNTargetedImageRequest
Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
orientation is a [imageio.CGImagePropertyOrientation].
type VNTargetedImageRequestClass ¶
type VNTargetedImageRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTargetedImageRequestClass ¶
func GetVNTargetedImageRequestClass() VNTargetedImageRequestClass
GetVNTargetedImageRequestClass returns the class object for VNTargetedImageRequest.
func (VNTargetedImageRequestClass) Alloc ¶
func (vc VNTargetedImageRequestClass) Alloc() VNTargetedImageRequest
Alloc allocates memory for a new instance of the class.
type VNTextObservation ¶
type VNTextObservation struct {
VNRectangleObservation
}
Information about regions of text that an image-analysis request detects.
Overview ¶
This type of observation results from a VNDetectTextRectanglesRequest. It expresses the location of each detected character by its bounding box.
Finding Individual Characters ¶
- VNTextObservation.CharacterBoxes: An array of detected individual character bounding boxes.
See: https://developer.apple.com/documentation/Vision/VNTextObservation
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNTextObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
bottomLeft: The lower-left corner point.
bottomRight: The lower-right corner point.
topRight: The upper-right corner point.
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNTextObservation
Creates a rectangle observation from its corner points.
requestRevision: The rectangle detector revision number. A higher revision indicates more recent iterations of the framework.
topLeft: The upper-left corner point.
topRight: The upper-right corner point.
bottomRight: The lower-right corner point.
bottomLeft: The lower-left corner point.
func NewTextObservationWithBoundingBox ¶
func NewTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNTextObservation
Creates an observation with a bounding box.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNDetectedObjectObservation/init(boundingBox:)
func NewTextObservationWithRequestRevisionBoundingBox ¶
func NewTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNTextObservation
Creates an observation with a revision number and bounding box.
requestRevision: The revision of the request to use.
boundingBox: The observation’s bounding box, in coordinates normalized to the dimensions of the processed image, with its origin at the image’s lower-left corner.
func NewVNTextObservation ¶
func NewVNTextObservation() VNTextObservation
NewVNTextObservation creates a new VNTextObservation instance.
func VNTextObservationFromID ¶
func VNTextObservationFromID(id objc.ID) VNTextObservation
VNTextObservationFromID constructs a VNTextObservation from an objc.ID.
Information about regions of text that an image-analysis request detects.
func (VNTextObservation) Autorelease ¶
func (t VNTextObservation) Autorelease() VNTextObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNTextObservation) CharacterBoxes ¶
func (t VNTextObservation) CharacterBoxes() []VNRectangleObservation
An array of detected individual character bounding boxes.
Discussion ¶
If the associated VNDetectTextRectanglesRequest request indicates interest in character boxes by setting the option `reportCharacterBoxes` to true, this property is non-`nil`. If no characters are found, it remains empty.
See: https://developer.apple.com/documentation/Vision/VNTextObservation/characterBoxes
func (VNTextObservation) Init ¶
func (t VNTextObservation) Init() VNTextObservation
Init initializes the instance.
type VNTextObservationClass ¶
type VNTextObservationClass struct {
// contains filtered or unexported fields
}
func GetVNTextObservationClass ¶
func GetVNTextObservationClass() VNTextObservationClass
GetVNTextObservationClass returns the class object for VNTextObservation.
func (VNTextObservationClass) Alloc ¶
func (vc VNTextObservationClass) Alloc() VNTextObservation
Alloc allocates memory for a new instance of the class.
type VNTrackHomographicImageRegistrationRequest ¶
type VNTrackHomographicImageRegistrationRequest struct {
VNStatefulRequest
}
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.
Overview ¶
This request is similar to VNHomographicImageRegistrationRequest. However, as a VNStatefulRequest, it automatically computes the registration against the previous frame.
See: https://developer.apple.com/documentation/Vision/VNTrackHomographicImageRegistrationRequest
func NewTrackHomographicImageRegistrationRequestWithCompletionHandler ¶
func NewTrackHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackHomographicImageRegistrationRequest
Creates a new request that tracks the homographic transformation of two images, with a system callback on completion.
completionHandler: The callback the system invokes when it completes the request.
func NewTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNTrackHomographicImageRegistrationRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNTrackHomographicImageRegistrationRequest ¶
func NewVNTrackHomographicImageRegistrationRequest() VNTrackHomographicImageRegistrationRequest
NewVNTrackHomographicImageRegistrationRequest creates a new VNTrackHomographicImageRegistrationRequest instance.
func VNTrackHomographicImageRegistrationRequestFromID ¶
func VNTrackHomographicImageRegistrationRequestFromID(id objc.ID) VNTrackHomographicImageRegistrationRequest
VNTrackHomographicImageRegistrationRequestFromID constructs a VNTrackHomographicImageRegistrationRequest from an objc.ID.
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.
func (VNTrackHomographicImageRegistrationRequest) Autorelease ¶
func (t VNTrackHomographicImageRegistrationRequest) Autorelease() VNTrackHomographicImageRegistrationRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTrackHomographicImageRegistrationRequest) Init ¶
func (t VNTrackHomographicImageRegistrationRequest) Init() VNTrackHomographicImageRegistrationRequest
Init initializes the instance.
type VNTrackHomographicImageRegistrationRequestClass ¶
type VNTrackHomographicImageRegistrationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTrackHomographicImageRegistrationRequestClass ¶
func GetVNTrackHomographicImageRegistrationRequestClass() VNTrackHomographicImageRegistrationRequestClass
GetVNTrackHomographicImageRegistrationRequestClass returns the class object for VNTrackHomographicImageRegistrationRequest.
func (VNTrackHomographicImageRegistrationRequestClass) Alloc ¶
func (vc VNTrackHomographicImageRegistrationRequestClass) Alloc() VNTrackHomographicImageRegistrationRequest
Alloc allocates memory for a new instance of the class.
type VNTrackObjectRequest ¶
type VNTrackObjectRequest struct {
VNTrackingRequest
}
An image-analysis request that tracks the movement of a previously identified object across multiple images or video frames.
Overview ¶
Use this type of request to track the bounding boxes around objects previously identified in an image. Vision attempts to locate the same object from the input observation throughout the sequence.
Initializing an Object Tracking Request ¶
- VNTrackObjectRequest.InitWithDetectedObjectObservation: Creates a new object tracking request with a detected object observation.
- VNTrackObjectRequest.InitWithDetectedObjectObservationCompletionHandler: Creates a new object tracking request with a detected object observation.
Identifying Request Revisions ¶
- VNTrackObjectRequest.VNTrackObjectRequestRevision2: A constant for specifying revision 2 of the object tracking request.
- VNTrackObjectRequest.VNTrackObjectRequestRevision1: A constant for specifying revision 1 of the object tracking request.
See: https://developer.apple.com/documentation/Vision/VNTrackObjectRequest
func NewTrackObjectRequestWithCompletionHandler ¶
func NewTrackObjectRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackObjectRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewTrackObjectRequestWithDetectedObjectObservation ¶
func NewTrackObjectRequestWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
Creates a new object tracking request with a detected object observation.
observation: A detected object observation with bounding box information.
func NewTrackObjectRequestWithDetectedObjectObservationCompletionHandler ¶
func NewTrackObjectRequestWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, completionHandler VNRequestCompletionHandler) VNTrackObjectRequest
Creates a new object tracking request with a detected object observation.
observation: A detected object observation with bounding box information.
completionHandler: The callback to invoke after performing the request.
func NewVNTrackObjectRequest ¶
func NewVNTrackObjectRequest() VNTrackObjectRequest
NewVNTrackObjectRequest creates a new VNTrackObjectRequest instance.
func VNTrackObjectRequestFromID ¶
func VNTrackObjectRequestFromID(id objc.ID) VNTrackObjectRequest
VNTrackObjectRequestFromID constructs a VNTrackObjectRequest from an objc.ID.
An image-analysis request that tracks the movement of a previously identified object across multiple images or video frames.
func (VNTrackObjectRequest) Autorelease ¶
func (t VNTrackObjectRequest) Autorelease() VNTrackObjectRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTrackObjectRequest) Init ¶
func (t VNTrackObjectRequest) Init() VNTrackObjectRequest
Init initializes the instance.
func (VNTrackObjectRequest) InitWithDetectedObjectObservation ¶
func (t VNTrackObjectRequest) InitWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
Creates a new object tracking request with a detected object observation.
observation: A detected object observation with bounding box information.
func (VNTrackObjectRequest) InitWithDetectedObjectObservationCompletionHandler ¶
func (t VNTrackObjectRequest) InitWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, completionHandler ErrorHandler) VNTrackObjectRequest
Creates a new object tracking request with a detected object observation.
observation: A detected object observation with bounding box information.
completionHandler: The callback to invoke after performing the request.
func (VNTrackObjectRequest) VNTrackObjectRequestRevision1 ¶
func (t VNTrackObjectRequest) VNTrackObjectRequestRevision1() int
A constant for specifying revision 1 of the object tracking request.
See: https://developer.apple.com/documentation/vision/vntrackobjectrequestrevision1
func (VNTrackObjectRequest) VNTrackObjectRequestRevision2 ¶
func (t VNTrackObjectRequest) VNTrackObjectRequestRevision2() int
A constant for specifying revision 2 of the object tracking request.
See: https://developer.apple.com/documentation/vision/vntrackobjectrequestrevision2
type VNTrackObjectRequestClass ¶
type VNTrackObjectRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTrackObjectRequestClass ¶
func GetVNTrackObjectRequestClass() VNTrackObjectRequestClass
GetVNTrackObjectRequestClass returns the class object for VNTrackObjectRequest.
func (VNTrackObjectRequestClass) Alloc ¶
func (vc VNTrackObjectRequestClass) Alloc() VNTrackObjectRequest
Alloc allocates memory for a new instance of the class.
type VNTrackOpticalFlowRequest ¶
type VNTrackOpticalFlowRequest struct {
VNStatefulRequest
}
An object that determines the direction change of vectors for each pixel from a previous to current image.
Overview ¶
This request works at the pixel level, so both images must have the same dimensions to successfully perform the request.
Setting a region of interest isolates where to perform the change determination.
Configuring the Request ¶
- VNTrackOpticalFlowRequest.ComputationAccuracy: The level of accuracy to compute the optical flow.
- VNTrackOpticalFlowRequest.SetComputationAccuracy
- VNTrackOpticalFlowRequest.KeepNetworkOutput: A Boolean value that indicates the raw pixel buffer continues to emit from the network.
- VNTrackOpticalFlowRequest.SetKeepNetworkOutput
- VNTrackOpticalFlowRequest.OutputPixelFormat: The pixel format type of the output value.
- VNTrackOpticalFlowRequest.SetOutputPixelFormat
See: https://developer.apple.com/documentation/Vision/VNTrackOpticalFlowRequest
func NewTrackOpticalFlowRequestWithCompletionHandler ¶
func NewTrackOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackOpticalFlowRequest
Creates a new request that tracks the optical from one image to another, with a system callback on completion.
completionHandler: The callback the system invokes when it completes the request.
See: https://developer.apple.com/documentation/Vision/VNTrackOpticalFlowRequest/init(completionHandler:)
func NewTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNTrackOpticalFlowRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNTrackOpticalFlowRequest ¶
func NewVNTrackOpticalFlowRequest() VNTrackOpticalFlowRequest
NewVNTrackOpticalFlowRequest creates a new VNTrackOpticalFlowRequest instance.
func VNTrackOpticalFlowRequestFromID ¶
func VNTrackOpticalFlowRequestFromID(id objc.ID) VNTrackOpticalFlowRequest
VNTrackOpticalFlowRequestFromID constructs a VNTrackOpticalFlowRequest from an objc.ID.
An object that determines the direction change of vectors for each pixel from a previous to current image.
func (VNTrackOpticalFlowRequest) Autorelease ¶
func (t VNTrackOpticalFlowRequest) Autorelease() VNTrackOpticalFlowRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTrackOpticalFlowRequest) ComputationAccuracy ¶
func (t VNTrackOpticalFlowRequest) ComputationAccuracy() VNTrackOpticalFlowRequestComputationAccuracy
The level of accuracy to compute the optical flow.
Discussion ¶
The computational time trends with accuracy level. The default value is [TrackOpticalFlowRequestComputationAccuracyMedium].
func (VNTrackOpticalFlowRequest) Init ¶
func (t VNTrackOpticalFlowRequest) Init() VNTrackOpticalFlowRequest
Init initializes the instance.
func (VNTrackOpticalFlowRequest) KeepNetworkOutput ¶
func (t VNTrackOpticalFlowRequest) KeepNetworkOutput() bool
A Boolean value that indicates the raw pixel buffer continues to emit from the network.
Discussion ¶
The default value is false; otherwise, the request ignores [OutputPixelFormat].
See: https://developer.apple.com/documentation/Vision/VNTrackOpticalFlowRequest/keepNetworkOutput
func (VNTrackOpticalFlowRequest) OutputPixelFormat ¶
func (t VNTrackOpticalFlowRequest) OutputPixelFormat() uint32
The pixel format type of the output value.
Discussion ¶
The valid values are kCVPixelFormatType_TwoComponent32Float and kCVPixelFormatType_TwoComponent16Half. The default value is kCVPixelFormatType_TwoComponent32Float.
See: https://developer.apple.com/documentation/Vision/VNTrackOpticalFlowRequest/outputPixelFormat
func (VNTrackOpticalFlowRequest) SetComputationAccuracy ¶
func (t VNTrackOpticalFlowRequest) SetComputationAccuracy(value VNTrackOpticalFlowRequestComputationAccuracy)
func (VNTrackOpticalFlowRequest) SetKeepNetworkOutput ¶
func (t VNTrackOpticalFlowRequest) SetKeepNetworkOutput(value bool)
func (VNTrackOpticalFlowRequest) SetOutputPixelFormat ¶
func (t VNTrackOpticalFlowRequest) SetOutputPixelFormat(value uint32)
type VNTrackOpticalFlowRequestClass ¶
type VNTrackOpticalFlowRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTrackOpticalFlowRequestClass ¶
func GetVNTrackOpticalFlowRequestClass() VNTrackOpticalFlowRequestClass
GetVNTrackOpticalFlowRequestClass returns the class object for VNTrackOpticalFlowRequest.
func (VNTrackOpticalFlowRequestClass) Alloc ¶
func (vc VNTrackOpticalFlowRequestClass) Alloc() VNTrackOpticalFlowRequest
Alloc allocates memory for a new instance of the class.
type VNTrackOpticalFlowRequestComputationAccuracy ¶
type VNTrackOpticalFlowRequestComputationAccuracy int
const ( // VNTrackOpticalFlowRequestComputationAccuracyHigh: An option that indicates a high level of computational accuracy. VNTrackOpticalFlowRequestComputationAccuracyHigh VNTrackOpticalFlowRequestComputationAccuracy = 2 // VNTrackOpticalFlowRequestComputationAccuracyLow: An option that indicates a low level of computational accuracy. VNTrackOpticalFlowRequestComputationAccuracyLow VNTrackOpticalFlowRequestComputationAccuracy = 0 // VNTrackOpticalFlowRequestComputationAccuracyMedium: An option that indicates a moderate level of computational accuracy. VNTrackOpticalFlowRequestComputationAccuracyMedium VNTrackOpticalFlowRequestComputationAccuracy = 1 // VNTrackOpticalFlowRequestComputationAccuracyVeryHigh: An option that indicates a very high level of computational accuracy. VNTrackOpticalFlowRequestComputationAccuracyVeryHigh VNTrackOpticalFlowRequestComputationAccuracy = 3 )
func (VNTrackOpticalFlowRequestComputationAccuracy) String ¶
func (e VNTrackOpticalFlowRequestComputationAccuracy) String() string
type VNTrackRectangleRequest ¶
type VNTrackRectangleRequest struct {
VNTrackingRequest
}
An image-analysis request that tracks movement of a previously identified rectangular object across multiple images or video frames.
Overview ¶
Use this type of request to track the bounding boxes of rectangles throughout a sequence of images. Vision returns locations for rectangles found in all orientations and sizes.
Initializing a Rectangle Tracking Request ¶
- VNTrackRectangleRequest.InitWithRectangleObservation: Creates a new rectangle tracking request with a rectangle observation.
- VNTrackRectangleRequest.InitWithRectangleObservationCompletionHandler: Creates a new rectangle tracking request with a rectangle observation.
Identifying Request Revisions ¶
- VNTrackRectangleRequest.VNTrackRectangleRequestRevision1: A constant for specifying revision 1 of the rectangling tracking request.
See: https://developer.apple.com/documentation/Vision/VNTrackRectangleRequest
func NewTrackRectangleRequestWithCompletionHandler ¶
func NewTrackRectangleRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackRectangleRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewTrackRectangleRequestWithRectangleObservation ¶
func NewTrackRectangleRequestWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
Creates a new rectangle tracking request with a rectangle observation.
observation: A rectangle observation with bounding box and corner location information.
See: https://developer.apple.com/documentation/Vision/VNTrackRectangleRequest/init(rectangleObservation:)
func NewTrackRectangleRequestWithRectangleObservationCompletionHandler ¶
func NewTrackRectangleRequestWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler VNRequestCompletionHandler) VNTrackRectangleRequest
Creates a new rectangle tracking request with a rectangle observation.
observation: A rectangle observation with bounding box and corner location information.
completionHandler: The block to invoke after performing the request.
func NewVNTrackRectangleRequest ¶
func NewVNTrackRectangleRequest() VNTrackRectangleRequest
NewVNTrackRectangleRequest creates a new VNTrackRectangleRequest instance.
func VNTrackRectangleRequestFromID ¶
func VNTrackRectangleRequestFromID(id objc.ID) VNTrackRectangleRequest
VNTrackRectangleRequestFromID constructs a VNTrackRectangleRequest from an objc.ID.
An image-analysis request that tracks movement of a previously identified rectangular object across multiple images or video frames.
func (VNTrackRectangleRequest) Autorelease ¶
func (t VNTrackRectangleRequest) Autorelease() VNTrackRectangleRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTrackRectangleRequest) Init ¶
func (t VNTrackRectangleRequest) Init() VNTrackRectangleRequest
Init initializes the instance.
func (VNTrackRectangleRequest) InitWithRectangleObservation ¶
func (t VNTrackRectangleRequest) InitWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
Creates a new rectangle tracking request with a rectangle observation.
observation: A rectangle observation with bounding box and corner location information.
See: https://developer.apple.com/documentation/Vision/VNTrackRectangleRequest/init(rectangleObservation:)
func (VNTrackRectangleRequest) InitWithRectangleObservationCompletionHandler ¶
func (t VNTrackRectangleRequest) InitWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler ErrorHandler) VNTrackRectangleRequest
Creates a new rectangle tracking request with a rectangle observation.
observation: A rectangle observation with bounding box and corner location information.
completionHandler: The block to invoke after performing the request.
func (VNTrackRectangleRequest) VNTrackRectangleRequestRevision1 ¶
func (t VNTrackRectangleRequest) VNTrackRectangleRequestRevision1() int
A constant for specifying revision 1 of the rectangling tracking request.
See: https://developer.apple.com/documentation/vision/vntrackrectanglerequestrevision1
type VNTrackRectangleRequestClass ¶
type VNTrackRectangleRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTrackRectangleRequestClass ¶
func GetVNTrackRectangleRequestClass() VNTrackRectangleRequestClass
GetVNTrackRectangleRequestClass returns the class object for VNTrackRectangleRequest.
func (VNTrackRectangleRequestClass) Alloc ¶
func (vc VNTrackRectangleRequestClass) Alloc() VNTrackRectangleRequest
Alloc allocates memory for a new instance of the class.
type VNTrackTranslationalImageRegistrationRequest ¶
type VNTrackTranslationalImageRegistrationRequest struct {
VNStatefulRequest
}
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.
Overview ¶
This request is similar to VNTranslationalImageRegistrationRequest. However, as a VNStatefulRequest, it automatically computes the registration against the previous frame.
See: https://developer.apple.com/documentation/Vision/VNTrackTranslationalImageRegistrationRequest
func NewTrackTranslationalImageRegistrationRequestWithCompletionHandler ¶
func NewTrackTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackTranslationalImageRegistrationRequest
Creates a new request that tracks the translational registration of two images, with a system callback on completion.
completionHandler: The callback the system invokes when it completes the request.
func NewTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing objectivec.IObject, completionHandler VNRequestCompletionHandler) VNTrackTranslationalImageRegistrationRequest
Initializes a video-based request.
frameAnalysisSpacing: A [CMTime] value that indicates the duration between analysis operations. Increase this value to reduce the number of frames analyzed on slower devices. Set this argument to [zero] to analyze all frames. // [CMTime]: https://developer.apple.com/documentation/CoreMedia/CMTime [zero]: https://developer.apple.com/documentation/CoreMedia/CMTime/zero
completionHandler: A closure that’s invoked after the request has completed its processing. The system invokes the completion handler on the same dispatch queue as the request performs its processing.
See: https://developer.apple.com/documentation/Vision/VNStatefulRequest/init(frameAnalysisSpacing:completionHandler:) frameAnalysisSpacing is a [coremedia.CMTime].
func NewVNTrackTranslationalImageRegistrationRequest ¶
func NewVNTrackTranslationalImageRegistrationRequest() VNTrackTranslationalImageRegistrationRequest
NewVNTrackTranslationalImageRegistrationRequest creates a new VNTrackTranslationalImageRegistrationRequest instance.
func VNTrackTranslationalImageRegistrationRequestFromID ¶
func VNTrackTranslationalImageRegistrationRequestFromID(id objc.ID) VNTrackTranslationalImageRegistrationRequest
VNTrackTranslationalImageRegistrationRequestFromID constructs a VNTrackTranslationalImageRegistrationRequest from an objc.ID.
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.
func (VNTrackTranslationalImageRegistrationRequest) Autorelease ¶
func (t VNTrackTranslationalImageRegistrationRequest) Autorelease() VNTrackTranslationalImageRegistrationRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTrackTranslationalImageRegistrationRequest) Init ¶
func (t VNTrackTranslationalImageRegistrationRequest) Init() VNTrackTranslationalImageRegistrationRequest
Init initializes the instance.
type VNTrackTranslationalImageRegistrationRequestClass ¶
type VNTrackTranslationalImageRegistrationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTrackTranslationalImageRegistrationRequestClass ¶
func GetVNTrackTranslationalImageRegistrationRequestClass() VNTrackTranslationalImageRegistrationRequestClass
GetVNTrackTranslationalImageRegistrationRequestClass returns the class object for VNTrackTranslationalImageRegistrationRequest.
func (VNTrackTranslationalImageRegistrationRequestClass) Alloc ¶
func (vc VNTrackTranslationalImageRegistrationRequestClass) Alloc() VNTrackTranslationalImageRegistrationRequest
Alloc allocates memory for a new instance of the class.
type VNTrackingRequest ¶
type VNTrackingRequest struct {
VNImageBasedRequest
}
The abstract superclass for image-analysis requests that track unique features across multiple images or video frames.
Overview ¶
Instantiate a tracking request subclass to perform object tracking across multiple frames of an image. After initialization, configure the degree of accuracy by setting VNTrackingRequest.TrackingLevel, and provide observations you’d like to track by setting the VNTrackingRequest.InputObservation initial bounding box.
Configuring a Tracking Request ¶
- VNTrackingRequest.InputObservation: The observation object defining a region to track.
- VNTrackingRequest.SetInputObservation
- VNTrackingRequest.TrackingLevel: A value for specifying whether to prioritize speed or location accuracy.
- VNTrackingRequest.SetTrackingLevel
- VNTrackingRequest.LastFrame: A Boolean that indicates the last frame in a tracking sequence.
- VNTrackingRequest.SetLastFrame
Getting the Number of Trackers ¶
- VNTrackingRequest.SupportedNumberOfTrackersAndReturnError: Returns the maximum number of simultaneous trackers for the request.
See: https://developer.apple.com/documentation/Vision/VNTrackingRequest
func NewTrackingRequestWithCompletionHandler ¶
func NewTrackingRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTrackingRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNTrackingRequest ¶
func NewVNTrackingRequest() VNTrackingRequest
NewVNTrackingRequest creates a new VNTrackingRequest instance.
func VNTrackingRequestFromID ¶
func VNTrackingRequestFromID(id objc.ID) VNTrackingRequest
VNTrackingRequestFromID constructs a VNTrackingRequest from an objc.ID.
The abstract superclass for image-analysis requests that track unique features across multiple images or video frames.
func (VNTrackingRequest) Autorelease ¶
func (t VNTrackingRequest) Autorelease() VNTrackingRequest
Autorelease adds the receiver to the current autorelease pool.
func (VNTrackingRequest) Init ¶
func (t VNTrackingRequest) Init() VNTrackingRequest
Init initializes the instance.
func (VNTrackingRequest) InputObservation ¶
func (t VNTrackingRequest) InputObservation() IVNDetectedObjectObservation
The observation object defining a region to track.
Discussion ¶
Providing an observation not returned from a tracker, such as a user-defined observation, begins a new tracker for the sequence. Providing an observation that was returned from a tracker continues the use of that tracker, to track the region to the next frame.
In general, unless specified in the request’s documentation or header file, you must define the rectangle in normalized coordinates, with the origin at the lower-left corner.
See: https://developer.apple.com/documentation/Vision/VNTrackingRequest/inputObservation
func (VNTrackingRequest) LastFrame ¶
func (t VNTrackingRequest) LastFrame() bool
A Boolean that indicates the last frame in a tracking sequence.
Discussion ¶
If set to true, the current tracker will be released to the pool of available trackers when the current frame finishes processing.
See: https://developer.apple.com/documentation/Vision/VNTrackingRequest/isLastFrame
func (VNTrackingRequest) SetInputObservation ¶
func (t VNTrackingRequest) SetInputObservation(value IVNDetectedObjectObservation)
func (VNTrackingRequest) SetLastFrame ¶
func (t VNTrackingRequest) SetLastFrame(value bool)
func (VNTrackingRequest) SetTrackingLevel ¶
func (t VNTrackingRequest) SetTrackingLevel(value VNRequestTrackingLevel)
func (VNTrackingRequest) SupportedNumberOfTrackersAndReturnError ¶
func (t VNTrackingRequest) SupportedNumberOfTrackersAndReturnError() (uint, error)
Returns the maximum number of simultaneous trackers for the request.
error: An error that contains the reason why a failure occurs.
Return Value ¶
The maximum number of trackers given a combination; or `0` if such combination doesn’t exist.
func (VNTrackingRequest) TrackingLevel ¶
func (t VNTrackingRequest) TrackingLevel() VNRequestTrackingLevel
A value for specifying whether to prioritize speed or location accuracy.
See: https://developer.apple.com/documentation/Vision/VNTrackingRequest/trackingLevel
type VNTrackingRequestClass ¶
type VNTrackingRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTrackingRequestClass ¶
func GetVNTrackingRequestClass() VNTrackingRequestClass
GetVNTrackingRequestClass returns the class object for VNTrackingRequest.
func (VNTrackingRequestClass) Alloc ¶
func (vc VNTrackingRequestClass) Alloc() VNTrackingRequest
Alloc allocates memory for a new instance of the class.
type VNTrajectoryObservation ¶
type VNTrajectoryObservation struct {
VNObservation
}
An observation that describes a detected trajectory.
Evaluating an Observation ¶
- VNTrajectoryObservation.DetectedPoints: The centroid points of the detected contour along the trajectory.
- VNTrajectoryObservation.ProjectedPoints: The centroids of the calculated trajectory from the detected points.
- VNTrajectoryObservation.EquationCoefficients: The coefficients of the parabolic equation.
- VNTrajectoryObservation.MovingAverageRadius: The moving average radius of the object the request is tracking.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation
func NewVNTrajectoryObservation ¶
func NewVNTrajectoryObservation() VNTrajectoryObservation
NewVNTrajectoryObservation creates a new VNTrajectoryObservation instance.
func VNTrajectoryObservationFromID ¶
func VNTrajectoryObservationFromID(id objc.ID) VNTrajectoryObservation
VNTrajectoryObservationFromID constructs a VNTrajectoryObservation from an objc.ID.
An observation that describes a detected trajectory.
func (VNTrajectoryObservation) Autorelease ¶
func (t VNTrajectoryObservation) Autorelease() VNTrajectoryObservation
Autorelease adds the receiver to the current autorelease pool.
func (VNTrajectoryObservation) DetectedPoints ¶
func (t VNTrajectoryObservation) DetectedPoints() []VNPoint
The centroid points of the detected contour along the trajectory.
Discussion ¶
The detected points may differ slightly from the ideal trajectory because they fall within the allowed tolerance. The system limits the maximum number of points based on the maximum trajectory length set in the request.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation/detectedPoints
func (VNTrajectoryObservation) EquationCoefficients ¶
func (t VNTrajectoryObservation) EquationCoefficients() objectivec.IObject
The coefficients of the parabolic equation.
Discussion ¶
This equation describes the parabola on which the detected contour is traveling. The equation and the projected points get refined over time.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation/equationCoefficients
func (VNTrajectoryObservation) Init ¶
func (t VNTrajectoryObservation) Init() VNTrajectoryObservation
Init initializes the instance.
func (VNTrajectoryObservation) MovingAverageRadius ¶
func (t VNTrajectoryObservation) MovingAverageRadius() float64
The moving average radius of the object the request is tracking.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation/movingAverageRadius
func (VNTrajectoryObservation) ProjectedPoints ¶
func (t VNTrajectoryObservation) ProjectedPoints() []VNPoint
The centroids of the calculated trajectory from the detected points.
Discussion ¶
The projected points define the ideal trajectory described by the parabolic equation. The equation’s coefficients and the projected points of the detected trajectory get refined over time. The system limits the maximum number of cached points to the maximum points needed to describe the trajectory together with the parabolic equation.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation/projectedPoints
func (VNTrajectoryObservation) Results ¶
func (t VNTrajectoryObservation) Results() IVNTrajectoryObservation
The array of detected trajectory observations.
See: https://developer.apple.com/documentation/vision/vndetecttrajectoriesrequest/results
func (VNTrajectoryObservation) SetResults ¶
func (t VNTrajectoryObservation) SetResults(value IVNTrajectoryObservation)
type VNTrajectoryObservationClass ¶
type VNTrajectoryObservationClass struct {
// contains filtered or unexported fields
}
func GetVNTrajectoryObservationClass ¶
func GetVNTrajectoryObservationClass() VNTrajectoryObservationClass
GetVNTrajectoryObservationClass returns the class object for VNTrajectoryObservation.
func (VNTrajectoryObservationClass) Alloc ¶
func (vc VNTrajectoryObservationClass) Alloc() VNTrajectoryObservation
Alloc allocates memory for a new instance of the class.
type VNTranslationalImageRegistrationRequest ¶
type VNTranslationalImageRegistrationRequest struct {
VNImageRegistrationRequest
}
An image-analysis request that determines the affine transform necessary to align the content of two images.
Overview ¶
Create and perform a translational image registration request to align content in two images through translation.
See: https://developer.apple.com/documentation/Vision/VNTranslationalImageRegistrationRequest
func NewTranslationalImageRegistrationRequestWithCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new Vision request with an optional completion handler.
completionHandler: The block to invoke after the request finishes processing.
Discussion ¶
Vision executes the completion handler on the same queue that it executes the request; however, this queue differs from the one where you called [PerformRequestsError].
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Graphics image.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Graphics image, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Graphics image of known orientation.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCGImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
cgImage: The targeted Core Graphics image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCGImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptions(ciImage coreimage.CIImage, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCIImage:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage coreimage.CIImage, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
ciImage: The [CIImage] encapsulating the targeted image. // [CIImage]: https://developer.apple.com/documentation/CoreImage/CIImage
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCIImage:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:options: sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request with a completion handler that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef].
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientation values. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCMSampleBuffer:orientation:options: sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer objectivec.IObject, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
sampleBuffer: A sample buffer containing a valid [imageBuffer]. // [imageBuffer]: https://developer.apple.com/documentation/CoreMedia/CMSampleBuffer/imageBuffer
orientation: The EXIF orientation of the image. See [CGImagePropertyOrientation] for supported orientations. // [CGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/CGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCMSampleBuffer:orientation:options:completionHandler:) sampleBuffer is a [coremedia.CMSampleBufferRef]. orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer.
pixelBuffer: The pixel buffer containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedCVPixelBuffer:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image in a pixel buffer of known orientation.
pixelBuffer: The pixel buffer containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedCVPixelBuffer:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.INSData, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image as raw data.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.INSData, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image as raw data, executing the completion handler when done.
imageData: The data containing the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a raw data image of known orientation.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageData:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.INSData, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
imageData: The data containing the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageData:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.INSURL, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image at the specified URL.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.INSURL, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image of known orientation, at the specified URL.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/initWithTargetedImageURL:orientation:options: orientation is a [imageio.CGImagePropertyOrientation].
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.INSURL, orientation objectivec.IObject, options foundation.INSDictionary, completionHandler VNRequestCompletionHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
imageURL: The URL of the targeted image.
orientation: The orientation of the image buffer, based on EXIF specification and superseding other orientation information. The value must be an integer from `1` to `8`; see [kCGImagePropertyOrientation] for details. // [kCGImagePropertyOrientation]: https://developer.apple.com/documentation/ImageIO/kCGImagePropertyOrientation
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
See: https://developer.apple.com/documentation/Vision/VNTargetedImageRequest/init(targetedImageURL:orientation:options:completionHandler:) orientation is a [imageio.CGImagePropertyOrientation].
func NewVNTranslationalImageRegistrationRequest ¶
func NewVNTranslationalImageRegistrationRequest() VNTranslationalImageRegistrationRequest
NewVNTranslationalImageRegistrationRequest creates a new VNTranslationalImageRegistrationRequest instance.
func VNTranslationalImageRegistrationRequestFromID ¶
func VNTranslationalImageRegistrationRequestFromID(id objc.ID) VNTranslationalImageRegistrationRequest
VNTranslationalImageRegistrationRequestFromID constructs a VNTranslationalImageRegistrationRequest from an objc.ID.
An image-analysis request that determines the affine transform necessary to align the content of two images.
func (VNTranslationalImageRegistrationRequest) Autorelease ¶
func (t VNTranslationalImageRegistrationRequest) Autorelease() VNTranslationalImageRegistrationRequest
Autorelease adds the receiver to the current autorelease pool.
type VNTranslationalImageRegistrationRequestClass ¶
type VNTranslationalImageRegistrationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNTranslationalImageRegistrationRequestClass ¶
func GetVNTranslationalImageRegistrationRequestClass() VNTranslationalImageRegistrationRequestClass
GetVNTranslationalImageRegistrationRequestClass returns the class object for VNTranslationalImageRegistrationRequest.
func (VNTranslationalImageRegistrationRequestClass) Alloc ¶
func (vc VNTranslationalImageRegistrationRequestClass) Alloc() VNTranslationalImageRegistrationRequest
Alloc allocates memory for a new instance of the class.
type VNVector ¶
type VNVector struct {
objectivec.Object
}
An immutable 2D vector represented by its x-axis and y-axis projections.
Creating a Vector ¶
- VNVector.InitWithRTheta: Creates a new vector in polar coordinate space.
- VNVector.InitWithVectorHeadTail: Creates a new vector in Cartesian coordinate space.
- VNVector.InitWithXComponentYComponent: Creates a new vector in Cartesian coordinate space, based on its x-axis and y-axis projections.
Inspecting a Vector ¶
- VNVector.Length: The length, or absolute value, of the vector.
- VNVector.R: The radius, absolute value, or length of the vector.
- VNVector.Theta: The angle between the vector direction and the positive direction of the x-axis.
- VNVector.SquaredLength: The squared length of the vector.
- VNVector.X: A signed projection that indicates the vector’s direction on the x-axis.
- VNVector.Y: A signed projection that indicates the vector’s direction on the y-axis.
See: https://developer.apple.com/documentation/Vision/VNVector
func NewVectorByAddingVectorToVector ¶
Creates a new vector by adding the specified vectors.
v1: The first vector.
v2: The second vector.
See: https://developer.apple.com/documentation/Vision/VNVector/init(byAdding:to:)
func NewVectorByMultiplyingVectorByScalar ¶
Creates a new vector by multiplying the specified vector’s x-axis and y-axis projections by the scalar value.
vector: The vector.
scalar: The scalar value by which to multiply the x-axis and y-axis projections.
See: https://developer.apple.com/documentation/Vision/VNVector/init(byMultiplying:byScalar:)
func NewVectorBySubtractingVectorFromVector ¶
Creates a new vector by subtracting the first vector from the second vector.
v1: The first vector.
v2: The second vector.
See: https://developer.apple.com/documentation/Vision/VNVector/init(bySubtracting:from:)
func NewVectorWithRTheta ¶
Creates a new vector in polar coordinate space.
r: The length of the vector.
theta: The angle that the vector forms with the positive direction of the x-axis.
See: https://developer.apple.com/documentation/Vision/VNVector/init(r:theta:)
func NewVectorWithVectorHeadTail ¶
Creates a new vector in Cartesian coordinate space.
head: The vector’s head point.
tail: The vector’s tail point.
See: https://developer.apple.com/documentation/Vision/VNVector/init(vectorHead:tail:)
func NewVectorWithXComponentYComponent ¶
Creates a new vector in Cartesian coordinate space, based on its x-axis and y-axis projections.
x: The x-component.
y: The y-component.
See: https://developer.apple.com/documentation/Vision/VNVector/init(xComponent:yComponent:)
func VNVectorFromID ¶
VNVectorFromID constructs a VNVector from an objc.ID.
An immutable 2D vector represented by its x-axis and y-axis projections.
func (VNVector) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (VNVector) EncodeWithCoder ¶
func (v VNVector) EncodeWithCoder(coder foundation.INSCoder)
func (VNVector) InitWithRTheta ¶
Creates a new vector in polar coordinate space.
r: The length of the vector.
theta: The angle that the vector forms with the positive direction of the x-axis.
See: https://developer.apple.com/documentation/Vision/VNVector/init(r:theta:)
func (VNVector) InitWithVectorHeadTail ¶
Creates a new vector in Cartesian coordinate space.
head: The vector’s head point.
tail: The vector’s tail point.
See: https://developer.apple.com/documentation/Vision/VNVector/init(vectorHead:tail:)
func (VNVector) InitWithXComponentYComponent ¶
Creates a new vector in Cartesian coordinate space, based on its x-axis and y-axis projections.
x: The x-component.
y: The y-component.
See: https://developer.apple.com/documentation/Vision/VNVector/init(xComponent:yComponent:)
func (VNVector) Length ¶
The length, or absolute value, of the vector.
See: https://developer.apple.com/documentation/Vision/VNVector/length
func (VNVector) R ¶
The radius, absolute value, or length of the vector.
See: https://developer.apple.com/documentation/Vision/VNVector/r
func (VNVector) SquaredLength ¶
The squared length of the vector.
See: https://developer.apple.com/documentation/Vision/VNVector/squaredLength
func (VNVector) Theta ¶
The angle between the vector direction and the positive direction of the x-axis.
See: https://developer.apple.com/documentation/Vision/VNVector/theta
func (VNVector) X ¶
A signed projection that indicates the vector’s direction on the x-axis.
See: https://developer.apple.com/documentation/Vision/VNVector/x
func (VNVector) Y ¶
A signed projection that indicates the vector’s direction on the y-axis.
See: https://developer.apple.com/documentation/Vision/VNVector/y
type VNVectorClass ¶
type VNVectorClass struct {
// contains filtered or unexported fields
}
func GetVNVectorClass ¶
func GetVNVectorClass() VNVectorClass
GetVNVectorClass returns the class object for VNVector.
func (VNVectorClass) Alloc ¶
func (vc VNVectorClass) Alloc() VNVector
Alloc allocates memory for a new instance of the class.
func (VNVectorClass) DotProductOfVectorVector ¶
func (_VNVectorClass VNVectorClass) DotProductOfVectorVector(v1 IVNVector, v2 IVNVector) float64
Caclulates the dot product of two vectors.
v1: The first vector.
v2: The second vector.
Return Value ¶
The dot product value.
See: https://developer.apple.com/documentation/Vision/VNVector/dotProduct(of:vector:)
func (VNVectorClass) UnitVectorForVector ¶
func (_VNVectorClass VNVectorClass) UnitVectorForVector(vector IVNVector) VNVector
Calculates a vector that’s normalized by preserving its direction, so that the vector length equals 1.0.
vector: The vector whose unit vector you want to calculate.
Return Value ¶
The unit vector.
See: https://developer.apple.com/documentation/Vision/VNVector/unitVector(for:)
func (VNVectorClass) ZeroVector ¶
func (_VNVectorClass VNVectorClass) ZeroVector() VNVector
A vector object with zero length.
See: https://developer.apple.com/documentation/Vision/VNVector/zero
type VNVideoProcessor ¶
type VNVideoProcessor struct {
objectivec.Object
}
An object that performs offline analysis of video content.
Creating a Video Processor ¶
- VNVideoProcessor.InitWithURL: Creates a video processor to perform Vision requests against the specified video asset.
Performing Requests ¶
- VNVideoProcessor.AddRequestProcessingOptionsError: Adds a request with processing options to the video processor.
- VNVideoProcessor.RemoveRequestError: Removes a Vision request from the video processor’s request queue.
- VNVideoProcessor.AnalyzeTimeRangeError: Analyzes a time range of video content.
- VNVideoProcessor.Cancel: Cancels the video processing.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor
func NewVNVideoProcessor ¶
func NewVNVideoProcessor() VNVideoProcessor
NewVNVideoProcessor creates a new VNVideoProcessor instance.
func NewVideoProcessorWithURL ¶
func NewVideoProcessorWithURL(videoURL foundation.INSURL) VNVideoProcessor
Creates a video processor to perform Vision requests against the specified video asset.
videoURL: The video asset URL. The specified asset must be a video format supported by AVFoundation.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/init(url:)
func VNVideoProcessorFromID ¶
func VNVideoProcessorFromID(id objc.ID) VNVideoProcessor
VNVideoProcessorFromID constructs a VNVideoProcessor from an objc.ID.
An object that performs offline analysis of video content.
func (VNVideoProcessor) AddRequestProcessingOptionsError ¶
func (v VNVideoProcessor) AddRequestProcessingOptionsError(request IVNRequest, processingOptions IVNVideoProcessorRequestProcessingOptions) (bool, error)
Adds a request with processing options to the video processor.
request: The Vision request to add.
processingOptions: The processing options to apply.
Discussion ¶
Call this method either before calling [AnalyzeTimeRangeError] or from within the completion handler of an already associated request.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/addRequest(_:processingOptions:)
func (VNVideoProcessor) AnalyzeTimeRangeError ¶
func (v VNVideoProcessor) AnalyzeTimeRangeError(timeRange objectivec.IObject) (bool, error)
Analyzes a time range of video content.
timeRange: The time range to analyze. The value must be within the time range of the video asset.
timeRange is a [coremedia.CMTimeRange].
Discussion ¶
The system executes this method synchronously, so you typically call it from a separate dispatch queue. It returns when the video processor finishes analyzing the time range or if an error prevents processing.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/analyze(_:)
func (VNVideoProcessor) Autorelease ¶
func (v VNVideoProcessor) Autorelease() VNVideoProcessor
Autorelease adds the receiver to the current autorelease pool.
func (VNVideoProcessor) Cancel ¶
func (v VNVideoProcessor) Cancel()
Cancels the video processing.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/cancel()
func (VNVideoProcessor) Init ¶
func (v VNVideoProcessor) Init() VNVideoProcessor
Init initializes the instance.
func (VNVideoProcessor) InitWithURL ¶
func (v VNVideoProcessor) InitWithURL(videoURL foundation.INSURL) VNVideoProcessor
Creates a video processor to perform Vision requests against the specified video asset.
videoURL: The video asset URL. The specified asset must be a video format supported by AVFoundation.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/init(url:)
func (VNVideoProcessor) RemoveRequestError ¶
func (v VNVideoProcessor) RemoveRequestError(request IVNRequest) (bool, error)
Removes a Vision request from the video processor’s request queue.
request: The request to remove.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/removeRequest(_:)
type VNVideoProcessorCadence ¶
type VNVideoProcessorCadence struct {
objectivec.Object
}
An object that defines the cadence at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/Cadence
func NewVNVideoProcessorCadence ¶
func NewVNVideoProcessorCadence() VNVideoProcessorCadence
NewVNVideoProcessorCadence creates a new VNVideoProcessorCadence instance.
func VNVideoProcessorCadenceFromID ¶
func VNVideoProcessorCadenceFromID(id objc.ID) VNVideoProcessorCadence
VNVideoProcessorCadenceFromID constructs a VNVideoProcessorCadence from an objc.ID.
An object that defines the cadence at which to process video.
func (VNVideoProcessorCadence) Autorelease ¶
func (v VNVideoProcessorCadence) Autorelease() VNVideoProcessorCadence
Autorelease adds the receiver to the current autorelease pool.
func (VNVideoProcessorCadence) Cadence ¶
func (v VNVideoProcessorCadence) Cadence() IVNVideoProcessorCadence
The cadence the video processor maintains to process the request.
See: https://developer.apple.com/documentation/vision/vnvideoprocessor/requestprocessingoptions/cadence
func (VNVideoProcessorCadence) Init ¶
func (v VNVideoProcessorCadence) Init() VNVideoProcessorCadence
Init initializes the instance.
func (VNVideoProcessorCadence) SetCadence ¶
func (v VNVideoProcessorCadence) SetCadence(value IVNVideoProcessorCadence)
type VNVideoProcessorCadenceClass ¶
type VNVideoProcessorCadenceClass struct {
// contains filtered or unexported fields
}
func GetVNVideoProcessorCadenceClass ¶
func GetVNVideoProcessorCadenceClass() VNVideoProcessorCadenceClass
GetVNVideoProcessorCadenceClass returns the class object for VNVideoProcessorCadence.
func (VNVideoProcessorCadenceClass) Alloc ¶
func (vc VNVideoProcessorCadenceClass) Alloc() VNVideoProcessorCadence
Alloc allocates memory for a new instance of the class.
type VNVideoProcessorClass ¶
type VNVideoProcessorClass struct {
// contains filtered or unexported fields
}
func GetVNVideoProcessorClass ¶
func GetVNVideoProcessorClass() VNVideoProcessorClass
GetVNVideoProcessorClass returns the class object for VNVideoProcessor.
func (VNVideoProcessorClass) Alloc ¶
func (vc VNVideoProcessorClass) Alloc() VNVideoProcessor
Alloc allocates memory for a new instance of the class.
type VNVideoProcessorFrameRateCadence ¶
type VNVideoProcessorFrameRateCadence struct {
VNVideoProcessorCadence
}
An object that defines a frame-based cadence for processing a video stream.
Creating a Cadence ¶
- VNVideoProcessorFrameRateCadence.InitWithFrameRate: Creates a new frame-based cadence with a frame rate.
Inspecting the Frame Rate ¶
- VNVideoProcessorFrameRateCadence.FrameRate: The frame rate at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/FrameRateCadence
func NewVNVideoProcessorFrameRateCadence ¶
func NewVNVideoProcessorFrameRateCadence() VNVideoProcessorFrameRateCadence
NewVNVideoProcessorFrameRateCadence creates a new VNVideoProcessorFrameRateCadence instance.
func NewVideoProcessorFrameRateCadenceWithFrameRate ¶
func NewVideoProcessorFrameRateCadenceWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadence
Creates a new frame-based cadence with a frame rate.
frameRate: The frame rate at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/FrameRateCadence/init(_:)
func VNVideoProcessorFrameRateCadenceFromID ¶
func VNVideoProcessorFrameRateCadenceFromID(id objc.ID) VNVideoProcessorFrameRateCadence
VNVideoProcessorFrameRateCadenceFromID constructs a VNVideoProcessorFrameRateCadence from an objc.ID.
An object that defines a frame-based cadence for processing a video stream.
func (VNVideoProcessorFrameRateCadence) Autorelease ¶
func (v VNVideoProcessorFrameRateCadence) Autorelease() VNVideoProcessorFrameRateCadence
Autorelease adds the receiver to the current autorelease pool.
func (VNVideoProcessorFrameRateCadence) FrameRate ¶
func (v VNVideoProcessorFrameRateCadence) FrameRate() int
The frame rate at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/FrameRateCadence/frameRate
func (VNVideoProcessorFrameRateCadence) Init ¶
func (v VNVideoProcessorFrameRateCadence) Init() VNVideoProcessorFrameRateCadence
Init initializes the instance.
func (VNVideoProcessorFrameRateCadence) InitWithFrameRate ¶
func (v VNVideoProcessorFrameRateCadence) InitWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadence
Creates a new frame-based cadence with a frame rate.
frameRate: The frame rate at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/FrameRateCadence/init(_:)
type VNVideoProcessorFrameRateCadenceClass ¶
type VNVideoProcessorFrameRateCadenceClass struct {
// contains filtered or unexported fields
}
func GetVNVideoProcessorFrameRateCadenceClass ¶
func GetVNVideoProcessorFrameRateCadenceClass() VNVideoProcessorFrameRateCadenceClass
GetVNVideoProcessorFrameRateCadenceClass returns the class object for VNVideoProcessorFrameRateCadence.
func (VNVideoProcessorFrameRateCadenceClass) Alloc ¶
func (vc VNVideoProcessorFrameRateCadenceClass) Alloc() VNVideoProcessorFrameRateCadence
Alloc allocates memory for a new instance of the class.
type VNVideoProcessorRequestProcessingOptions ¶
type VNVideoProcessorRequestProcessingOptions struct {
objectivec.Object
}
An object that defines a video processor’s configuration options.
Configuring Options ¶
- VNVideoProcessorRequestProcessingOptions.Cadence: The cadence the video processor maintains to process the request.
- VNVideoProcessorRequestProcessingOptions.SetCadence
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/RequestProcessingOptions
func NewVNVideoProcessorRequestProcessingOptions ¶
func NewVNVideoProcessorRequestProcessingOptions() VNVideoProcessorRequestProcessingOptions
NewVNVideoProcessorRequestProcessingOptions creates a new VNVideoProcessorRequestProcessingOptions instance.
func VNVideoProcessorRequestProcessingOptionsFromID ¶
func VNVideoProcessorRequestProcessingOptionsFromID(id objc.ID) VNVideoProcessorRequestProcessingOptions
VNVideoProcessorRequestProcessingOptionsFromID constructs a VNVideoProcessorRequestProcessingOptions from an objc.ID.
An object that defines a video processor’s configuration options.
func (VNVideoProcessorRequestProcessingOptions) Autorelease ¶
func (v VNVideoProcessorRequestProcessingOptions) Autorelease() VNVideoProcessorRequestProcessingOptions
Autorelease adds the receiver to the current autorelease pool.
func (VNVideoProcessorRequestProcessingOptions) Cadence ¶
func (v VNVideoProcessorRequestProcessingOptions) Cadence() IVNVideoProcessorCadence
The cadence the video processor maintains to process the request.
Discussion ¶
By default, the system processes every frame of video if you don’t provide a value for this property.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/RequestProcessingOptions/cadence
func (VNVideoProcessorRequestProcessingOptions) SetCadence ¶
func (v VNVideoProcessorRequestProcessingOptions) SetCadence(value IVNVideoProcessorCadence)
type VNVideoProcessorRequestProcessingOptionsClass ¶
type VNVideoProcessorRequestProcessingOptionsClass struct {
// contains filtered or unexported fields
}
func GetVNVideoProcessorRequestProcessingOptionsClass ¶
func GetVNVideoProcessorRequestProcessingOptionsClass() VNVideoProcessorRequestProcessingOptionsClass
GetVNVideoProcessorRequestProcessingOptionsClass returns the class object for VNVideoProcessorRequestProcessingOptions.
func (VNVideoProcessorRequestProcessingOptionsClass) Alloc ¶
func (vc VNVideoProcessorRequestProcessingOptionsClass) Alloc() VNVideoProcessorRequestProcessingOptions
Alloc allocates memory for a new instance of the class.
type VNVideoProcessorTimeIntervalCadence ¶
type VNVideoProcessorTimeIntervalCadence struct {
VNVideoProcessorCadence
}
An object that defines a time-based cadence for processing a video stream.
Creating a Cadence ¶
- VNVideoProcessorTimeIntervalCadence.InitWithTimeInterval: Creates a new time-based cadence with a time interval.
Inspecting the Time Interval ¶
- VNVideoProcessorTimeIntervalCadence.TimeInterval: The time interval of the cadence.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/TimeIntervalCadence
func NewVNVideoProcessorTimeIntervalCadence ¶
func NewVNVideoProcessorTimeIntervalCadence() VNVideoProcessorTimeIntervalCadence
NewVNVideoProcessorTimeIntervalCadence creates a new VNVideoProcessorTimeIntervalCadence instance.
func NewVideoProcessorTimeIntervalCadenceWithTimeInterval ¶
func NewVideoProcessorTimeIntervalCadenceWithTimeInterval(timeInterval float64) VNVideoProcessorTimeIntervalCadence
Creates a new time-based cadence with a time interval.
timeInterval: The time interval at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/TimeIntervalCadence/init(_:)
func VNVideoProcessorTimeIntervalCadenceFromID ¶
func VNVideoProcessorTimeIntervalCadenceFromID(id objc.ID) VNVideoProcessorTimeIntervalCadence
VNVideoProcessorTimeIntervalCadenceFromID constructs a VNVideoProcessorTimeIntervalCadence from an objc.ID.
An object that defines a time-based cadence for processing a video stream.
func (VNVideoProcessorTimeIntervalCadence) Autorelease ¶
func (v VNVideoProcessorTimeIntervalCadence) Autorelease() VNVideoProcessorTimeIntervalCadence
Autorelease adds the receiver to the current autorelease pool.
func (VNVideoProcessorTimeIntervalCadence) InitWithTimeInterval ¶
func (v VNVideoProcessorTimeIntervalCadence) InitWithTimeInterval(timeInterval float64) VNVideoProcessorTimeIntervalCadence
Creates a new time-based cadence with a time interval.
timeInterval: The time interval at which to process video.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/TimeIntervalCadence/init(_:)
func (VNVideoProcessorTimeIntervalCadence) TimeInterval ¶
func (v VNVideoProcessorTimeIntervalCadence) TimeInterval() float64
The time interval of the cadence.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessor/TimeIntervalCadence/timeInterval
type VNVideoProcessorTimeIntervalCadenceClass ¶
type VNVideoProcessorTimeIntervalCadenceClass struct {
// contains filtered or unexported fields
}
func GetVNVideoProcessorTimeIntervalCadenceClass ¶
func GetVNVideoProcessorTimeIntervalCadenceClass() VNVideoProcessorTimeIntervalCadenceClass
GetVNVideoProcessorTimeIntervalCadenceClass returns the class object for VNVideoProcessorTimeIntervalCadence.
func (VNVideoProcessorTimeIntervalCadenceClass) Alloc ¶
func (vc VNVideoProcessorTimeIntervalCadenceClass) Alloc() VNVideoProcessorTimeIntervalCadence
Alloc allocates memory for a new instance of the class.
Source Files
¶
- blocks.gen.go
- doc.gen.go
- enums.gen.go
- face_observation_accepting_protocol.gen.go
- functions.gen.go
- generate.go
- global_vars.gen.go
- request_progress_providing_protocol.gen.go
- request_revision_providing_protocol.gen.go
- typedefs.gen.go
- types.gen.go
- undefined_types.gen.go
- vn_animal_body_pose_observation.gen.go
- vn_barcode_observation.gen.go
- vn_calculate_image_aesthetics_scores_request.gen.go
- vn_circle.gen.go
- vn_classification_observation.gen.go
- vn_classify_image_request.gen.go
- vn_contour.gen.go
- vn_contours_observation.gen.go
- vn_core_ml_feature_value_observation.gen.go
- vn_core_ml_model.gen.go
- vn_core_ml_request.gen.go
- vn_detect_animal_body_pose_request.gen.go
- vn_detect_barcodes_request.gen.go
- vn_detect_contours_request.gen.go
- vn_detect_document_segmentation_request.gen.go
- vn_detect_face_capture_quality_request.gen.go
- vn_detect_face_landmarks_request.gen.go
- vn_detect_face_rectangles_request.gen.go
- vn_detect_horizon_request.gen.go
- vn_detect_human_body_pose3_d_request.gen.go
- vn_detect_human_body_pose_request.gen.go
- vn_detect_human_hand_pose_request.gen.go
- vn_detect_human_rectangles_request.gen.go
- vn_detect_rectangles_request.gen.go
- vn_detect_text_rectangles_request.gen.go
- vn_detect_trajectories_request.gen.go
- vn_detected_object_observation.gen.go
- vn_detected_point.gen.go
- vn_face_landmark_region.gen.go
- vn_face_landmark_region2_d.gen.go
- vn_face_landmarks.gen.go
- vn_face_landmarks2_d.gen.go
- vn_face_observation.gen.go
- vn_feature_print_observation.gen.go
- vn_generate_attention_based_saliency_image_request.gen.go
- vn_generate_foreground_instance_mask_request.gen.go
- vn_generate_image_feature_print_request.gen.go
- vn_generate_objectness_based_saliency_image_request.gen.go
- vn_generate_optical_flow_request.gen.go
- vn_generate_person_instance_mask_request.gen.go
- vn_generate_person_segmentation_request.gen.go
- vn_geometry_utils.gen.go
- vn_homographic_image_registration_request.gen.go
- vn_horizon_observation.gen.go
- vn_human_body_pose3_d_observation.gen.go
- vn_human_body_pose_observation.gen.go
- vn_human_body_recognized_point3_d.gen.go
- vn_human_hand_pose_observation.gen.go
- vn_human_observation.gen.go
- vn_image_aesthetics_scores_observation.gen.go
- vn_image_alignment_observation.gen.go
- vn_image_based_request.gen.go
- vn_image_homographic_alignment_observation.gen.go
- vn_image_registration_request.gen.go
- vn_image_request_handler.gen.go
- vn_image_translation_alignment_observation.gen.go
- vn_instance_mask_observation.gen.go
- vn_observation.gen.go
- vn_pixel_buffer_observation.gen.go
- vn_point.gen.go
- vn_point3_d.gen.go
- vn_recognize_animals_request.gen.go
- vn_recognize_text_request.gen.go
- vn_recognized_object_observation.gen.go
- vn_recognized_point.gen.go
- vn_recognized_point3_d.gen.go
- vn_recognized_points3_d_observation.gen.go
- vn_recognized_points_observation.gen.go
- vn_recognized_text.gen.go
- vn_recognized_text_observation.gen.go
- vn_rectangle_observation.gen.go
- vn_request.gen.go
- vn_saliency_image_observation.gen.go
- vn_sequence_request_handler.gen.go
- vn_stateful_request.gen.go
- vn_targeted_image_request.gen.go
- vn_text_observation.gen.go
- vn_track_homographic_image_registration_request.gen.go
- vn_track_object_request.gen.go
- vn_track_optical_flow_request.gen.go
- vn_track_rectangle_request.gen.go
- vn_track_translational_image_registration_request.gen.go
- vn_tracking_request.gen.go
- vn_trajectory_observation.gen.go
- vn_translational_image_registration_request.gen.go
- vn_vector.gen.go
- vn_video_processor.gen.go
- vn_video_processor_cadence.gen.go
- vn_video_processor_frame_rate_cadence.gen.go
- vn_video_processor_request_processing_options.gen.go
- vn_video_processor_time_interval_cadence.gen.go