Documentation
¶
Overview ¶
Package vision provides Go bindings for the Vision framework.
Analyze image and video content in your app using computer vision algorithms for object detection, text recognition, and image segmentation.
The Vision framework provides pretrained machine learning models for computer vision tasks. Use Vision to analyze still images and video for a variety of purposes, including:
Pose analysis ¶
- Supporting Pose Types: Types you use when working with pose analysis. ([Chirality])
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.
- VNBarcodeObservation - An object that represents barcode information that an image analysis request detects.
- VNFaceLandmarks2D - A collection of facial features that a request detects.
- VNVector - An immutable 2D vector represented by its x-axis and y-axis projections.
- VNImageRequestHandler - An object that processes one or more image-analysis request pertaining to a single image.
- VNRecognizeTextRequest - An image-analysis request that finds and recognizes text in an image.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func BindFunc(fptr any, name string) (err error)
- func NewVNRequestCompletionHandlerBlock(handler VNRequestCompletionHandler) (objc.ID, func())
- func NewVNRequestErrorBlock(handler VNRequestErrorHandler) (objc.ID, func())
- func NewVNRequestFloat64ErrorBlock(handler VNRequestFloat64ErrorHandler) (objc.ID, func())
- func NewVNRequestProgressHandlerBlock(handler VNRequestProgressHandler) (objc.ID, func())
- func SymbolAddress(name string) (uintptr, error)
- func TryVNElementTypeSize(elementType VNElementType) (uint, error)
- func TryVNImagePointForFaceLandmarkPoint(faceLandmarkPoint [2]float32, faceBoundingBox corefoundation.CGRect, ...) (corefoundation.CGPoint, error)
- func TryVNImagePointForNormalizedPoint(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, ...) (corefoundation.CGPoint, error)
- func TryVNImagePointForNormalizedPointUsingRegionOfInterest(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, ...) (corefoundation.CGPoint, error)
- func TryVNImageRectForNormalizedRect(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGRect, error)
- func TryVNImageRectForNormalizedRectUsingRegionOfInterest(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, ...) (corefoundation.CGRect, error)
- func TryVNNormalizedFaceBoundingBoxPointForLandmarkPoint(faceLandmarkPoint [2]float32, faceBoundingBox corefoundation.CGRect, ...) (corefoundation.CGPoint, error)
- func TryVNNormalizedPointForImagePoint(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGPoint, error)
- func TryVNNormalizedPointForImagePointUsingRegionOfInterest(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr, ...) (corefoundation.CGPoint, error)
- func TryVNNormalizedRectForImageRect(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGRect, error)
- func TryVNNormalizedRectForImageRectUsingRegionOfInterest(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, ...) (corefoundation.CGRect, error)
- func TryVNNormalizedRectIsIdentityRect(normalizedRect corefoundation.CGRect) (bool, error)
- func VNElementTypeSize(elementType VNElementType) uint
- func VNImagePointForFaceLandmarkPoint(faceLandmarkPoint [2]float32, 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 [2]float32, 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 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 NewAnimalBodyPoseObservation() VNAnimalBodyPoseObservationdeprecated
- func NewAnimalBodyPoseObservationWithCoder(coder foundation.INSCoder) VNAnimalBodyPoseObservationdeprecated
- func NewVNAnimalBodyPoseObservation() VNAnimalBodyPoseObservation
- func NewVNAnimalBodyPoseObservationWithCoder(coder foundation.INSCoder) VNAnimalBodyPoseObservation
- func VNAnimalBodyPoseObservationFromID(id objc.ID) 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 NewBarcodeObservation() VNBarcodeObservationdeprecated
- func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNBarcodeObservationdeprecated
- func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNBarcodeObservationdeprecated
- func NewBarcodeObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNBarcodeObservationdeprecated
- func NewBarcodeObservationWithCoder(coder foundation.INSCoder) VNBarcodeObservationdeprecated
- func NewBarcodeObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNBarcodeObservationdeprecated
- func NewVNBarcodeObservation() VNBarcodeObservation
- func NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNBarcodeObservation
- func NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNBarcodeObservation
- func NewVNBarcodeObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNBarcodeObservation
- func NewVNBarcodeObservationWithCoder(coder foundation.INSCoder) VNBarcodeObservation
- func NewVNBarcodeObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) 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.NSData
- func (b VNBarcodeObservation) PayloadStringValue() string
- func (b VNBarcodeObservation) SupplementalCompositeType() VNBarcodeCompositeType
- func (b VNBarcodeObservation) SupplementalPayloadData() foundation.NSData
- func (b VNBarcodeObservation) SupplementalPayloadString() string
- func (b VNBarcodeObservation) Symbology() VNBarcodeSymbology
- type VNBarcodeObservationClass
- type VNBarcodeSymbology
- type VNCalculateImageAestheticsScoresRequest
- func NewCalculateImageAestheticsScoresRequest() VNCalculateImageAestheticsScoresRequestdeprecated
- func NewCalculateImageAestheticsScoresRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNCalculateImageAestheticsScoresRequestdeprecated
- func NewVNCalculateImageAestheticsScoresRequest() VNCalculateImageAestheticsScoresRequest
- func NewVNCalculateImageAestheticsScoresRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNCalculateImageAestheticsScoresRequest
- func VNCalculateImageAestheticsScoresRequestFromID(id objc.ID) VNCalculateImageAestheticsScoresRequest
- type VNCalculateImageAestheticsScoresRequestClass
- type VNChirality
- type VNCircle
- func NewCircle() VNCircledeprecated
- func NewCircleWithCenterDiameter(center IVNPoint, diameter float64) VNCircledeprecated
- func NewCircleWithCenterRadius(center IVNPoint, radius float64) VNCircledeprecated
- func NewCircleWithCoder(coder foundation.INSCoder) VNCircledeprecated
- func NewVNCircle() VNCircle
- func NewVNCircleWithCenterDiameter(center IVNPoint, diameter float64) VNCircle
- func NewVNCircleWithCenterRadius(center IVNPoint, radius float64) VNCircle
- func NewVNCircleWithCoder(coder foundation.INSCoder) VNCircle
- func VNCircleFromID(id objc.ID) 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) InitWithCoder(coder foundation.INSCoder) VNCircle
- func (c VNCircle) Radius() float64
- type VNCircleClass
- type VNClassificationObservation
- func NewClassificationObservation() VNClassificationObservationdeprecated
- func NewClassificationObservationWithCoder(coder foundation.INSCoder) VNClassificationObservationdeprecated
- func NewVNClassificationObservation() VNClassificationObservation
- func NewVNClassificationObservationWithCoder(coder foundation.INSCoder) VNClassificationObservation
- func VNClassificationObservationFromID(id objc.ID) 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
- type VNClassificationObservationClass
- type VNClassifyImageRequest
- func NewClassifyImageRequest() VNClassifyImageRequestdeprecated
- func NewClassifyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNClassifyImageRequestdeprecated
- func NewVNClassifyImageRequest() VNClassifyImageRequest
- func NewVNClassifyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNClassifyImageRequest
- func VNClassifyImageRequestFromID(id objc.ID) 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) IndexPath() foundation.NSIndexPath
- func (c VNContour) Init() VNContour
- func (c VNContour) NormalizedPath() coregraphics.CGPathRef
- func (c VNContour) NormalizedPoints() unsafe.Pointer
- func (c VNContour) PointCount() int
- func (c VNContour) PolygonApproximationWithEpsilonError(epsilon float32) (IVNContour, error)
- func (c VNContour) RequestRevision() uint
- type VNContourClass
- type VNContoursObservation
- func NewContoursObservation() VNContoursObservationdeprecated
- func NewContoursObservationWithCoder(coder foundation.INSCoder) VNContoursObservationdeprecated
- func NewVNContoursObservation() VNContoursObservation
- func NewVNContoursObservationWithCoder(coder foundation.INSCoder) VNContoursObservation
- func VNContoursObservationFromID(id objc.ID) VNContoursObservation
- func (c VNContoursObservation) Autorelease() VNContoursObservation
- func (c VNContoursObservation) ContourAtIndexError(contourIndex int) (IVNContour, error)
- func (c VNContoursObservation) ContourAtIndexPathError(indexPath foundation.NSIndexPath) (IVNContour, error)
- func (c VNContoursObservation) ContourCount() int
- func (c VNContoursObservation) Init() VNContoursObservation
- func (c VNContoursObservation) NormalizedPath() coregraphics.CGPathRef
- func (c VNContoursObservation) TopLevelContourCount() int
- func (c VNContoursObservation) TopLevelContours() []VNContour
- type VNContoursObservationClass
- type VNCoreMLFeatureValueObservation
- func NewCoreMLFeatureValueObservation() VNCoreMLFeatureValueObservationdeprecated
- func NewCoreMLFeatureValueObservationWithCoder(coder foundation.INSCoder) VNCoreMLFeatureValueObservationdeprecated
- func NewVNCoreMLFeatureValueObservation() VNCoreMLFeatureValueObservation
- func NewVNCoreMLFeatureValueObservationWithCoder(coder foundation.INSCoder) VNCoreMLFeatureValueObservation
- func VNCoreMLFeatureValueObservationFromID(id objc.ID) VNCoreMLFeatureValueObservation
- func (c VNCoreMLFeatureValueObservation) Autorelease() VNCoreMLFeatureValueObservation
- func (c VNCoreMLFeatureValueObservation) FeatureName() string
- func (c VNCoreMLFeatureValueObservation) FeatureValue() coreml.MLFeatureValue
- func (c VNCoreMLFeatureValueObservation) Init() VNCoreMLFeatureValueObservation
- type VNCoreMLFeatureValueObservationClass
- type VNCoreMLModel
- func NewCoreMLModel() VNCoreMLModeldeprecated
- func NewCoreMLModelForMLModelError(model *coreml.MLModel) (VNCoreMLModel, error)deprecated
- func NewVNCoreMLModel() VNCoreMLModel
- func NewVNCoreMLModelForMLModelError(model *coreml.MLModel) (VNCoreMLModel, error)
- func VNCoreMLModelFromID(id objc.ID) 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) SetFeatureProvider(value coreml.MLFeatureProvider)
- func (c VNCoreMLModel) SetInputImageFeatureName(value string)
- type VNCoreMLModelClass
- type VNCoreMLRequest
- func NewCoreMLRequest() VNCoreMLRequestdeprecated
- func NewCoreMLRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNCoreMLRequestdeprecated
- func NewCoreMLRequestWithModel(model IVNCoreMLModel) VNCoreMLRequestdeprecated
- func NewCoreMLRequestWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestErrorHandler) VNCoreMLRequestdeprecated
- func NewVNCoreMLRequest() VNCoreMLRequest
- func NewVNCoreMLRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNCoreMLRequest
- func NewVNCoreMLRequestWithModel(model IVNCoreMLModel) VNCoreMLRequest
- func NewVNCoreMLRequestWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestErrorHandler) VNCoreMLRequest
- func VNCoreMLRequestFromID(id objc.ID) VNCoreMLRequest
- func (c VNCoreMLRequest) Autorelease() VNCoreMLRequest
- func (c VNCoreMLRequest) ImageCropAndScaleOption() VNImageCropAndScaleOption
- func (c VNCoreMLRequest) Init() VNCoreMLRequest
- func (c VNCoreMLRequest) InitWithModel(model IVNCoreMLModel) VNCoreMLRequest
- func (c VNCoreMLRequest) InitWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestErrorHandler) VNCoreMLRequest
- func (c VNCoreMLRequest) InitWithModelSync(ctx context.Context, model IVNCoreMLModel) (*VNRequest, error)
- func (c VNCoreMLRequest) Model() IVNCoreMLModel
- func (c VNCoreMLRequest) SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
- type VNCoreMLRequestClass
- type VNDegrees
- type VNDetectAnimalBodyPoseRequest
- func NewDetectAnimalBodyPoseRequest() VNDetectAnimalBodyPoseRequestdeprecated
- func NewDetectAnimalBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectAnimalBodyPoseRequestdeprecated
- func NewVNDetectAnimalBodyPoseRequest() VNDetectAnimalBodyPoseRequest
- func NewVNDetectAnimalBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectAnimalBodyPoseRequest
- func VNDetectAnimalBodyPoseRequestFromID(id objc.ID) VNDetectAnimalBodyPoseRequest
- func (d VNDetectAnimalBodyPoseRequest) Autorelease() VNDetectAnimalBodyPoseRequest
- func (d VNDetectAnimalBodyPoseRequest) Init() VNDetectAnimalBodyPoseRequest
- func (d VNDetectAnimalBodyPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectAnimalBodyPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- type VNDetectAnimalBodyPoseRequestClass
- type VNDetectBarcodesRequest
- func NewDetectBarcodesRequest() VNDetectBarcodesRequestdeprecated
- func NewDetectBarcodesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectBarcodesRequestdeprecated
- func NewVNDetectBarcodesRequest() VNDetectBarcodesRequest
- func NewVNDetectBarcodesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectBarcodesRequest
- func VNDetectBarcodesRequestFromID(id objc.ID) 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
- type VNDetectBarcodesRequestClass
- type VNDetectContoursRequest
- func NewDetectContoursRequest() VNDetectContoursRequestdeprecated
- func NewDetectContoursRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectContoursRequestdeprecated
- func NewVNDetectContoursRequest() VNDetectContoursRequest
- func NewVNDetectContoursRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectContoursRequest
- func VNDetectContoursRequestFromID(id objc.ID) VNDetectContoursRequest
- func (d VNDetectContoursRequest) Autorelease() VNDetectContoursRequest
- func (d VNDetectContoursRequest) ContrastAdjustment() float32
- func (d VNDetectContoursRequest) ContrastPivot() foundation.NSNumber
- func (d VNDetectContoursRequest) DetectDarkOnLight() bool
- 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) SetDetectDarkOnLight(value bool)
- func (d VNDetectContoursRequest) SetDetectsDarkOnLight(value bool)
- func (d VNDetectContoursRequest) SetMaximumImageDimension(value uint)
- type VNDetectContoursRequestClass
- type VNDetectDocumentSegmentationRequest
- func NewDetectDocumentSegmentationRequest() VNDetectDocumentSegmentationRequestdeprecated
- func NewDetectDocumentSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectDocumentSegmentationRequestdeprecated
- func NewVNDetectDocumentSegmentationRequest() VNDetectDocumentSegmentationRequest
- func NewVNDetectDocumentSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectDocumentSegmentationRequest
- func VNDetectDocumentSegmentationRequestFromID(id objc.ID) VNDetectDocumentSegmentationRequest
- type VNDetectDocumentSegmentationRequestClass
- type VNDetectFaceCaptureQualityRequest
- func NewDetectFaceCaptureQualityRequest() VNDetectFaceCaptureQualityRequestdeprecated
- func NewDetectFaceCaptureQualityRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceCaptureQualityRequestdeprecated
- func NewVNDetectFaceCaptureQualityRequest() VNDetectFaceCaptureQualityRequest
- func NewVNDetectFaceCaptureQualityRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceCaptureQualityRequest
- func VNDetectFaceCaptureQualityRequestFromID(id objc.ID) VNDetectFaceCaptureQualityRequest
- func (d VNDetectFaceCaptureQualityRequest) Autorelease() VNDetectFaceCaptureQualityRequest
- func (d VNDetectFaceCaptureQualityRequest) Init() VNDetectFaceCaptureQualityRequest
- func (d VNDetectFaceCaptureQualityRequest) InputFaceObservations() []VNFaceObservation
- func (o VNDetectFaceCaptureQualityRequest) SetInputFaceObservations(value []VNFaceObservation)
- type VNDetectFaceCaptureQualityRequestClass
- type VNDetectFaceLandmarksRequest
- func NewDetectFaceLandmarksRequest() VNDetectFaceLandmarksRequestdeprecated
- func NewDetectFaceLandmarksRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceLandmarksRequestdeprecated
- func NewVNDetectFaceLandmarksRequest() VNDetectFaceLandmarksRequest
- func NewVNDetectFaceLandmarksRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceLandmarksRequest
- func VNDetectFaceLandmarksRequestFromID(id objc.ID) VNDetectFaceLandmarksRequest
- func (d VNDetectFaceLandmarksRequest) Autorelease() VNDetectFaceLandmarksRequest
- func (d VNDetectFaceLandmarksRequest) Constellation() VNRequestFaceLandmarksConstellation
- func (d VNDetectFaceLandmarksRequest) Init() VNDetectFaceLandmarksRequest
- func (d VNDetectFaceLandmarksRequest) InputFaceObservations() []VNFaceObservation
- func (d VNDetectFaceLandmarksRequest) SetConstellation(value VNRequestFaceLandmarksConstellation)
- func (o VNDetectFaceLandmarksRequest) SetInputFaceObservations(value []VNFaceObservation)
- type VNDetectFaceLandmarksRequestClass
- func (vc VNDetectFaceLandmarksRequestClass) Alloc() VNDetectFaceLandmarksRequest
- func (vc VNDetectFaceLandmarksRequestClass) Class() objc.Class
- func (_VNDetectFaceLandmarksRequestClass VNDetectFaceLandmarksRequestClass) RevisionSupportsConstellation(requestRevision uint, constellation VNRequestFaceLandmarksConstellation) bool
- type VNDetectFaceRectanglesRequest
- func NewDetectFaceRectanglesRequest() VNDetectFaceRectanglesRequestdeprecated
- func NewDetectFaceRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceRectanglesRequestdeprecated
- func NewVNDetectFaceRectanglesRequest() VNDetectFaceRectanglesRequest
- func NewVNDetectFaceRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceRectanglesRequest
- func VNDetectFaceRectanglesRequestFromID(id objc.ID) VNDetectFaceRectanglesRequest
- type VNDetectFaceRectanglesRequestClass
- type VNDetectHorizonRequest
- func NewDetectHorizonRequest() VNDetectHorizonRequestdeprecated
- func NewDetectHorizonRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHorizonRequestdeprecated
- func NewVNDetectHorizonRequest() VNDetectHorizonRequest
- func NewVNDetectHorizonRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHorizonRequest
- func VNDetectHorizonRequestFromID(id objc.ID) VNDetectHorizonRequest
- type VNDetectHorizonRequestClass
- type VNDetectHumanBodyPose3DRequest
- func NewDetectHumanBodyPose3DRequest() VNDetectHumanBodyPose3DRequestdeprecated
- func NewDetectHumanBodyPose3DRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequestdeprecated
- func NewDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequestdeprecated
- func NewVNDetectHumanBodyPose3DRequest() VNDetectHumanBodyPose3DRequest
- func NewVNDetectHumanBodyPose3DRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequest
- func NewVNDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequest
- func VNDetectHumanBodyPose3DRequestFromID(id objc.ID) VNDetectHumanBodyPose3DRequest
- func (d VNDetectHumanBodyPose3DRequest) Autorelease() VNDetectHumanBodyPose3DRequest
- func (d VNDetectHumanBodyPose3DRequest) Init() VNDetectHumanBodyPose3DRequest
- func (d VNDetectHumanBodyPose3DRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanBodyPose3DRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- type VNDetectHumanBodyPose3DRequestClass
- type VNDetectHumanBodyPoseRequest
- func NewDetectHumanBodyPoseRequest() VNDetectHumanBodyPoseRequestdeprecated
- func NewDetectHumanBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPoseRequestdeprecated
- func NewVNDetectHumanBodyPoseRequest() VNDetectHumanBodyPoseRequest
- func NewVNDetectHumanBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPoseRequest
- func VNDetectHumanBodyPoseRequestFromID(id objc.ID) VNDetectHumanBodyPoseRequest
- func (d VNDetectHumanBodyPoseRequest) Autorelease() VNDetectHumanBodyPoseRequest
- func (d VNDetectHumanBodyPoseRequest) Init() VNDetectHumanBodyPoseRequest
- func (d VNDetectHumanBodyPoseRequest) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanBodyPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- type VNDetectHumanBodyPoseRequestClass
- type VNDetectHumanHandPoseRequest
- func NewDetectHumanHandPoseRequest() VNDetectHumanHandPoseRequestdeprecated
- func NewDetectHumanHandPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanHandPoseRequestdeprecated
- func NewVNDetectHumanHandPoseRequest() VNDetectHumanHandPoseRequest
- func NewVNDetectHumanHandPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanHandPoseRequest
- func VNDetectHumanHandPoseRequestFromID(id objc.ID) 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) SupportedJointNamesAndReturnError() ([]string, error)
- func (d VNDetectHumanHandPoseRequest) SupportedJointsGroupNamesAndReturnError() ([]string, error)
- type VNDetectHumanHandPoseRequestClass
- type VNDetectHumanRectanglesRequest
- func NewDetectHumanRectanglesRequest() VNDetectHumanRectanglesRequestdeprecated
- func NewDetectHumanRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanRectanglesRequestdeprecated
- func NewVNDetectHumanRectanglesRequest() VNDetectHumanRectanglesRequest
- func NewVNDetectHumanRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanRectanglesRequest
- func VNDetectHumanRectanglesRequestFromID(id objc.ID) VNDetectHumanRectanglesRequest
- type VNDetectHumanRectanglesRequestClass
- type VNDetectRectanglesRequest
- func NewDetectRectanglesRequest() VNDetectRectanglesRequestdeprecated
- func NewDetectRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectRectanglesRequestdeprecated
- func NewVNDetectRectanglesRequest() VNDetectRectanglesRequest
- func NewVNDetectRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectRectanglesRequest
- func VNDetectRectanglesRequestFromID(id objc.ID) 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)
- type VNDetectRectanglesRequestClass
- type VNDetectTextRectanglesRequest
- func NewDetectTextRectanglesRequest() VNDetectTextRectanglesRequestdeprecated
- func NewDetectTextRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectTextRectanglesRequestdeprecated
- func NewVNDetectTextRectanglesRequest() VNDetectTextRectanglesRequest
- func NewVNDetectTextRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectTextRectanglesRequest
- func VNDetectTextRectanglesRequestFromID(id objc.ID) VNDetectTextRectanglesRequest
- func (d VNDetectTextRectanglesRequest) Autorelease() VNDetectTextRectanglesRequest
- func (d VNDetectTextRectanglesRequest) Init() VNDetectTextRectanglesRequest
- func (d VNDetectTextRectanglesRequest) ReportCharacterBoxes() bool
- func (d VNDetectTextRectanglesRequest) SetReportCharacterBoxes(value bool)
- type VNDetectTextRectanglesRequestClass
- type VNDetectTrajectoriesRequest
- func NewDetectTrajectoriesRequest() VNDetectTrajectoriesRequestdeprecated
- func NewDetectTrajectoriesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequestdeprecated
- func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequestdeprecated
- func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, ...) VNDetectTrajectoriesRequestdeprecated
- func NewVNDetectTrajectoriesRequest() VNDetectTrajectoriesRequest
- func NewVNDetectTrajectoriesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequest
- func NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequest
- func NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, ...) VNDetectTrajectoriesRequest
- func VNDetectTrajectoriesRequestFromID(id objc.ID) VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) Autorelease() VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) Init() VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLength(ctx context.Context, frameAnalysisSpacing coremedia.CMTime, ...) (*VNRequest, error)
- func (d VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, ...) VNDetectTrajectoriesRequest
- func (d VNDetectTrajectoriesRequest) MaximumObjectSize() float32
- func (d VNDetectTrajectoriesRequest) MinimumObjectSize() float32
- func (d VNDetectTrajectoriesRequest) ObjectMaximumNormalizedRadius() float32
- func (d VNDetectTrajectoriesRequest) ObjectMinimumNormalizedRadius() float32
- func (d VNDetectTrajectoriesRequest) SetMaximumObjectSize(value float32)
- func (d VNDetectTrajectoriesRequest) SetMinimumObjectSize(value float32)
- func (d VNDetectTrajectoriesRequest) SetObjectMaximumNormalizedRadius(value float32)
- func (d VNDetectTrajectoriesRequest) SetObjectMinimumNormalizedRadius(value float32)
- func (d VNDetectTrajectoriesRequest) SetTargetFrameTime(value coremedia.CMTime)
- func (d VNDetectTrajectoriesRequest) TargetFrameTime() coremedia.CMTime
- func (d VNDetectTrajectoriesRequest) TrajectoryLength() int
- type VNDetectTrajectoriesRequestClass
- type VNDetectedObjectObservation
- func NewDetectedObjectObservation() VNDetectedObjectObservationdeprecated
- func NewDetectedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNDetectedObjectObservationdeprecated
- func NewDetectedObjectObservationWithCoder(coder foundation.INSCoder) VNDetectedObjectObservationdeprecated
- func NewDetectedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNDetectedObjectObservationdeprecated
- func NewVNDetectedObjectObservation() VNDetectedObjectObservation
- func NewVNDetectedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNDetectedObjectObservation
- func NewVNDetectedObjectObservationWithCoder(coder foundation.INSCoder) VNDetectedObjectObservation
- func NewVNDetectedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) 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
- func NewDetectedPoint() VNDetectedPointdeprecated
- func NewDetectedPointWithCoder(coder foundation.INSCoder) VNDetectedPointdeprecated
- func NewDetectedPointWithLocation(location corefoundation.CGPoint) VNDetectedPointdeprecated
- func NewDetectedPointWithXY(x float64, y float64) VNDetectedPointdeprecated
- func NewVNDetectedPoint() VNDetectedPoint
- func NewVNDetectedPointWithCoder(coder foundation.INSCoder) VNDetectedPoint
- func NewVNDetectedPointWithLocation(location corefoundation.CGPoint) VNDetectedPoint
- func NewVNDetectedPointWithXY(x float64, y float64) VNDetectedPoint
- func VNDetectedPointFromID(id objc.ID) VNDetectedPoint
- type VNDetectedPointClass
- type VNElementType
- type VNErrorCode
- type VNFaceLandmarkRegion
- func NewFaceLandmarkRegion() VNFaceLandmarkRegiondeprecated
- func NewFaceLandmarkRegionWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegiondeprecated
- func NewVNFaceLandmarkRegion() VNFaceLandmarkRegion
- func NewVNFaceLandmarkRegionWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion
- func VNFaceLandmarkRegionFromID(id objc.ID) VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) Autorelease() VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) EncodeWithCoder(coder foundation.INSCoder)
- func (f VNFaceLandmarkRegion) Init() VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) InitWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion
- func (f VNFaceLandmarkRegion) PointCount() uint
- func (f VNFaceLandmarkRegion) RequestRevision() uint
- type VNFaceLandmarkRegion2D
- func NewFaceLandmarkRegion2D() VNFaceLandmarkRegion2Ddeprecated
- func NewFaceLandmarkRegion2DWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion2Ddeprecated
- func NewVNFaceLandmarkRegion2D() VNFaceLandmarkRegion2D
- func NewVNFaceLandmarkRegion2DWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion2D
- func VNFaceLandmarkRegion2DFromID(id objc.ID) 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 NewFaceLandmarks() VNFaceLandmarksdeprecated
- func NewFaceLandmarksWithCoder(coder foundation.INSCoder) VNFaceLandmarksdeprecated
- func NewVNFaceLandmarks() VNFaceLandmarks
- func NewVNFaceLandmarksWithCoder(coder foundation.INSCoder) VNFaceLandmarks
- func VNFaceLandmarksFromID(id objc.ID) 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) InitWithCoder(coder foundation.INSCoder) VNFaceLandmarks
- func (f VNFaceLandmarks) RequestRevision() uint
- type VNFaceLandmarks2D
- func NewFaceLandmarks2D() VNFaceLandmarks2Ddeprecated
- func NewFaceLandmarks2DWithCoder(coder foundation.INSCoder) VNFaceLandmarks2Ddeprecated
- func NewVNFaceLandmarks2D() VNFaceLandmarks2D
- func NewVNFaceLandmarks2DWithCoder(coder foundation.INSCoder) VNFaceLandmarks2D
- func VNFaceLandmarks2DFromID(id objc.ID) VNFaceLandmarks2D
- func (f VNFaceLandmarks2D) AllPoints() IVNFaceLandmarkRegion2D
- func (f VNFaceLandmarks2D) Autorelease() VNFaceLandmarks2D
- 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
- type VNFaceLandmarks2DClass
- type VNFaceLandmarksClass
- type VNFaceObservation
- func NewFaceObservation() VNFaceObservationdeprecated
- func NewFaceObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNFaceObservationdeprecated
- func NewFaceObservationWithCoder(coder foundation.INSCoder) VNFaceObservationdeprecated
- func NewFaceObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNFaceObservationdeprecated
- func NewFaceObservationWithRequestRevisionBoundingBoxRollYaw(requestRevision uint, boundingBox corefoundation.CGRect, ...) VNFaceObservationdeprecated
- func NewFaceObservationWithRequestRevisionBoundingBoxRollYawPitch(requestRevision uint, boundingBox corefoundation.CGRect, ...) VNFaceObservationdeprecated
- func NewVNFaceObservation() VNFaceObservation
- func NewVNFaceObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNFaceObservation
- func NewVNFaceObservationWithCoder(coder foundation.INSCoder) VNFaceObservation
- func NewVNFaceObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNFaceObservation
- func NewVNFaceObservationWithRequestRevisionBoundingBoxRollYaw(requestRevision uint, boundingBox corefoundation.CGRect, ...) VNFaceObservation
- func NewVNFaceObservationWithRequestRevisionBoundingBoxRollYawPitch(requestRevision uint, boundingBox corefoundation.CGRect, ...) 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) Roll() foundation.NSNumber
- func (f VNFaceObservation) Yaw() foundation.NSNumber
- type VNFaceObservationAccepting
- type VNFaceObservationAcceptingObject
- type VNFaceObservationClass
- type VNFeaturePrintObservation
- func NewFeaturePrintObservation() VNFeaturePrintObservationdeprecated
- func NewFeaturePrintObservationWithCoder(coder foundation.INSCoder) VNFeaturePrintObservationdeprecated
- func NewVNFeaturePrintObservation() VNFeaturePrintObservation
- func NewVNFeaturePrintObservationWithCoder(coder foundation.INSCoder) VNFeaturePrintObservation
- func VNFeaturePrintObservationFromID(id objc.ID) VNFeaturePrintObservation
- func (f VNFeaturePrintObservation) Autorelease() VNFeaturePrintObservation
- func (f VNFeaturePrintObservation) ComputeDistanceToFeaturePrintObservationError(featurePrint VNFeaturePrintObservation) (float32, error)
- func (f VNFeaturePrintObservation) Data() foundation.NSData
- func (f VNFeaturePrintObservation) ElementCount() uint
- func (f VNFeaturePrintObservation) ElementType() VNElementType
- func (f VNFeaturePrintObservation) Init() VNFeaturePrintObservation
- type VNFeaturePrintObservationClass
- type VNGenerateAttentionBasedSaliencyImageRequest
- func NewGenerateAttentionBasedSaliencyImageRequest() VNGenerateAttentionBasedSaliencyImageRequestdeprecated
- func NewGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateAttentionBasedSaliencyImageRequestdeprecated
- func NewVNGenerateAttentionBasedSaliencyImageRequest() VNGenerateAttentionBasedSaliencyImageRequest
- func NewVNGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateAttentionBasedSaliencyImageRequest
- func VNGenerateAttentionBasedSaliencyImageRequestFromID(id objc.ID) VNGenerateAttentionBasedSaliencyImageRequest
- type VNGenerateAttentionBasedSaliencyImageRequestClass
- type VNGenerateForegroundInstanceMaskRequest
- func NewGenerateForegroundInstanceMaskRequest() VNGenerateForegroundInstanceMaskRequestdeprecated
- func NewGenerateForegroundInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateForegroundInstanceMaskRequestdeprecated
- func NewVNGenerateForegroundInstanceMaskRequest() VNGenerateForegroundInstanceMaskRequest
- func NewVNGenerateForegroundInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateForegroundInstanceMaskRequest
- func VNGenerateForegroundInstanceMaskRequestFromID(id objc.ID) VNGenerateForegroundInstanceMaskRequest
- type VNGenerateForegroundInstanceMaskRequestClass
- type VNGenerateImageFeaturePrintRequest
- func NewGenerateImageFeaturePrintRequest() VNGenerateImageFeaturePrintRequestdeprecated
- func NewGenerateImageFeaturePrintRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateImageFeaturePrintRequestdeprecated
- func NewVNGenerateImageFeaturePrintRequest() VNGenerateImageFeaturePrintRequest
- func NewVNGenerateImageFeaturePrintRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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)
- type VNGenerateImageFeaturePrintRequestClass
- type VNGenerateObjectnessBasedSaliencyImageRequest
- func NewGenerateObjectnessBasedSaliencyImageRequest() VNGenerateObjectnessBasedSaliencyImageRequestdeprecated
- func NewGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateObjectnessBasedSaliencyImageRequestdeprecated
- func NewVNGenerateObjectnessBasedSaliencyImageRequest() VNGenerateObjectnessBasedSaliencyImageRequest
- func NewVNGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateObjectnessBasedSaliencyImageRequest
- func VNGenerateObjectnessBasedSaliencyImageRequestFromID(id objc.ID) VNGenerateObjectnessBasedSaliencyImageRequest
- type VNGenerateObjectnessBasedSaliencyImageRequestClass
- type VNGenerateOpticalFlowRequest
- func NewGenerateOpticalFlowRequest() VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequestdeprecated
- func NewVNGenerateOpticalFlowRequest() VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNGenerateOpticalFlowRequest
- func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) 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)
- type VNGenerateOpticalFlowRequestClass
- type VNGenerateOpticalFlowRequestComputationAccuracy
- type VNGeneratePersonInstanceMaskRequest
- func NewGeneratePersonInstanceMaskRequest() VNGeneratePersonInstanceMaskRequestdeprecated
- func NewGeneratePersonInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonInstanceMaskRequestdeprecated
- func NewVNGeneratePersonInstanceMaskRequest() VNGeneratePersonInstanceMaskRequest
- func NewVNGeneratePersonInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonInstanceMaskRequest
- func VNGeneratePersonInstanceMaskRequestFromID(id objc.ID) VNGeneratePersonInstanceMaskRequest
- type VNGeneratePersonInstanceMaskRequestClass
- type VNGeneratePersonSegmentationRequest
- func NewGeneratePersonSegmentationRequest() VNGeneratePersonSegmentationRequestdeprecated
- func NewGeneratePersonSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonSegmentationRequestdeprecated
- func NewGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNGeneratePersonSegmentationRequestdeprecated
- func NewVNGeneratePersonSegmentationRequest() VNGeneratePersonSegmentationRequest
- func NewVNGeneratePersonSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonSegmentationRequest
- func NewVNGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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)
- 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 *[2]float32, pointCount int) (VNCircle, error)
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) CalculateAreaForContourOrientedAreaError(contour VNContour, orientedArea bool) (float64, error)
- func (_VNGeometryUtilsClass VNGeometryUtilsClass) CalculatePerimeterForContourError(contour VNContour) (float64, error)
- func (vc VNGeometryUtilsClass) Class() objc.Class
- type VNHomographicImageRegistrationRequest
- func NewHomographicImageRegistrationRequest() VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequestdeprecated
- func NewVNHomographicImageRegistrationRequest() VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequest
- func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNHomographicImageRegistrationRequest
- func VNHomographicImageRegistrationRequestFromID(id objc.ID) VNHomographicImageRegistrationRequest
- type VNHomographicImageRegistrationRequestClass
- type VNHorizonObservation
- func NewHorizonObservation() VNHorizonObservationdeprecated
- func NewHorizonObservationWithCoder(coder foundation.INSCoder) VNHorizonObservationdeprecated
- func NewVNHorizonObservation() VNHorizonObservation
- func NewVNHorizonObservationWithCoder(coder foundation.INSCoder) VNHorizonObservation
- func VNHorizonObservationFromID(id objc.ID) 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 NewHumanBodyPose3DObservation() VNHumanBodyPose3DObservationdeprecated
- func NewHumanBodyPose3DObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPose3DObservationdeprecated
- func NewVNHumanBodyPose3DObservation() VNHumanBodyPose3DObservation
- func NewVNHumanBodyPose3DObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPose3DObservation
- func VNHumanBodyPose3DObservationFromID(id objc.ID) VNHumanBodyPose3DObservation
- func (h VNHumanBodyPose3DObservation) Autorelease() VNHumanBodyPose3DObservation
- func (h VNHumanBodyPose3DObservation) AvailableJointNames() []string
- func (h VNHumanBodyPose3DObservation) AvailableJointsGroupNames() []string
- func (h VNHumanBodyPose3DObservation) BodyHeight() float32
- func (h VNHumanBodyPose3DObservation) GetCameraRelativePositionForJointNameError(modelPositionOut *[4][4]float32, ...) (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 NewHumanBodyPoseObservation() VNHumanBodyPoseObservationdeprecated
- func NewHumanBodyPoseObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPoseObservationdeprecated
- func NewVNHumanBodyPoseObservation() VNHumanBodyPoseObservation
- func NewVNHumanBodyPoseObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPoseObservation
- func VNHumanBodyPoseObservationFromID(id objc.ID) 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 NewHumanBodyRecognizedPoint3D() VNHumanBodyRecognizedPoint3Ddeprecated
- func NewHumanBodyRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNHumanBodyRecognizedPoint3Ddeprecated
- func NewHumanBodyRecognizedPoint3DWithPosition(position [4][4]float32) VNHumanBodyRecognizedPoint3Ddeprecated
- func NewVNHumanBodyRecognizedPoint3D() VNHumanBodyRecognizedPoint3D
- func NewVNHumanBodyRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNHumanBodyRecognizedPoint3D
- func NewVNHumanBodyRecognizedPoint3DWithPosition(position [4][4]float32) VNHumanBodyRecognizedPoint3D
- func VNHumanBodyRecognizedPoint3DFromID(id objc.ID) VNHumanBodyRecognizedPoint3D
- type VNHumanBodyRecognizedPoint3DClass
- type VNHumanHandPoseObservation
- func NewHumanHandPoseObservation() VNHumanHandPoseObservationdeprecated
- func NewHumanHandPoseObservationWithCoder(coder foundation.INSCoder) VNHumanHandPoseObservationdeprecated
- func NewVNHumanHandPoseObservation() VNHumanHandPoseObservation
- func NewVNHumanHandPoseObservationWithCoder(coder foundation.INSCoder) VNHumanHandPoseObservation
- func VNHumanHandPoseObservationFromID(id objc.ID) 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 NewHumanObservation() VNHumanObservationdeprecated
- func NewHumanObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNHumanObservationdeprecated
- func NewHumanObservationWithCoder(coder foundation.INSCoder) VNHumanObservationdeprecated
- func NewHumanObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNHumanObservationdeprecated
- func NewVNHumanObservation() VNHumanObservation
- func NewVNHumanObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNHumanObservation
- func NewVNHumanObservationWithCoder(coder foundation.INSCoder) VNHumanObservation
- func NewVNHumanObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNHumanObservation
- func VNHumanObservationFromID(id objc.ID) VNHumanObservation
- type VNHumanObservationClass
- type VNImageAestheticsScoresObservation
- func NewImageAestheticsScoresObservation() VNImageAestheticsScoresObservationdeprecated
- func NewImageAestheticsScoresObservationWithCoder(coder foundation.INSCoder) VNImageAestheticsScoresObservationdeprecated
- func NewVNImageAestheticsScoresObservation() VNImageAestheticsScoresObservation
- func NewVNImageAestheticsScoresObservationWithCoder(coder foundation.INSCoder) VNImageAestheticsScoresObservation
- func VNImageAestheticsScoresObservationFromID(id objc.ID) VNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) Autorelease() VNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) Init() VNImageAestheticsScoresObservation
- func (i VNImageAestheticsScoresObservation) IsUtility() bool
- func (i VNImageAestheticsScoresObservation) OverallScore() float32
- type VNImageAestheticsScoresObservationClass
- type VNImageAlignmentObservation
- func NewImageAlignmentObservation() VNImageAlignmentObservationdeprecated
- func NewImageAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageAlignmentObservationdeprecated
- func NewVNImageAlignmentObservation() VNImageAlignmentObservation
- func NewVNImageAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageAlignmentObservation
- func VNImageAlignmentObservationFromID(id objc.ID) VNImageAlignmentObservation
- type VNImageAlignmentObservationClass
- type VNImageBasedRequest
- func NewImageBasedRequest() VNImageBasedRequestdeprecated
- func NewImageBasedRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNImageBasedRequestdeprecated
- func NewVNImageBasedRequest() VNImageBasedRequest
- func NewVNImageBasedRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNImageBasedRequest
- func VNImageBasedRequestFromID(id objc.ID) VNImageBasedRequest
- type VNImageBasedRequestClass
- type VNImageCropAndScaleOption
- type VNImageHomographicAlignmentObservation
- func NewImageHomographicAlignmentObservation() VNImageHomographicAlignmentObservationdeprecated
- func NewImageHomographicAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageHomographicAlignmentObservationdeprecated
- func NewVNImageHomographicAlignmentObservation() VNImageHomographicAlignmentObservation
- func NewVNImageHomographicAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageHomographicAlignmentObservation
- func VNImageHomographicAlignmentObservationFromID(id objc.ID) VNImageHomographicAlignmentObservation
- type VNImageHomographicAlignmentObservationClass
- type VNImageOption
- type VNImageRegistrationRequest
- func NewImageRegistrationRequest() VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequestdeprecated
- func NewImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequestdeprecated
- func NewVNImageRegistrationRequest() VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequest
- func NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNImageRegistrationRequest
- func VNImageRegistrationRequestFromID(id objc.ID) VNImageRegistrationRequest
- type VNImageRegistrationRequestClass
- type VNImageRequestHandler
- func NewImageRequestHandler() VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCIImageOptions(image *coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCIImageOrientationOptions(image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRequestHandlerdeprecated
- func NewImageRequestHandlerWithURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandlerdeprecated
- func NewVNImageRequestHandler() VNImageRequestHandler
- func NewVNImageRequestHandlerWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCIImageOptions(image *coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCIImageOrientationOptions(image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
- func NewVNImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRequestHandler
- func NewVNImageRequestHandlerWithDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func NewVNImageRequestHandlerWithURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRequestHandler
- func NewVNImageRequestHandlerWithURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) 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 imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCIImageOptions(image *coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCIImageOrientationOptions(image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRequestHandler
- func (i VNImageRequestHandler) InitWithURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNImageRequestHandler
- func (i VNImageRequestHandler) PerformRequestsError(requests []VNRequest) (bool, error)
- type VNImageRequestHandlerClass
- type VNImageTranslationAlignmentObservation
- func NewImageTranslationAlignmentObservation() VNImageTranslationAlignmentObservationdeprecated
- func NewImageTranslationAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageTranslationAlignmentObservationdeprecated
- func NewVNImageTranslationAlignmentObservation() VNImageTranslationAlignmentObservation
- func NewVNImageTranslationAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageTranslationAlignmentObservation
- func VNImageTranslationAlignmentObservationFromID(id objc.ID) VNImageTranslationAlignmentObservation
- type VNImageTranslationAlignmentObservationClass
- type VNInstanceMaskObservation
- func NewInstanceMaskObservation() VNInstanceMaskObservationdeprecated
- func NewInstanceMaskObservationWithCoder(coder foundation.INSCoder) VNInstanceMaskObservationdeprecated
- func NewVNInstanceMaskObservation() VNInstanceMaskObservation
- func NewVNInstanceMaskObservationWithCoder(coder foundation.INSCoder) VNInstanceMaskObservation
- func VNInstanceMaskObservationFromID(id objc.ID) 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
- 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) InitWithCoder(coder foundation.INSCoder) VNObservation
- func (o VNObservation) RequestRevision() uint
- func (o VNObservation) TimeRange() coremedia.CMTimeRange
- func (o VNObservation) Uuid() foundation.NSUUID
- type VNObservationClass
- type VNPixelBufferObservation
- func NewPixelBufferObservation() VNPixelBufferObservationdeprecated
- func NewPixelBufferObservationWithCoder(coder foundation.INSCoder) VNPixelBufferObservationdeprecated
- func NewVNPixelBufferObservation() VNPixelBufferObservation
- func NewVNPixelBufferObservationWithCoder(coder foundation.INSCoder) VNPixelBufferObservation
- func VNPixelBufferObservationFromID(id objc.ID) VNPixelBufferObservation
- type VNPixelBufferObservationClass
- type VNPoint
- func NewPoint() VNPointdeprecated
- func NewPointWithCoder(coder foundation.INSCoder) VNPointdeprecated
- func NewPointWithLocation(location corefoundation.CGPoint) VNPointdeprecated
- func NewPointWithXY(x float64, y float64) VNPointdeprecated
- func NewVNPoint() VNPoint
- func NewVNPointWithCoder(coder foundation.INSCoder) VNPoint
- func NewVNPointWithLocation(location corefoundation.CGPoint) VNPoint
- func NewVNPointWithXY(x float64, y float64) VNPoint
- func VNPointFromID(id objc.ID) 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) InitWithCoder(coder foundation.INSCoder) 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
- func NewPoint3D() VNPoint3Ddeprecated
- func NewPoint3DWithCoder(coder foundation.INSCoder) VNPoint3Ddeprecated
- func NewPoint3DWithPosition(position [4][4]float32) VNPoint3Ddeprecated
- func NewVNPoint3D() VNPoint3D
- func NewVNPoint3DWithCoder(coder foundation.INSCoder) VNPoint3D
- func NewVNPoint3DWithPosition(position [4][4]float32) VNPoint3D
- func VNPoint3DFromID(id objc.ID) VNPoint3D
- type VNPoint3DClass
- type VNPointClass
- type VNPointsClassification
- type VNRecognizeAnimalsRequest
- func NewRecognizeAnimalsRequest() VNRecognizeAnimalsRequestdeprecated
- func NewRecognizeAnimalsRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRecognizeAnimalsRequestdeprecated
- func NewVNRecognizeAnimalsRequest() VNRecognizeAnimalsRequest
- func NewVNRecognizeAnimalsRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRecognizeAnimalsRequest
- func VNRecognizeAnimalsRequestFromID(id objc.ID) VNRecognizeAnimalsRequest
- type VNRecognizeAnimalsRequestClass
- type VNRecognizeTextRequest
- func NewRecognizeTextRequest() VNRecognizeTextRequestdeprecated
- func NewRecognizeTextRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRecognizeTextRequestdeprecated
- func NewVNRecognizeTextRequest() VNRecognizeTextRequest
- func NewVNRecognizeTextRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRecognizeTextRequest
- func VNRecognizeTextRequestFromID(id objc.ID) 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 (o VNRecognizeTextRequest) SetProgressHandler(value objc.ID)
- 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
- type VNRecognizeTextRequestClass
- type VNRecognizedObjectObservation
- func NewRecognizedObjectObservation() VNRecognizedObjectObservationdeprecated
- func NewRecognizedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedObjectObservationdeprecated
- func NewRecognizedObjectObservationWithCoder(coder foundation.INSCoder) VNRecognizedObjectObservationdeprecated
- func NewRecognizedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedObjectObservationdeprecated
- func NewVNRecognizedObjectObservation() VNRecognizedObjectObservation
- func NewVNRecognizedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
- func NewVNRecognizedObjectObservationWithCoder(coder foundation.INSCoder) VNRecognizedObjectObservation
- func NewVNRecognizedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
- func VNRecognizedObjectObservationFromID(id objc.ID) VNRecognizedObjectObservation
- type VNRecognizedObjectObservationClass
- type VNRecognizedPoint
- func NewRecognizedPoint() VNRecognizedPointdeprecated
- func NewRecognizedPointWithCoder(coder foundation.INSCoder) VNRecognizedPointdeprecated
- func NewRecognizedPointWithLocation(location corefoundation.CGPoint) VNRecognizedPointdeprecated
- func NewRecognizedPointWithXY(x float64, y float64) VNRecognizedPointdeprecated
- func NewVNRecognizedPoint() VNRecognizedPoint
- func NewVNRecognizedPointWithCoder(coder foundation.INSCoder) VNRecognizedPoint
- func NewVNRecognizedPointWithLocation(location corefoundation.CGPoint) VNRecognizedPoint
- func NewVNRecognizedPointWithXY(x float64, y float64) VNRecognizedPoint
- func VNRecognizedPointFromID(id objc.ID) VNRecognizedPoint
- type VNRecognizedPoint3D
- func NewRecognizedPoint3D() VNRecognizedPoint3Ddeprecated
- func NewRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNRecognizedPoint3Ddeprecated
- func NewRecognizedPoint3DWithPosition(position [4][4]float32) VNRecognizedPoint3Ddeprecated
- func NewVNRecognizedPoint3D() VNRecognizedPoint3D
- func NewVNRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNRecognizedPoint3D
- func NewVNRecognizedPoint3DWithPosition(position [4][4]float32) VNRecognizedPoint3D
- func VNRecognizedPoint3DFromID(id objc.ID) VNRecognizedPoint3D
- type VNRecognizedPoint3DClass
- type VNRecognizedPointClass
- type VNRecognizedPointGroupKey
- type VNRecognizedPointKey
- type VNRecognizedPoints3DObservation
- func NewRecognizedPoints3DObservation() VNRecognizedPoints3DObservationdeprecated
- func NewRecognizedPoints3DObservationWithCoder(coder foundation.INSCoder) VNRecognizedPoints3DObservationdeprecated
- func NewVNRecognizedPoints3DObservation() VNRecognizedPoints3DObservation
- func NewVNRecognizedPoints3DObservationWithCoder(coder foundation.INSCoder) VNRecognizedPoints3DObservation
- func VNRecognizedPoints3DObservationFromID(id objc.ID) 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 NewRecognizedPointsObservation() VNRecognizedPointsObservationdeprecated
- func NewRecognizedPointsObservationWithCoder(coder foundation.INSCoder) VNRecognizedPointsObservationdeprecated
- func NewVNRecognizedPointsObservation() VNRecognizedPointsObservation
- func NewVNRecognizedPointsObservationWithCoder(coder foundation.INSCoder) VNRecognizedPointsObservation
- func VNRecognizedPointsObservationFromID(id objc.ID) 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 NewRecognizedText() VNRecognizedTextdeprecated
- func NewRecognizedTextWithCoder(coder foundation.INSCoder) VNRecognizedTextdeprecated
- func NewVNRecognizedText() VNRecognizedText
- func NewVNRecognizedTextWithCoder(coder foundation.INSCoder) VNRecognizedText
- func VNRecognizedTextFromID(id objc.ID) 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) InitWithCoder(coder foundation.INSCoder) VNRecognizedText
- func (r VNRecognizedText) RequestRevision() uint
- func (r VNRecognizedText) String() string
- type VNRecognizedTextClass
- type VNRecognizedTextObservation
- func NewRecognizedTextObservation() VNRecognizedTextObservationdeprecated
- func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRecognizedTextObservationdeprecated
- func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRecognizedTextObservationdeprecated
- func NewRecognizedTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedTextObservationdeprecated
- func NewRecognizedTextObservationWithCoder(coder foundation.INSCoder) VNRecognizedTextObservationdeprecated
- func NewRecognizedTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedTextObservationdeprecated
- func NewVNRecognizedTextObservation() VNRecognizedTextObservation
- func NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRecognizedTextObservation
- func NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRecognizedTextObservation
- func NewVNRecognizedTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedTextObservation
- func NewVNRecognizedTextObservationWithCoder(coder foundation.INSCoder) VNRecognizedTextObservation
- func NewVNRecognizedTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedTextObservation
- func VNRecognizedTextObservationFromID(id objc.ID) VNRecognizedTextObservation
- type VNRecognizedTextObservationClass
- type VNRectangleObservation
- func NewRectangleObservation() VNRectangleObservationdeprecated
- func NewRectangleObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRectangleObservationdeprecated
- func NewRectangleObservationWithCoder(coder foundation.INSCoder) VNRectangleObservationdeprecated
- func NewRectangleObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRectangleObservationdeprecated
- func NewRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRectangleObservationdeprecated
- func NewRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRectangleObservationdeprecated
- func NewVNRectangleObservation() VNRectangleObservation
- func NewVNRectangleObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRectangleObservation
- func NewVNRectangleObservationWithCoder(coder foundation.INSCoder) VNRectangleObservation
- func NewVNRectangleObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRectangleObservation
- func NewVNRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNRectangleObservation
- func NewVNRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) 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) 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() VNRequestErrorHandler
- func (r VNRequest) ComputeDeviceForComputeStage(computeStage VNComputeStage) coreml.MLComputeDeviceProtocol
- func (r VNRequest) Init() VNRequest
- func (r VNRequest) InitSync(ctx context.Context) (*VNRequest, error)
- func (r VNRequest) InitWithCompletionHandler(completionHandler VNRequestErrorHandler) 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) SetUsesCPUOnly(value bool)
- func (r VNRequest) SupportedComputeStageDevicesAndReturnError() (foundation.INSDictionary, error)
- func (r VNRequest) UsesCPUOnly() bool
- type VNRequestClass
- type VNRequestCompletionHandler
- type VNRequestErrorHandler
- type VNRequestFaceLandmarksConstellation
- type VNRequestFloat64ErrorHandler
- type VNRequestProgressHandler
- type VNRequestProgressProviding
- type VNRequestProgressProvidingObject
- type VNRequestRevisionProviding
- type VNRequestRevisionProvidingObject
- type VNRequestTextRecognitionLevel
- type VNRequestTrackingLevel
- type VNSaliencyImageObservation
- func NewSaliencyImageObservation() VNSaliencyImageObservationdeprecated
- func NewSaliencyImageObservationWithCoder(coder foundation.INSCoder) VNSaliencyImageObservationdeprecated
- func NewVNSaliencyImageObservation() VNSaliencyImageObservation
- func NewVNSaliencyImageObservationWithCoder(coder foundation.INSCoder) VNSaliencyImageObservation
- func VNSaliencyImageObservationFromID(id objc.ID) 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, ...) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferError(requests []VNRequest, sampleBuffer coremedia.CMSampleBufferRef) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferOrientationError(requests []VNRequest, sampleBuffer coremedia.CMSampleBufferRef, ...) (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.NSData) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageDataOrientationError(requests []VNRequest, imageData foundation.NSData, ...) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageURLError(requests []VNRequest, imageURL foundation.NSURL) (bool, error)
- func (s VNSequenceRequestHandler) PerformRequestsOnImageURLOrientationError(requests []VNRequest, imageURL foundation.NSURL, ...) (bool, error)
- type VNSequenceRequestHandlerClass
- type VNStatefulRequest
- func NewStatefulRequest() VNStatefulRequestdeprecated
- func NewStatefulRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNStatefulRequestdeprecated
- func NewStatefulRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNStatefulRequestdeprecated
- func NewVNStatefulRequest() VNStatefulRequest
- func NewVNStatefulRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNStatefulRequest
- func NewVNStatefulRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNStatefulRequest
- func VNStatefulRequestFromID(id objc.ID) VNStatefulRequest
- func (s VNStatefulRequest) Autorelease() VNStatefulRequest
- func (s VNStatefulRequest) FrameAnalysisSpacing() coremedia.CMTime
- func (s VNStatefulRequest) Init() VNStatefulRequest
- func (s VNStatefulRequest) InitWithFrameAnalysisSpacing(ctx context.Context, frameAnalysisSpacing coremedia.CMTime) (*VNRequest, error)
- func (s VNStatefulRequest) InitWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNStatefulRequest
- func (s VNStatefulRequest) MinimumLatencyFrameCount() int
- type VNStatefulRequestClass
- type VNTargetedImageRequest
- func NewTargetedImageRequest() VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequestdeprecated
- func NewTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequestdeprecated
- func NewVNTargetedImageRequest() VNTargetedImageRequest
- func NewVNTargetedImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func NewVNTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) 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) InitWithTargetedCGImageOptionsSync(ctx context.Context, cgImage coregraphics.CGImageRef, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsSync(ctx context.Context, cgImage coregraphics.CGImageRef, ...) (*VNRequest, error)
- 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) InitWithTargetedCIImageOptionsSync(ctx context.Context, ciImage *coreimage.CIImage, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsSync(ctx context.Context, ciImage *coreimage.CIImage, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsSync(ctx context.Context, sampleBuffer coremedia.CMSampleBufferRef, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsSync(ctx context.Context, sampleBuffer coremedia.CMSampleBufferRef, ...) (*VNRequest, error)
- 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) InitWithTargetedCVPixelBufferOptionsSync(ctx context.Context, pixelBuffer corevideo.CVImageBufferRef, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsSync(ctx context.Context, pixelBuffer corevideo.CVImageBufferRef, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOptionsSync(ctx context.Context, imageData foundation.NSData, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsSync(ctx context.Context, imageData foundation.NSData, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOptionsSync(ctx context.Context, imageURL foundation.NSURL, ...) (*VNRequest, error)
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTargetedImageRequest
- func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsSync(ctx context.Context, imageURL foundation.NSURL, ...) (*VNRequest, error)
- type VNTargetedImageRequestClass
- type VNTextObservation
- func NewTextObservation() VNTextObservationdeprecated
- func NewTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNTextObservationdeprecated
- func NewTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNTextObservationdeprecated
- func NewTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNTextObservationdeprecated
- func NewTextObservationWithCoder(coder foundation.INSCoder) VNTextObservationdeprecated
- func NewTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNTextObservationdeprecated
- func NewVNTextObservation() VNTextObservation
- func NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNTextObservation
- func NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, ...) VNTextObservation
- func NewVNTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNTextObservation
- func NewVNTextObservationWithCoder(coder foundation.INSCoder) VNTextObservation
- func NewVNTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNTextObservation
- func VNTextObservationFromID(id objc.ID) VNTextObservation
- type VNTextObservationClass
- type VNTrackHomographicImageRegistrationRequest
- func NewTrackHomographicImageRegistrationRequest() VNTrackHomographicImageRegistrationRequestdeprecated
- func NewTrackHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackHomographicImageRegistrationRequestdeprecated
- func NewTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackHomographicImageRegistrationRequestdeprecated
- func NewVNTrackHomographicImageRegistrationRequest() VNTrackHomographicImageRegistrationRequest
- func NewVNTrackHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackHomographicImageRegistrationRequest
- func NewVNTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackHomographicImageRegistrationRequest
- func VNTrackHomographicImageRegistrationRequestFromID(id objc.ID) VNTrackHomographicImageRegistrationRequest
- type VNTrackHomographicImageRegistrationRequestClass
- type VNTrackObjectRequest
- func NewTrackObjectRequest() VNTrackObjectRequestdeprecated
- func NewTrackObjectRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackObjectRequestdeprecated
- func NewTrackObjectRequestWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequestdeprecated
- func NewTrackObjectRequestWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, ...) VNTrackObjectRequestdeprecated
- func NewVNTrackObjectRequest() VNTrackObjectRequest
- func NewVNTrackObjectRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackObjectRequest
- func NewVNTrackObjectRequestWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
- func NewVNTrackObjectRequestWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, ...) 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, ...) VNTrackObjectRequest
- func (t VNTrackObjectRequest) InitWithDetectedObjectObservationSync(ctx context.Context, observation IVNDetectedObjectObservation) (*VNRequest, error)
- type VNTrackObjectRequestClass
- type VNTrackOpticalFlowRequest
- func NewTrackOpticalFlowRequest() VNTrackOpticalFlowRequestdeprecated
- func NewTrackOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackOpticalFlowRequestdeprecated
- func NewTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackOpticalFlowRequestdeprecated
- func NewVNTrackOpticalFlowRequest() VNTrackOpticalFlowRequest
- func NewVNTrackOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackOpticalFlowRequest
- func NewVNTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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 NewTrackRectangleRequest() VNTrackRectangleRequestdeprecated
- func NewTrackRectangleRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackRectangleRequestdeprecated
- func NewTrackRectangleRequestWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequestdeprecated
- func NewTrackRectangleRequestWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler VNRequestErrorHandler) VNTrackRectangleRequestdeprecated
- func NewVNTrackRectangleRequest() VNTrackRectangleRequest
- func NewVNTrackRectangleRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackRectangleRequest
- func NewVNTrackRectangleRequestWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
- func NewVNTrackRectangleRequestWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler VNRequestErrorHandler) 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 VNRequestErrorHandler) VNTrackRectangleRequest
- func (t VNTrackRectangleRequest) InitWithRectangleObservationSync(ctx context.Context, observation IVNRectangleObservation) (*VNRequest, error)
- type VNTrackRectangleRequestClass
- type VNTrackTranslationalImageRegistrationRequest
- func NewTrackTranslationalImageRegistrationRequest() VNTrackTranslationalImageRegistrationRequestdeprecated
- func NewTrackTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackTranslationalImageRegistrationRequestdeprecated
- func NewTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackTranslationalImageRegistrationRequestdeprecated
- func NewVNTrackTranslationalImageRegistrationRequest() VNTrackTranslationalImageRegistrationRequest
- func NewVNTrackTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackTranslationalImageRegistrationRequest
- func NewVNTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackTranslationalImageRegistrationRequest
- func VNTrackTranslationalImageRegistrationRequestFromID(id objc.ID) VNTrackTranslationalImageRegistrationRequest
- type VNTrackTranslationalImageRegistrationRequestClass
- type VNTrackingRequest
- func NewTrackingRequest() VNTrackingRequestdeprecated
- func NewTrackingRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackingRequestdeprecated
- func NewVNTrackingRequest() VNTrackingRequest
- func NewVNTrackingRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackingRequest
- func VNTrackingRequestFromID(id objc.ID) VNTrackingRequest
- func (t VNTrackingRequest) Autorelease() VNTrackingRequest
- func (t VNTrackingRequest) Init() VNTrackingRequest
- func (t VNTrackingRequest) InputObservation() IVNDetectedObjectObservation
- func (t VNTrackingRequest) IsLastFrame() 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 NewTrajectoryObservation() VNTrajectoryObservationdeprecated
- func NewTrajectoryObservationWithCoder(coder foundation.INSCoder) VNTrajectoryObservationdeprecated
- func NewVNTrajectoryObservation() VNTrajectoryObservation
- func NewVNTrajectoryObservationWithCoder(coder foundation.INSCoder) VNTrajectoryObservation
- func VNTrajectoryObservationFromID(id objc.ID) VNTrajectoryObservation
- func (t VNTrajectoryObservation) Autorelease() VNTrajectoryObservation
- func (t VNTrajectoryObservation) DetectedPoints() []VNPoint
- func (t VNTrajectoryObservation) Init() VNTrajectoryObservation
- func (t VNTrajectoryObservation) MovingAverageRadius() float64
- func (t VNTrajectoryObservation) ProjectedPoints() []VNPoint
- type VNTrajectoryObservationClass
- type VNTranslationalImageRegistrationRequest
- func NewTranslationalImageRegistrationRequest() VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequestdeprecated
- func NewVNTranslationalImageRegistrationRequest() VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequest
- func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, ...) VNTranslationalImageRegistrationRequest
- func VNTranslationalImageRegistrationRequestFromID(id objc.ID) VNTranslationalImageRegistrationRequest
- type VNTranslationalImageRegistrationRequestClass
- type VNVector
- func NewVNVector() VNVector
- func NewVNVectorByAddingVectorToVector(v1 IVNVector, v2 IVNVector) VNVector
- func NewVNVectorByMultiplyingVectorByScalar(vector IVNVector, scalar float64) VNVector
- func NewVNVectorBySubtractingVectorFromVector(v1 IVNVector, v2 IVNVector) VNVector
- func NewVNVectorWithCoder(coder foundation.INSCoder) VNVector
- func NewVNVectorWithRTheta(r float64, theta float64) VNVector
- func NewVNVectorWithVectorHeadTail(head IVNPoint, tail IVNPoint) VNVector
- func NewVNVectorWithXComponentYComponent(x float64, y float64) VNVector
- func NewVector() VNVectordeprecated
- func NewVectorByAddingVectorToVector(v1 IVNVector, v2 IVNVector) VNVectordeprecated
- func NewVectorByMultiplyingVectorByScalar(vector IVNVector, scalar float64) VNVectordeprecated
- func NewVectorBySubtractingVectorFromVector(v1 IVNVector, v2 IVNVector) VNVectordeprecated
- func NewVectorWithCoder(coder foundation.INSCoder) VNVectordeprecated
- func NewVectorWithRTheta(r float64, theta float64) VNVectordeprecated
- func NewVectorWithVectorHeadTail(head IVNPoint, tail IVNPoint) VNVectordeprecated
- func NewVectorWithXComponentYComponent(x float64, y float64) VNVectordeprecated
- 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) InitWithCoder(coder foundation.INSCoder) 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
- func (vc VNVectorClass) Alloc() VNVector
- func (vc VNVectorClass) Class() objc.Class
- func (_VNVectorClass VNVectorClass) DotProductOfVectorVector(v1 IVNVector, v2 IVNVector) float64
- func (_VNVectorClass VNVectorClass) UnitVectorForVector(vector IVNVector) VNVector
- func (_VNVectorClass VNVectorClass) ZeroVector() VNVector
- type VNVideoProcessingOptiondeprecated
- type VNVideoProcessor
- func NewVNVideoProcessor() VNVideoProcessor
- func NewVNVideoProcessorWithURL(videoURL foundation.NSURL) VNVideoProcessor
- func NewVideoProcessor() VNVideoProcessordeprecated
- func NewVideoProcessorWithURL(videoURL foundation.NSURL) VNVideoProcessordeprecated
- func VNVideoProcessorFromID(id objc.ID) VNVideoProcessor
- func (v VNVideoProcessor) AddRequestProcessingOptionsError(request IVNRequest, ...) (bool, error)
- func (v VNVideoProcessor) AnalyzeTimeRangeError(timeRange coremedia.CMTimeRange) (bool, error)
- func (v VNVideoProcessor) Autorelease() VNVideoProcessor
- func (v VNVideoProcessor) Cancel()
- func (v VNVideoProcessor) Init() VNVideoProcessor
- func (v VNVideoProcessor) InitWithURL(videoURL foundation.NSURL) VNVideoProcessor
- func (v VNVideoProcessor) RemoveRequestError(request IVNRequest) (bool, error)
- type VNVideoProcessorCadence
- type VNVideoProcessorCadenceClass
- type VNVideoProcessorClass
- type VNVideoProcessorFrameRateCadence
- func NewVNVideoProcessorFrameRateCadence() VNVideoProcessorFrameRateCadence
- func NewVNVideoProcessorFrameRateCadenceWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadence
- func NewVideoProcessorFrameRateCadence() VNVideoProcessorFrameRateCadencedeprecated
- func NewVideoProcessorFrameRateCadenceWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadencedeprecated
- func VNVideoProcessorFrameRateCadenceFromID(id objc.ID) 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 NewVNVideoProcessorTimeIntervalCadence() VNVideoProcessorTimeIntervalCadence
- func NewVNVideoProcessorTimeIntervalCadenceWithTimeInterval(timeInterval corefoundation.CFTimeInterval) VNVideoProcessorTimeIntervalCadence
- func NewVideoProcessorTimeIntervalCadence() VNVideoProcessorTimeIntervalCadencedeprecated
- func NewVideoProcessorTimeIntervalCadenceWithTimeInterval(timeInterval corefoundation.CFTimeInterval) VNVideoProcessorTimeIntervalCadencedeprecated
- func VNVideoProcessorTimeIntervalCadenceFromID(id objc.ID) VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) Autorelease() VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) Init() VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) InitWithTimeInterval(timeInterval corefoundation.CFTimeInterval) VNVideoProcessorTimeIntervalCadence
- func (v VNVideoProcessorTimeIntervalCadence) TimeInterval() corefoundation.CFTimeInterval
- 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](<https://developer.apple.com/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 // VNDetectFaceLandmarksRequestRevision1 is a constant for specifying revision 1 of the face landmarks detection request. // // Deprecated: Deprecated since macOS 13.0. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequestRevision1 VNDetectFaceLandmarksRequestRevision1 uint = 1 // VNDetectFaceRectanglesRequestRevision1 is a constant for specifying revision 1 of the face rectangles detection request. // // Deprecated: Deprecated since macOS 13.0. // // See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequestRevision1 VNDetectFaceRectanglesRequestRevision1 uint = 1 // 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 VNVideoProcessingOptions struct { // FrameCadence: A value that indicates the video frame cadence at which to perform the video processing. FrameCadence VNVideoProcessingOption // TimeInterval: A value that indicates that the video processor should perform a request every n-seconds. TimeInterval VNVideoProcessingOption }
VNVideoProcessingOptions provides typed accessors for VNVideoProcessingOption constants.
var ( // VNVisionVersionNumber is the current version number of the Vision framework. // // See: https://developer.apple.com/documentation/Vision/VNVisionVersionNumber VNVisionVersionNumber float64 )
Functions ¶
func BindFunc ¶
BindFunc binds the Vision symbol name into fptr, which must be a pointer to a func variable.
The caller supplies the signature, and nothing checks it. A dylib records no argument count or types for a C symbol, so a wrong signature here is not a type error: it is the wrong number of machine words moved on a live stack, and the failure surfaces somewhere else entirely. Prefer a generated binding, whose signature carries recorded evidence, and reach for this only for a symbol that has none. purego.RegisterFunc panics on a signature it cannot lower; that is recovered and returned, because an escape hatch that takes down the process on a mistyped experiment is not one anybody can experiment with.
func NewVNRequestCompletionHandlerBlock ¶ added in v0.6.16
func NewVNRequestCompletionHandlerBlock(handler VNRequestCompletionHandler) (objc.ID, func())
NewVNRequestCompletionHandlerBlock wraps a Go VNRequestCompletionHandler as an Objective-C block. The caller must defer the returned cleanup function.
func NewVNRequestErrorBlock ¶ added in v0.6.17
func NewVNRequestErrorBlock(handler VNRequestErrorHandler) (objc.ID, func())
NewVNRequestErrorBlock wraps a Go VNRequestErrorHandler 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]
- [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 NewVNRequestFloat64ErrorBlock ¶ added in v0.6.17
func NewVNRequestFloat64ErrorBlock(handler VNRequestFloat64ErrorHandler) (objc.ID, func())
NewVNRequestFloat64ErrorBlock wraps a Go VNRequestFloat64ErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
func NewVNRequestProgressHandlerBlock ¶ added in v0.6.16
func NewVNRequestProgressHandlerBlock(handler VNRequestProgressHandler) (objc.ID, func())
NewVNRequestProgressHandlerBlock wraps a Go VNRequestProgressHandler as an Objective-C block. The caller must defer the returned cleanup function.
func SymbolAddress ¶
SymbolAddress returns the address of name in Vision, whether or not this package generated a binding for it.
What is generated is bounded by what is documented, and for a private framework that is whatever a manifest happened to enumerate. The dylib usually exports far more. Without this, a symbol nobody wrote down is unreachable from a package that has already loaded the image holding it, and the generated surface becomes a ceiling instead of a floor.
The lookup is scoped to this framework's handle, not RTLD_DEFAULT, so a symbol some other loaded image exports is not reported as this one's.
func TryVNElementTypeSize ¶
func TryVNElementTypeSize(elementType VNElementType) (uint, error)
TryVNElementTypeSize is like VNElementTypeSize but returns an error instead of panicking if VNElementTypeSize is unavailable at run time.
func TryVNImagePointForFaceLandmarkPoint ¶
func TryVNImagePointForFaceLandmarkPoint(faceLandmarkPoint [2]float32, faceBoundingBox corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGPoint, error)
TryVNImagePointForFaceLandmarkPoint is like VNImagePointForFaceLandmarkPoint but returns an error instead of panicking if VNImagePointForFaceLandmarkPoint is unavailable at run time.
func TryVNImagePointForNormalizedPoint ¶
func TryVNImagePointForNormalizedPoint(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGPoint, error)
TryVNImagePointForNormalizedPoint is like VNImagePointForNormalizedPoint but returns an error instead of panicking if VNImagePointForNormalizedPoint is unavailable at run time.
func TryVNImagePointForNormalizedPointUsingRegionOfInterest ¶
func TryVNImagePointForNormalizedPointUsingRegionOfInterest(normalizedPoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) (corefoundation.CGPoint, error)
TryVNImagePointForNormalizedPointUsingRegionOfInterest is like VNImagePointForNormalizedPointUsingRegionOfInterest but returns an error instead of panicking if VNImagePointForNormalizedPointUsingRegionOfInterest is unavailable at run time.
func TryVNImageRectForNormalizedRect ¶
func TryVNImageRectForNormalizedRect(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGRect, error)
TryVNImageRectForNormalizedRect is like VNImageRectForNormalizedRect but returns an error instead of panicking if VNImageRectForNormalizedRect is unavailable at run time.
func TryVNImageRectForNormalizedRectUsingRegionOfInterest ¶
func TryVNImageRectForNormalizedRectUsingRegionOfInterest(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) (corefoundation.CGRect, error)
TryVNImageRectForNormalizedRectUsingRegionOfInterest is like VNImageRectForNormalizedRectUsingRegionOfInterest but returns an error instead of panicking if VNImageRectForNormalizedRectUsingRegionOfInterest is unavailable at run time.
func TryVNNormalizedFaceBoundingBoxPointForLandmarkPoint ¶
func TryVNNormalizedFaceBoundingBoxPointForLandmarkPoint(faceLandmarkPoint [2]float32, faceBoundingBox corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGPoint, error)
TryVNNormalizedFaceBoundingBoxPointForLandmarkPoint is like VNNormalizedFaceBoundingBoxPointForLandmarkPoint but returns an error instead of panicking if VNNormalizedFaceBoundingBoxPointForLandmarkPoint is unavailable at run time.
func TryVNNormalizedPointForImagePoint ¶
func TryVNNormalizedPointForImagePoint(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGPoint, error)
TryVNNormalizedPointForImagePoint is like VNNormalizedPointForImagePoint but returns an error instead of panicking if VNNormalizedPointForImagePoint is unavailable at run time.
func TryVNNormalizedPointForImagePointUsingRegionOfInterest ¶
func TryVNNormalizedPointForImagePointUsingRegionOfInterest(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) (corefoundation.CGPoint, error)
TryVNNormalizedPointForImagePointUsingRegionOfInterest is like VNNormalizedPointForImagePointUsingRegionOfInterest but returns an error instead of panicking if VNNormalizedPointForImagePointUsingRegionOfInterest is unavailable at run time.
func TryVNNormalizedRectForImageRect ¶
func TryVNNormalizedRectForImageRect(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) (corefoundation.CGRect, error)
TryVNNormalizedRectForImageRect is like VNNormalizedRectForImageRect but returns an error instead of panicking if VNNormalizedRectForImageRect is unavailable at run time.
func TryVNNormalizedRectForImageRectUsingRegionOfInterest ¶
func TryVNNormalizedRectForImageRectUsingRegionOfInterest(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr, roi corefoundation.CGRect) (corefoundation.CGRect, error)
TryVNNormalizedRectForImageRectUsingRegionOfInterest is like VNNormalizedRectForImageRectUsingRegionOfInterest but returns an error instead of panicking if VNNormalizedRectForImageRectUsingRegionOfInterest is unavailable at run time.
func TryVNNormalizedRectIsIdentityRect ¶
func TryVNNormalizedRectIsIdentityRect(normalizedRect corefoundation.CGRect) (bool, error)
TryVNNormalizedRectIsIdentityRect is like VNNormalizedRectIsIdentityRect but returns an error instead of panicking if VNNormalizedRectIsIdentityRect is unavailable at run time.
func VNElementTypeSize ¶
func VNElementTypeSize(elementType VNElementType) uint
VNElementTypeSize returns the size of a feature print element.
It panics if VNElementTypeSize is unavailable at run time; use TryVNElementTypeSize to get an error instead.
See: https://developer.apple.com/documentation/Vision/VNElementTypeSize(_:)
func VNImagePointForFaceLandmarkPoint ¶
func VNImagePointForFaceLandmarkPoint(faceLandmarkPoint [2]float32, faceBoundingBox corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNImagePointForFaceLandmarkPoint returns the image coordinates of a specified face landmark point.
It panics if VNImagePointForFaceLandmarkPoint is unavailable at run time; use TryVNImagePointForFaceLandmarkPoint to get an error instead.
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.
It panics if VNImagePointForNormalizedPoint is unavailable at run time; use TryVNImagePointForNormalizedPoint to get an error instead.
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.
It panics if VNImagePointForNormalizedPointUsingRegionOfInterest is unavailable at run time; use TryVNImagePointForNormalizedPointUsingRegionOfInterest to get an error instead.
func VNImageRectForNormalizedRect ¶
func VNImageRectForNormalizedRect(normalizedRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGRect
VNImageRectForNormalizedRect projects a rectangle from normalized coordinates into image coordinates.
It panics if VNImageRectForNormalizedRect is unavailable at run time; use TryVNImageRectForNormalizedRect to get an error instead.
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.
It panics if VNImageRectForNormalizedRectUsingRegionOfInterest is unavailable at run time; use TryVNImageRectForNormalizedRectUsingRegionOfInterest to get an error instead.
func VNNormalizedFaceBoundingBoxPointForLandmarkPoint ¶
func VNNormalizedFaceBoundingBoxPointForLandmarkPoint(faceLandmarkPoint [2]float32, faceBoundingBox corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNNormalizedFaceBoundingBoxPointForLandmarkPoint returns the coordinates of a specified face landmark point, in bounding box coordinates.
It panics if VNNormalizedFaceBoundingBoxPointForLandmarkPoint is unavailable at run time; use TryVNNormalizedFaceBoundingBoxPointForLandmarkPoint to get an error instead.
func VNNormalizedPointForImagePoint ¶
func VNNormalizedPointForImagePoint(imagePoint corefoundation.CGPoint, imageWidth uintptr, imageHeight uintptr) corefoundation.CGPoint
VNNormalizedPointForImagePoint projects a point from image coordinates into normalized coordinates.
It panics if VNNormalizedPointForImagePoint is unavailable at run time; use TryVNNormalizedPointForImagePoint to get an error instead.
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.
It panics if VNNormalizedPointForImagePointUsingRegionOfInterest is unavailable at run time; use TryVNNormalizedPointForImagePointUsingRegionOfInterest to get an error instead.
func VNNormalizedRectForImageRect ¶
func VNNormalizedRectForImageRect(imageRect corefoundation.CGRect, imageWidth uintptr, imageHeight uintptr) corefoundation.CGRect
VNNormalizedRectForImageRect projects a rectangle from image coordinates into normalized coordinates.
It panics if VNNormalizedRectForImageRect is unavailable at run time; use TryVNNormalizedRectForImageRect to get an error instead.
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.
It panics if VNNormalizedRectForImageRectUsingRegionOfInterest is unavailable at run time; use TryVNNormalizedRectForImageRectUsingRegionOfInterest to get an error instead.
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.
It panics if VNNormalizedRectIsIdentityRect is unavailable at run time; use TryVNNormalizedRectIsIdentityRect to get an error instead.
See: https://developer.apple.com/documentation/Vision/VNNormalizedRectIsIdentityRect(_:)
Types ¶
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.NSData
// The supplemental code decoded as a string value.
SupplementalPayloadString() string
SupplementalPayloadData() foundation.NSData
// 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
InitWithCoder(coder foundation.INSCoder) VNCircle
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
}
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)
}
An interface definition for the VNClassifyImageRequest class.
Accessing Results ¶
- IVNClassifyImageRequest.SupportedIdentifiersAndReturnError: Returns the classification identifiers that the request supports in its current configuration.
See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequest
type IVNContour ¶
type IVNContour interface {
objectivec.IObject
// The aspect ratio of the contour.
AspectRatio() float32
// The contour object’s index path.
IndexPath() foundation.NSIndexPath
// The contour object as a path in normalized coordinates.
NormalizedPath() coregraphics.CGPathRef
// The contour’s number of points.
PointCount() int
// The contour’s array of points in normalized coordinates.
NormalizedPoints() unsafe.Pointer
// 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 revision of the [VNRequest](<https://developer.apple.com/documentation/Vision/VNRequest>) subclass used to generate the implementing object.
RequestRevision() uint
}
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.NormalizedPoints: The contour’s array of points in normalized coordinates.
- 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 foundation.NSIndexPath) (IVNContour, error)
}
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](<https://developer.apple.com/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
}
An interface definition for the VNCoreMLFeatureValueObservation class.
Obtaining Feature Values ¶
- IVNCoreMLFeatureValueObservation.FeatureValue: The feature result of a VNCoreMLRequest(<https://developer.apple.com/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)
}
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 VNRequestErrorHandler) 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)
}
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
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest
type IVNDetectAnimalBodyPoseRequest ¶
type IVNDetectAnimalBodyPoseRequest interface {
IVNImageBasedRequest
// 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.
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)
}
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
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 Boolean value that indicates whether the request detects a dark object on a light background.
DetectDarkOnLight() bool
SetDetectDarkOnLight(value bool)
}
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
- IVNDetectContoursRequest.DetectDarkOnLight: A Boolean value that indicates whether the request detects a dark object on a light background.
- IVNDetectContoursRequest.SetDetectDarkOnLight
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest
type IVNDetectDocumentSegmentationRequest ¶
type IVNDetectDocumentSegmentationRequest interface {
IVNImageBasedRequest
}
An interface definition for the VNDetectDocumentSegmentationRequest class.
See: https://developer.apple.com/documentation/Vision/VNDetectDocumentSegmentationRequest
type IVNDetectFaceCaptureQualityRequest ¶
type IVNDetectFaceCaptureQualityRequest interface {
IVNImageBasedRequest
// An array of [VNFaceObservation](<https://developer.apple.com/documentation/Vision/VNFaceObservation>) objects to process as part of the request.
InputFaceObservations() []VNFaceObservation
}
An interface definition for the VNDetectFaceCaptureQualityRequest class.
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)
// An array of [VNFaceObservation](<https://developer.apple.com/documentation/Vision/VNFaceObservation>) objects to process as part of the request.
InputFaceObservations() []VNFaceObservation
}
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
See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequest
type IVNDetectFaceRectanglesRequest ¶
type IVNDetectFaceRectanglesRequest interface {
IVNImageBasedRequest
}
An interface definition for the VNDetectFaceRectanglesRequest class.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequest
type IVNDetectHorizonRequest ¶
type IVNDetectHorizonRequest interface {
IVNImageBasedRequest
}
An interface definition for the VNDetectHorizonRequest class.
See: https://developer.apple.com/documentation/Vision/VNDetectHorizonRequest
type IVNDetectHumanBodyPose3DRequest ¶
type IVNDetectHumanBodyPose3DRequest interface {
IVNStatefulRequest
// 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.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPose3DRequest
type IVNDetectHumanBodyPoseRequest ¶
type IVNDetectHumanBodyPoseRequest interface {
IVNImageBasedRequest
// Retrieves the supported joint names.
SupportedJointNamesAndReturnError() ([]string, error)
// Retrieves the supported joint group names.
SupportedJointsGroupNamesAndReturnError() ([]string, error)
}
An interface definition for the VNDetectHumanBodyPoseRequest class.
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.
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
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)
}
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
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)
}
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
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)
}
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
See: https://developer.apple.com/documentation/Vision/VNDetectTextRectanglesRequest
type IVNDetectTrajectoriesRequest ¶
type IVNDetectTrajectoriesRequest interface {
IVNStatefulRequest
// Creates a new request to detect trajectories.
InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequest
// The requested target frame time for processing trajectory detection.
TargetFrameTime() coremedia.CMTime
SetTargetFrameTime(value coremedia.CMTime)
// 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)
// The minimum radius of the tracked shape’s bounding circle.
MinimumObjectSize() float32
SetMinimumObjectSize(value float32)
// The maximum radius of the tracked shape’s bounding circle.
MaximumObjectSize() float32
SetMaximumObjectSize(value float32)
}
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
- IVNDetectTrajectoriesRequest.MinimumObjectSize: The minimum radius of the tracked shape’s bounding circle.
- IVNDetectTrajectoriesRequest.SetMinimumObjectSize
- IVNDetectTrajectoriesRequest.MaximumObjectSize: The maximum radius of the tracked shape’s bounding circle.
- IVNDetectTrajectoriesRequest.SetMaximumObjectSize
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
// The number of points in the face region.
PointCount() uint
InitWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion
// The revision of the [VNRequest](<https://developer.apple.com/documentation/Vision/VNRequest>) subclass used to generate the implementing object.
RequestRevision() uint
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.
Specifying Region Properties ¶
- IVNFaceLandmarkRegion2D.NormalizedPoints: A buffer in memory containing normalized landmark points.
- IVNFaceLandmarkRegion2D.PrecisionEstimatesPerPoint: An array of precision estimates for each landmark point.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D
type IVNFaceLandmarks ¶
type IVNFaceLandmarks interface {
objectivec.IObject
// A confidence estimate for the detected landmarks.
Confidence() VNConfidence
InitWithCoder(coder foundation.INSCoder) VNFaceLandmarks
// The revision of the [VNRequest](<https://developer.apple.com/documentation/Vision/VNRequest>) subclass used to generate the implementing object.
RequestRevision() uint
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
}
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
}
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.
Determining Capture Quality ¶
- IVNFaceObservation.FaceCaptureQuality: A value that indicates the quality of the face capture.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation
type IVNFeaturePrintObservation ¶
type IVNFeaturePrintObservation interface {
IVNObservation
// The feature print data.
Data() foundation.NSData
// 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
}
An interface definition for the VNGenerateAttentionBasedSaliencyImageRequest class.
See: https://developer.apple.com/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequest
type IVNGenerateForegroundInstanceMaskRequest ¶
type IVNGenerateForegroundInstanceMaskRequest interface {
IVNImageBasedRequest
}
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)
}
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
See: https://developer.apple.com/documentation/Vision/VNGenerateImageFeaturePrintRequest
type IVNGenerateObjectnessBasedSaliencyImageRequest ¶
type IVNGenerateObjectnessBasedSaliencyImageRequest interface {
IVNImageBasedRequest
}
An interface definition for the VNGenerateObjectnessBasedSaliencyImageRequest class.
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)
}
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
See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequest
type IVNGeneratePersonInstanceMaskRequest ¶
type IVNGeneratePersonInstanceMaskRequest interface {
IVNImageBasedRequest
}
An interface definition for the VNGeneratePersonInstanceMaskRequest class.
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)
}
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.
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
}
An interface definition for the VNHomographicImageRegistrationRequest class.
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
// Gets a position relative to the camera for the body joint you specify.
GetCameraRelativePositionForJointNameError(modelPositionOut *[4][4]float32, 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.
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 parent joint in the observation.
ParentJoint() VNHumanBodyPose3DObservationJointName
}
An interface definition for the VNHumanBodyRecognizedPoint3D class.
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
}
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() [3][4]float32
}
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 imageio.CGImagePropertyOrientation, 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 imageio.CGImagePropertyOrientation, 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 imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
InitWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
// Creates a request handler that performs requests on an image contained within a sample buffer.
InitWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, 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 coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
// Creates a request handler that performs requests on an image in a sample buffer that contains depth data.
InitWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to use for performing requests on an image in a data object.
InitWithDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to use for performing requests on an image of known orientation.
InitWithDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
// Creates a handler to be used for performing requests on an image at the specified URL.
InitWithURLOptions(imageURL foundation.NSURL, 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.NSURL, orientation imageio.CGImagePropertyOrientation, 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
}
An interface definition for the VNImageTranslationAlignmentObservation class.
Determining Alignment ¶
- IVNImageTranslationAlignmentObservation.AlignmentTransform: The alignment transform to align the floating image with the reference image.
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)
}
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
// A unique identifier assigned to the Vision observation.
Uuid() foundation.NSUUID
// The time range of the reported observation.
TimeRange() coremedia.CMTimeRange
// The level of confidence in the observation’s accuracy.
Confidence() VNConfidence
InitWithCoder(coder foundation.INSCoder) VNObservation
// The revision of the [VNRequest](<https://developer.apple.com/documentation/Vision/VNRequest>) subclass used to generate the implementing object.
RequestRevision() uint
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
}
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
InitWithCoder(coder foundation.INSCoder) VNPoint
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
InitWithCoder(coder foundation.INSCoder) VNPoint3D
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the VNPoint3D class.
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)
}
An interface definition for the VNRecognizeAnimalsRequest class.
Identifying Animals ¶
- IVNRecognizeAnimalsRequest.SupportedIdentifiersAndReturnError: Returns the identifiers of the animals that the request detects.
See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequest
type IVNRecognizeTextRequest ¶
type IVNRecognizeTextRequest interface {
IVNImageBasedRequest
// 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 Boolean set to true when a request can’t determine its progress in fractions completed.
Indeterminate() bool
// A block of code executed periodically during a Vision request to report progress on long-running tasks.
ProgressHandler() VNRequestProgressHandler
}
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.
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
// 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)
InitWithCoder(coder foundation.INSCoder) VNRecognizedText
// The revision of the [VNRequest](<https://developer.apple.com/documentation/Vision/VNRequest>) subclass used to generate the implementing object.
RequestRevision() uint
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 n 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 n 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
}
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 VNRequestErrorHandler) VNRequest
// The completion handler the system invokes after the request finishes processing.
CompletionHandler() VNRequestErrorHandler
// 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)
// 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
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 imageio.CGImagePropertyOrientation) (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 imageio.CGImagePropertyOrientation) (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 imageio.CGImagePropertyOrientation) (bool, error)
// Performs one or more requests on an image contained within a sample buffer.
PerformRequestsOnCMSampleBufferError(requests []VNRequest, sampleBuffer coremedia.CMSampleBufferRef) (bool, error)
// Performs one or more requests on an image of a specified orientation contained within a sample buffer.
PerformRequestsOnCMSampleBufferOrientationError(requests []VNRequest, sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation) (bool, error)
// Schedules one or more Vision requests to be performed on raw image data.
PerformRequestsOnImageDataError(requests []VNRequest, imageData foundation.NSData) (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.NSData, orientation imageio.CGImagePropertyOrientation) (bool, error)
// Schedules one or more Vision requests to be performed on an image.
PerformRequestsOnImageURLError(requests []VNRequest, imageURL foundation.NSURL) (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.NSURL, orientation imageio.CGImagePropertyOrientation) (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 coremedia.CMTime, completionHandler VNRequestErrorHandler) 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() coremedia.CMTime
}
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 VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Graphics image of known orientation, executing the completion handler when done.
InitWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Image image.
InitWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a Core Image image of known orientation, executing the completion handler when done.
InitWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image in a pixel buffer.
InitWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image in a pixel buffer of known orientation.
InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request with a completion handler that targets an image in a sample buffer.
InitWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request with a completion handler that targets an image of a known orientation in a sample buffer.
InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image as raw data, executing the completion handler when done.
InitWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting a raw data image of known orientation, executing the completion handler when done.
InitWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image at the specified URL, executing the completion handler when done.
InitWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
// Creates a new request targeting an image of known orientation, at the specified URL, executing the completion handler when done.
InitWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 imageio.CGImagePropertyOrientation, 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 imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request that targets an image in a sample buffer.
InitWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request that targets an image of a known orientation in a sample buffer.
InitWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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 imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image as raw data.
InitWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting a raw data image of known orientation.
InitWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image at the specified URL.
InitWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTargetedImageRequest
// Creates a new request targeting an image of known orientation, at the specified URL.
InitWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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 VNRequestErrorHandler) VNTrackObjectRequest
}
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.
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 VNRequestErrorHandler) VNTrackRectangleRequest
}
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.
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.
IsLastFrame() 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.IsLastFrame: 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 moving average radius of the object the request is tracking.
MovingAverageRadius() float64
}
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.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
InitWithCoder(coder foundation.INSCoder) VNVector
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.NSURL) 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 coremedia.CMTimeRange) (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
}
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 corefoundation.CFTimeInterval) VNVideoProcessorTimeIntervalCadence
// The time interval of the cadence.
TimeInterval() corefoundation.CFTimeInterval
}
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 NewAnimalBodyPoseObservation
deprecated
func NewAnimalBodyPoseObservation() VNAnimalBodyPoseObservation
Deprecated: Use NewVNAnimalBodyPoseObservation instead.
func NewAnimalBodyPoseObservationWithCoder
deprecated
added in
v0.6.10
func NewAnimalBodyPoseObservationWithCoder(coder foundation.INSCoder) VNAnimalBodyPoseObservation
Deprecated: Use NewVNAnimalBodyPoseObservationWithCoder instead.
func NewVNAnimalBodyPoseObservation ¶
func NewVNAnimalBodyPoseObservation() VNAnimalBodyPoseObservation
NewVNAnimalBodyPoseObservation creates a new VNAnimalBodyPoseObservation instance.
func NewVNAnimalBodyPoseObservationWithCoder ¶
func NewVNAnimalBodyPoseObservationWithCoder(coder foundation.INSCoder) VNAnimalBodyPoseObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNAnimalBodyPoseObservationClass) Class ¶ added in v0.5.0
func (vc VNAnimalBodyPoseObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewBarcodeObservation
deprecated
func NewBarcodeObservation() VNBarcodeObservation
Deprecated: Use NewVNBarcodeObservation instead.
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight
deprecated
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNBarcodeObservation
Deprecated: Use NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight instead.
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft
deprecated
func NewBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNBarcodeObservation
Deprecated: Use NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft instead.
func NewBarcodeObservationWithBoundingBox
deprecated
func NewBarcodeObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNBarcodeObservation
Deprecated: Use NewVNBarcodeObservationWithBoundingBox instead.
func NewBarcodeObservationWithCoder
deprecated
added in
v0.6.10
func NewBarcodeObservationWithCoder(coder foundation.INSCoder) VNBarcodeObservation
Deprecated: Use NewVNBarcodeObservationWithCoder instead.
func NewBarcodeObservationWithRequestRevisionBoundingBox
deprecated
func NewBarcodeObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNBarcodeObservation
Deprecated: Use NewVNBarcodeObservationWithRequestRevisionBoundingBox instead.
func NewVNBarcodeObservation ¶
func NewVNBarcodeObservation() VNBarcodeObservation
NewVNBarcodeObservation creates a new VNBarcodeObservation instance.
func NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(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 NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewVNBarcodeObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(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 NewVNBarcodeObservationWithBoundingBox ¶
func NewVNBarcodeObservationWithBoundingBox(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 NewVNBarcodeObservationWithCoder ¶
func NewVNBarcodeObservationWithCoder(coder foundation.INSCoder) VNBarcodeObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNBarcodeObservationWithRequestRevisionBoundingBox ¶
func NewVNBarcodeObservationWithRequestRevisionBoundingBox(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 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.NSData
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.NSData
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.
func (VNBarcodeObservationClass) Class ¶ added in v0.5.0
func (vc VNBarcodeObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewCalculateImageAestheticsScoresRequest
deprecated
func NewCalculateImageAestheticsScoresRequest() VNCalculateImageAestheticsScoresRequest
Deprecated: Use NewVNCalculateImageAestheticsScoresRequest instead.
func NewCalculateImageAestheticsScoresRequestWithCompletionHandler
deprecated
func NewCalculateImageAestheticsScoresRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNCalculateImageAestheticsScoresRequest
Deprecated: Use NewVNCalculateImageAestheticsScoresRequestWithCompletionHandler instead.
func NewVNCalculateImageAestheticsScoresRequest ¶
func NewVNCalculateImageAestheticsScoresRequest() VNCalculateImageAestheticsScoresRequest
NewVNCalculateImageAestheticsScoresRequest creates a new VNCalculateImageAestheticsScoresRequest instance.
func NewVNCalculateImageAestheticsScoresRequestWithCompletionHandler ¶
func NewVNCalculateImageAestheticsScoresRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
func (VNCalculateImageAestheticsScoresRequestClass) Class ¶ added in v0.5.0
func (vc VNCalculateImageAestheticsScoresRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewCircle
deprecated
func NewCircle() VNCircle
Deprecated: Use NewVNCircle instead.
func NewCircleWithCenterDiameter
deprecated
Deprecated: Use NewVNCircleWithCenterDiameter instead.
func NewCircleWithCenterRadius
deprecated
Deprecated: Use NewVNCircleWithCenterRadius instead.
func NewCircleWithCoder
deprecated
added in
v0.6.10
func NewCircleWithCoder(coder foundation.INSCoder) VNCircle
Deprecated: Use NewVNCircleWithCoder instead.
func NewVNCircleWithCenterDiameter ¶
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 NewVNCircleWithCenterRadius ¶
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 NewVNCircleWithCoder ¶
func NewVNCircleWithCoder(coder foundation.INSCoder) VNCircle
See: https://developer.apple.com/documentation/Vision/VNCircle/init(coder:)
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) InitWithCoder ¶ added in v0.6.10
func (c VNCircle) InitWithCoder(coder foundation.INSCoder) VNCircle
See: https://developer.apple.com/documentation/Vision/VNCircle/init(coder:)
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) Class ¶ added in v0.5.0
func (vc VNCircleClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 modelDescription object has a non-`nil` value for its 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 NewClassificationObservation
deprecated
func NewClassificationObservation() VNClassificationObservation
Deprecated: Use NewVNClassificationObservation instead.
func NewClassificationObservationWithCoder
deprecated
added in
v0.6.10
func NewClassificationObservationWithCoder(coder foundation.INSCoder) VNClassificationObservation
Deprecated: Use NewVNClassificationObservationWithCoder instead.
func NewVNClassificationObservation ¶
func NewVNClassificationObservation() VNClassificationObservation
NewVNClassificationObservation creates a new VNClassificationObservation instance.
func NewVNClassificationObservationWithCoder ¶
func NewVNClassificationObservationWithCoder(coder foundation.INSCoder) VNClassificationObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
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.
func (VNClassificationObservationClass) Class ¶ added in v0.5.0
func (vc VNClassificationObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNClassifyImageRequest
func NewClassifyImageRequest
deprecated
func NewClassifyImageRequest() VNClassifyImageRequest
Deprecated: Use NewVNClassifyImageRequest instead.
func NewClassifyImageRequestWithCompletionHandler
deprecated
func NewClassifyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNClassifyImageRequest
Deprecated: Use NewVNClassifyImageRequestWithCompletionHandler instead.
func NewVNClassifyImageRequest ¶
func NewVNClassifyImageRequest() VNClassifyImageRequest
NewVNClassifyImageRequest creates a new VNClassifyImageRequest instance.
func NewVNClassifyImageRequestWithCompletionHandler ¶
func NewVNClassifyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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()
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.
func (VNClassifyImageRequestClass) Class ¶ added in v0.5.0
func (vc VNClassifyImageRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.NormalizedPoints: The contour’s array of points in normalized coordinates.
- 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 NewContour
deprecated
func NewContour() VNContour
Deprecated: Use NewVNContour instead.
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) IndexPath ¶
func (c VNContour) IndexPath() foundation.NSIndexPath
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 ¶
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
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.
func (VNContourClass) Class ¶ added in v0.5.0
func (vc VNContourClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewContoursObservation
deprecated
func NewContoursObservation() VNContoursObservation
Deprecated: Use NewVNContoursObservation instead.
func NewContoursObservationWithCoder
deprecated
added in
v0.6.10
func NewContoursObservationWithCoder(coder foundation.INSCoder) VNContoursObservation
Deprecated: Use NewVNContoursObservationWithCoder instead.
func NewVNContoursObservation ¶
func NewVNContoursObservation() VNContoursObservation
NewVNContoursObservation creates a new VNContoursObservation instance.
func NewVNContoursObservationWithCoder ¶
func NewVNContoursObservationWithCoder(coder foundation.INSCoder) VNContoursObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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 VNContoursObservation.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 foundation.NSIndexPath) (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 VNContoursObservation.ContourAtIndexPathError.
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) 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.
func (VNContoursObservationClass) Class ¶ added in v0.5.0
func (vc VNContoursObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 modelDescription object has a `nil` value for its predictedFeatureName property, or when it inserts its output in an outputDescriptionsByName dictionary.
Obtaining Feature Values ¶
- VNCoreMLFeatureValueObservation.FeatureValue: The feature result of a VNCoreMLRequest(<https://developer.apple.com/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 NewCoreMLFeatureValueObservation
deprecated
func NewCoreMLFeatureValueObservation() VNCoreMLFeatureValueObservation
Deprecated: Use NewVNCoreMLFeatureValueObservation instead.
func NewCoreMLFeatureValueObservationWithCoder
deprecated
added in
v0.6.10
func NewCoreMLFeatureValueObservationWithCoder(coder foundation.INSCoder) VNCoreMLFeatureValueObservation
Deprecated: Use NewVNCoreMLFeatureValueObservationWithCoder instead.
func NewVNCoreMLFeatureValueObservation ¶
func NewVNCoreMLFeatureValueObservation() VNCoreMLFeatureValueObservation
NewVNCoreMLFeatureValueObservation creates a new VNCoreMLFeatureValueObservation instance.
func NewVNCoreMLFeatureValueObservationWithCoder ¶
func NewVNCoreMLFeatureValueObservationWithCoder(coder foundation.INSCoder) VNCoreMLFeatureValueObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
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.
func (VNCoreMLFeatureValueObservationClass) Class ¶ added in v0.5.0
func (vc VNCoreMLFeatureValueObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewCoreMLModel
deprecated
func NewCoreMLModel() VNCoreMLModel
Deprecated: Use NewVNCoreMLModel instead.
func NewCoreMLModelForMLModelError
deprecated
func NewCoreMLModelForMLModelError(model *coreml.MLModel) (VNCoreMLModel, error)
Deprecated: Use NewVNCoreMLModelForMLModelError instead.
func NewVNCoreMLModel ¶
func NewVNCoreMLModel() VNCoreMLModel
NewVNCoreMLModel creates a new VNCoreMLModel instance.
func NewVNCoreMLModelForMLModelError ¶
func NewVNCoreMLModelForMLModelError(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 VNErrorInvalidModel error.
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel/init(for:)
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 VNCoreMLModel.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 VNCoreMLFeatureValueObservation.FeatureName instead.
See: https://developer.apple.com/documentation/Vision/VNCoreMLModel/inputImageFeatureName
func (VNCoreMLModel) SetFeatureProvider ¶
func (c VNCoreMLModel) SetFeatureProvider(value coreml.MLFeatureProvider)
func (VNCoreMLModel) SetInputImageFeatureName ¶
func (c VNCoreMLModel) SetInputImageFeatureName(value string)
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.
func (VNCoreMLModelClass) Class ¶ added in v0.5.0
func (vc VNCoreMLModelClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 modelDescription object has a non-`nil` value for 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
See: https://developer.apple.com/documentation/Vision/VNCoreMLRequest
func NewCoreMLRequest
deprecated
func NewCoreMLRequest() VNCoreMLRequest
Deprecated: Use NewVNCoreMLRequest instead.
func NewCoreMLRequestWithCompletionHandler
deprecated
func NewCoreMLRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNCoreMLRequest
Deprecated: Use NewVNCoreMLRequestWithCompletionHandler instead.
func NewCoreMLRequestWithModel
deprecated
func NewCoreMLRequestWithModel(model IVNCoreMLModel) VNCoreMLRequest
Deprecated: Use NewVNCoreMLRequestWithModel instead.
func NewCoreMLRequestWithModelCompletionHandler
deprecated
func NewCoreMLRequestWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestErrorHandler) VNCoreMLRequest
Deprecated: Use NewVNCoreMLRequestWithModelCompletionHandler instead.
func NewVNCoreMLRequest ¶
func NewVNCoreMLRequest() VNCoreMLRequest
NewVNCoreMLRequest creates a new VNCoreMLRequest instance.
func NewVNCoreMLRequestWithCompletionHandler ¶
func NewVNCoreMLRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNCoreMLRequestWithModel ¶
func NewVNCoreMLRequestWithModel(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.
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 NewVNCoreMLRequestWithModelCompletionHandler ¶
func NewVNCoreMLRequestWithModelCompletionHandler(model IVNCoreMLModel, completionHandler VNRequestErrorHandler) 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.
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 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) 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.
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 VNRequestErrorHandler) 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.
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) InitWithModelSync ¶ added in v0.6.17
func (c VNCoreMLRequest) InitWithModelSync(ctx context.Context, model IVNCoreMLModel) (*VNRequest, error)
InitWithModelSync is a synchronous wrapper around VNCoreMLRequest.InitWithModelCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
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) SetImageCropAndScaleOption ¶
func (c VNCoreMLRequest) SetImageCropAndScaleOption(value VNImageCropAndScaleOption)
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.
func (VNCoreMLRequestClass) Class ¶ added in v0.5.0
func (vc VNCoreMLRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNDetectAnimalBodyPoseRequest
func NewDetectAnimalBodyPoseRequest
deprecated
func NewDetectAnimalBodyPoseRequest() VNDetectAnimalBodyPoseRequest
Deprecated: Use NewVNDetectAnimalBodyPoseRequest instead.
func NewDetectAnimalBodyPoseRequestWithCompletionHandler
deprecated
func NewDetectAnimalBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectAnimalBodyPoseRequest
Deprecated: Use NewVNDetectAnimalBodyPoseRequestWithCompletionHandler instead.
func NewVNDetectAnimalBodyPoseRequest ¶
func NewVNDetectAnimalBodyPoseRequest() VNDetectAnimalBodyPoseRequest
NewVNDetectAnimalBodyPoseRequest creates a new VNDetectAnimalBodyPoseRequest instance.
func NewVNDetectAnimalBodyPoseRequestWithCompletionHandler ¶
func NewVNDetectAnimalBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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) 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) 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.
func (VNDetectAnimalBodyPoseRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectAnimalBodyPoseRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequest
func NewDetectBarcodesRequest
deprecated
func NewDetectBarcodesRequest() VNDetectBarcodesRequest
Deprecated: Use NewVNDetectBarcodesRequest instead.
func NewDetectBarcodesRequestWithCompletionHandler
deprecated
func NewDetectBarcodesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectBarcodesRequest
Deprecated: Use NewVNDetectBarcodesRequestWithCompletionHandler instead.
func NewVNDetectBarcodesRequest ¶
func NewVNDetectBarcodesRequest() VNDetectBarcodesRequest
NewVNDetectBarcodesRequest creates a new VNDetectBarcodesRequest instance.
func NewVNDetectBarcodesRequestWithCompletionHandler ¶
func NewVNDetectBarcodesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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
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.
func (VNDetectBarcodesRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectBarcodesRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
func (VNDetectBarcodesRequestClass) SupportedSymbologies ¶
func (_VNDetectBarcodesRequestClass VNDetectBarcodesRequestClass) SupportedSymbologies() []string
The array of barcode symbologies that the request supports.
Discussion ¶
Calling this method can be an expensive operation.
See: https://developer.apple.com/documentation/Vision/VNDetectBarcodesRequest/supportedSymbologies
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
- VNDetectContoursRequest.DetectDarkOnLight: A Boolean value that indicates whether the request detects a dark object on a light background.
- VNDetectContoursRequest.SetDetectDarkOnLight
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest
func NewDetectContoursRequest
deprecated
func NewDetectContoursRequest() VNDetectContoursRequest
Deprecated: Use NewVNDetectContoursRequest instead.
func NewDetectContoursRequestWithCompletionHandler
deprecated
func NewDetectContoursRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectContoursRequest
Deprecated: Use NewVNDetectContoursRequestWithCompletionHandler instead.
func NewVNDetectContoursRequest ¶
func NewVNDetectContoursRequest() VNDetectContoursRequest
NewVNDetectContoursRequest creates a new VNDetectContoursRequest instance.
func NewVNDetectContoursRequestWithCompletionHandler ¶
func NewVNDetectContoursRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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) DetectDarkOnLight ¶
func (d VNDetectContoursRequest) DetectDarkOnLight() bool
A Boolean value that indicates whether the request detects a dark object on a light background.
Discussion ¶
The default value is true.
See: https://developer.apple.com/documentation/Vision/VNDetectContoursRequest/detectDarkOnLight
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) SetDetectDarkOnLight ¶
func (d VNDetectContoursRequest) SetDetectDarkOnLight(value bool)
func (VNDetectContoursRequest) SetDetectsDarkOnLight ¶
func (d VNDetectContoursRequest) SetDetectsDarkOnLight(value bool)
func (VNDetectContoursRequest) SetMaximumImageDimension ¶
func (d VNDetectContoursRequest) SetMaximumImageDimension(value uint)
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.
func (VNDetectContoursRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectContoursRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNDetectDocumentSegmentationRequest
func NewDetectDocumentSegmentationRequest
deprecated
func NewDetectDocumentSegmentationRequest() VNDetectDocumentSegmentationRequest
Deprecated: Use NewVNDetectDocumentSegmentationRequest instead.
func NewDetectDocumentSegmentationRequestWithCompletionHandler
deprecated
func NewDetectDocumentSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectDocumentSegmentationRequest
Deprecated: Use NewVNDetectDocumentSegmentationRequestWithCompletionHandler instead.
func NewVNDetectDocumentSegmentationRequest ¶
func NewVNDetectDocumentSegmentationRequest() VNDetectDocumentSegmentationRequest
NewVNDetectDocumentSegmentationRequest creates a new VNDetectDocumentSegmentationRequest instance.
func NewVNDetectDocumentSegmentationRequestWithCompletionHandler ¶
func NewVNDetectDocumentSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNDetectDocumentSegmentationRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectDocumentSegmentationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceCaptureQualityRequest
func NewDetectFaceCaptureQualityRequest
deprecated
func NewDetectFaceCaptureQualityRequest() VNDetectFaceCaptureQualityRequest
Deprecated: Use NewVNDetectFaceCaptureQualityRequest instead.
func NewDetectFaceCaptureQualityRequestWithCompletionHandler
deprecated
func NewDetectFaceCaptureQualityRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceCaptureQualityRequest
Deprecated: Use NewVNDetectFaceCaptureQualityRequestWithCompletionHandler instead.
func NewVNDetectFaceCaptureQualityRequest ¶
func NewVNDetectFaceCaptureQualityRequest() VNDetectFaceCaptureQualityRequest
NewVNDetectFaceCaptureQualityRequest creates a new VNDetectFaceCaptureQualityRequest instance.
func NewVNDetectFaceCaptureQualityRequestWithCompletionHandler ¶
func NewVNDetectFaceCaptureQualityRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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) 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) SetInputFaceObservations ¶
func (o VNDetectFaceCaptureQualityRequest) SetInputFaceObservations(value []VNFaceObservation)
An array of VNFaceObservation objects to process as part of the request.
See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
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.
func (VNDetectFaceCaptureQualityRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectFaceCaptureQualityRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNDetectFaceLandmarksRequest
func NewDetectFaceLandmarksRequest
deprecated
func NewDetectFaceLandmarksRequest() VNDetectFaceLandmarksRequest
Deprecated: Use NewVNDetectFaceLandmarksRequest instead.
func NewDetectFaceLandmarksRequestWithCompletionHandler
deprecated
func NewDetectFaceLandmarksRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceLandmarksRequest
Deprecated: Use NewVNDetectFaceLandmarksRequestWithCompletionHandler instead.
func NewVNDetectFaceLandmarksRequest ¶
func NewVNDetectFaceLandmarksRequest() VNDetectFaceLandmarksRequest
NewVNDetectFaceLandmarksRequest creates a new VNDetectFaceLandmarksRequest instance.
func NewVNDetectFaceLandmarksRequestWithCompletionHandler ¶
func NewVNDetectFaceLandmarksRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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 VNRequestFaceLandmarksConstellationNotDefined.
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() []VNFaceObservation
An array of VNFaceObservation objects to process as part of the request.
See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
func (VNDetectFaceLandmarksRequest) SetConstellation ¶
func (d VNDetectFaceLandmarksRequest) SetConstellation(value VNRequestFaceLandmarksConstellation)
func (VNDetectFaceLandmarksRequest) SetInputFaceObservations ¶
func (o VNDetectFaceLandmarksRequest) SetInputFaceObservations(value []VNFaceObservation)
An array of VNFaceObservation objects to process as part of the request.
See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
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) Class ¶ added in v0.5.0
func (vc VNDetectFaceLandmarksRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNDetectFaceRectanglesRequest
func NewDetectFaceRectanglesRequest
deprecated
func NewDetectFaceRectanglesRequest() VNDetectFaceRectanglesRequest
Deprecated: Use NewVNDetectFaceRectanglesRequest instead.
func NewDetectFaceRectanglesRequestWithCompletionHandler
deprecated
func NewDetectFaceRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectFaceRectanglesRequest
Deprecated: Use NewVNDetectFaceRectanglesRequestWithCompletionHandler instead.
func NewVNDetectFaceRectanglesRequest ¶
func NewVNDetectFaceRectanglesRequest() VNDetectFaceRectanglesRequest
NewVNDetectFaceRectanglesRequest creates a new VNDetectFaceRectanglesRequest instance.
func NewVNDetectFaceRectanglesRequestWithCompletionHandler ¶
func NewVNDetectFaceRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNDetectFaceRectanglesRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectFaceRectanglesRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type VNDetectHorizonRequest ¶
type VNDetectHorizonRequest struct {
VNImageBasedRequest
}
An image-analysis request that determines the horizon angle in an image.
See: https://developer.apple.com/documentation/Vision/VNDetectHorizonRequest
func NewDetectHorizonRequest
deprecated
func NewDetectHorizonRequest() VNDetectHorizonRequest
Deprecated: Use NewVNDetectHorizonRequest instead.
func NewDetectHorizonRequestWithCompletionHandler
deprecated
func NewDetectHorizonRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHorizonRequest
Deprecated: Use NewVNDetectHorizonRequestWithCompletionHandler instead.
func NewVNDetectHorizonRequest ¶
func NewVNDetectHorizonRequest() VNDetectHorizonRequest
NewVNDetectHorizonRequest creates a new VNDetectHorizonRequest instance.
func NewVNDetectHorizonRequestWithCompletionHandler ¶
func NewVNDetectHorizonRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNDetectHorizonRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectHorizonRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPose3DRequest
func NewDetectHumanBodyPose3DRequest
deprecated
func NewDetectHumanBodyPose3DRequest() VNDetectHumanBodyPose3DRequest
Deprecated: Use NewVNDetectHumanBodyPose3DRequest instead.
func NewDetectHumanBodyPose3DRequestWithCompletionHandler
deprecated
func NewDetectHumanBodyPose3DRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequest
Deprecated: Use NewVNDetectHumanBodyPose3DRequestWithCompletionHandler instead.
func NewDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequest
Deprecated: Use NewVNDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewVNDetectHumanBodyPose3DRequest ¶
func NewVNDetectHumanBodyPose3DRequest() VNDetectHumanBodyPose3DRequest
NewVNDetectHumanBodyPose3DRequest creates a new VNDetectHumanBodyPose3DRequest instance.
func NewVNDetectHumanBodyPose3DRequestWithCompletionHandler ¶
func NewVNDetectHumanBodyPose3DRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPose3DRequest
Creates a new 3D body pose request with a completion handler.
completionHandler: The block to invoke after the request finishes processing.
func NewVNDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNDetectHumanBodyPose3DRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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) SupportedJointNamesAndReturnError ¶
func (d VNDetectHumanBodyPose3DRequest) SupportedJointNamesAndReturnError() ([]string, error)
Returns the joint names the request supports.
Return Value ¶
The array of joint name objects.
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.
func (VNDetectHumanBodyPose3DRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectHumanBodyPose3DRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNDetectHumanBodyPoseRequest
func NewDetectHumanBodyPoseRequest
deprecated
func NewDetectHumanBodyPoseRequest() VNDetectHumanBodyPoseRequest
Deprecated: Use NewVNDetectHumanBodyPoseRequest instead.
func NewDetectHumanBodyPoseRequestWithCompletionHandler
deprecated
func NewDetectHumanBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanBodyPoseRequest
Deprecated: Use NewVNDetectHumanBodyPoseRequestWithCompletionHandler instead.
func NewVNDetectHumanBodyPoseRequest ¶
func NewVNDetectHumanBodyPoseRequest() VNDetectHumanBodyPoseRequest
NewVNDetectHumanBodyPoseRequest creates a new VNDetectHumanBodyPoseRequest instance.
func NewVNDetectHumanBodyPoseRequestWithCompletionHandler ¶
func NewVNDetectHumanBodyPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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) 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) 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`.
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.
func (VNDetectHumanBodyPoseRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectHumanBodyPoseRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNDetectHumanHandPoseRequest
func NewDetectHumanHandPoseRequest
deprecated
func NewDetectHumanHandPoseRequest() VNDetectHumanHandPoseRequest
Deprecated: Use NewVNDetectHumanHandPoseRequest instead.
func NewDetectHumanHandPoseRequestWithCompletionHandler
deprecated
func NewDetectHumanHandPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanHandPoseRequest
Deprecated: Use NewVNDetectHumanHandPoseRequestWithCompletionHandler instead.
func NewVNDetectHumanHandPoseRequest ¶
func NewVNDetectHumanHandPoseRequest() VNDetectHumanHandPoseRequest
NewVNDetectHumanHandPoseRequest creates a new VNDetectHumanHandPoseRequest instance.
func NewVNDetectHumanHandPoseRequestWithCompletionHandler ¶
func NewVNDetectHumanHandPoseRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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) 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) 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`.
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.
func (VNDetectHumanHandPoseRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectHumanHandPoseRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNDetectHumanRectanglesRequest
func NewDetectHumanRectanglesRequest
deprecated
func NewDetectHumanRectanglesRequest() VNDetectHumanRectanglesRequest
Deprecated: Use NewVNDetectHumanRectanglesRequest instead.
func NewDetectHumanRectanglesRequestWithCompletionHandler
deprecated
func NewDetectHumanRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectHumanRectanglesRequest
Deprecated: Use NewVNDetectHumanRectanglesRequestWithCompletionHandler instead.
func NewVNDetectHumanRectanglesRequest ¶
func NewVNDetectHumanRectanglesRequest() VNDetectHumanRectanglesRequest
NewVNDetectHumanRectanglesRequest creates a new VNDetectHumanRectanglesRequest instance.
func NewVNDetectHumanRectanglesRequestWithCompletionHandler ¶
func NewVNDetectHumanRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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
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.
func (VNDetectHumanRectanglesRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectHumanRectanglesRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNDetectRectanglesRequest
func NewDetectRectanglesRequest
deprecated
func NewDetectRectanglesRequest() VNDetectRectanglesRequest
Deprecated: Use NewVNDetectRectanglesRequest instead.
func NewDetectRectanglesRequestWithCompletionHandler
deprecated
func NewDetectRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectRectanglesRequest
Deprecated: Use NewVNDetectRectanglesRequestWithCompletionHandler instead.
func NewVNDetectRectanglesRequest ¶
func NewVNDetectRectanglesRequest() VNDetectRectanglesRequest
NewVNDetectRectanglesRequest creates a new VNDetectRectanglesRequest instance.
func NewVNDetectRectanglesRequestWithCompletionHandler ¶
func NewVNDetectRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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)
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.
func (VNDetectRectanglesRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectRectanglesRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNDetectTextRectanglesRequest
func NewDetectTextRectanglesRequest
deprecated
func NewDetectTextRectanglesRequest() VNDetectTextRectanglesRequest
Deprecated: Use NewVNDetectTextRectanglesRequest instead.
func NewDetectTextRectanglesRequestWithCompletionHandler
deprecated
func NewDetectTextRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectTextRectanglesRequest
Deprecated: Use NewVNDetectTextRectanglesRequestWithCompletionHandler instead.
func NewVNDetectTextRectanglesRequest ¶
func NewVNDetectTextRectanglesRequest() VNDetectTextRectanglesRequest
NewVNDetectTextRectanglesRequest creates a new VNDetectTextRectanglesRequest instance.
func NewVNDetectTextRectanglesRequestWithCompletionHandler ¶
func NewVNDetectTextRectanglesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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)
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.
func (VNDetectTextRectanglesRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectTextRectanglesRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
- VNDetectTrajectoriesRequest.MinimumObjectSize: The minimum radius of the tracked shape’s bounding circle.
- VNDetectTrajectoriesRequest.SetMinimumObjectSize
- VNDetectTrajectoriesRequest.MaximumObjectSize: The maximum radius of the tracked shape’s bounding circle.
- VNDetectTrajectoriesRequest.SetMaximumObjectSize
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest
func NewDetectTrajectoriesRequest
deprecated
func NewDetectTrajectoriesRequest() VNDetectTrajectoriesRequest
Deprecated: Use NewVNDetectTrajectoriesRequest instead.
func NewDetectTrajectoriesRequestWithCompletionHandler
deprecated
func NewDetectTrajectoriesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequest
Deprecated: Use NewVNDetectTrajectoriesRequestWithCompletionHandler instead.
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequest
Deprecated: Use NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler
deprecated
func NewDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, completionHandler VNRequestErrorHandler) VNDetectTrajectoriesRequest
Deprecated: Use NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler instead.
func NewVNDetectTrajectoriesRequest ¶
func NewVNDetectTrajectoriesRequest() VNDetectTrajectoriesRequest
NewVNDetectTrajectoriesRequest creates a new VNDetectTrajectoriesRequest instance.
func NewVNDetectTrajectoriesRequestWithCompletionHandler ¶
func NewVNDetectTrajectoriesRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
func NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler ¶
func NewVNDetectTrajectoriesRequestWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, completionHandler VNRequestErrorHandler) 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.
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.
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) InitWithFrameAnalysisSpacingTrajectoryLength ¶ added in v0.6.17
func (d VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLength(ctx context.Context, frameAnalysisSpacing coremedia.CMTime, trajectoryLength int) (*VNRequest, error)
InitWithFrameAnalysisSpacingTrajectoryLength is a synchronous wrapper around VNDetectTrajectoriesRequest.InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler ¶
func (d VNDetectTrajectoriesRequest) InitWithFrameAnalysisSpacingTrajectoryLengthCompletionHandler(frameAnalysisSpacing coremedia.CMTime, trajectoryLength int, completionHandler VNRequestErrorHandler) 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.
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.
func (VNDetectTrajectoriesRequest) MaximumObjectSize ¶
func (d VNDetectTrajectoriesRequest) MaximumObjectSize() float32
The maximum radius of the tracked shape’s bounding circle.
Discussion ¶
Set the maximum size to filter out unwanted trajectories from larger objects moving through the scene. The default value is 1.0, which means to apply no filtering.
Changing this property value from frame to frame can produce erratic trajectories because objects either disappear or are added to the tracking based on this filtering.
Specify the size in normalized (0.0 to 1.0) coordinates.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest/maximumObjectSize
func (VNDetectTrajectoriesRequest) MinimumObjectSize ¶
func (d VNDetectTrajectoriesRequest) MinimumObjectSize() float32
The minimum radius of the tracked shape’s bounding circle.
Discussion ¶
Set the minimum size to filter out noise and small objects. The default value is `0`, which means to apply no filtering.
Changing this property value from frame to frame can produce erratic trajectories because objects either disappear or are added to the tracking based on this filtering.
Specify the size in normalized (0.0 to 1.0) coordinates.
See: https://developer.apple.com/documentation/Vision/VNDetectTrajectoriesRequest/minimumObjectSize
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) SetMaximumObjectSize ¶
func (d VNDetectTrajectoriesRequest) SetMaximumObjectSize(value float32)
func (VNDetectTrajectoriesRequest) SetMinimumObjectSize ¶
func (d VNDetectTrajectoriesRequest) SetMinimumObjectSize(value float32)
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 coremedia.CMTime)
func (VNDetectTrajectoriesRequest) TargetFrameTime ¶
func (d VNDetectTrajectoriesRequest) TargetFrameTime() coremedia.CMTime
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
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.
func (VNDetectTrajectoriesRequestClass) Class ¶ added in v0.5.0
func (vc VNDetectTrajectoriesRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewDetectedObjectObservation
deprecated
func NewDetectedObjectObservation() VNDetectedObjectObservation
Deprecated: Use NewVNDetectedObjectObservation instead.
func NewDetectedObjectObservationWithBoundingBox
deprecated
func NewDetectedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNDetectedObjectObservation
Deprecated: Use NewVNDetectedObjectObservationWithBoundingBox instead.
func NewDetectedObjectObservationWithCoder
deprecated
added in
v0.6.10
func NewDetectedObjectObservationWithCoder(coder foundation.INSCoder) VNDetectedObjectObservation
Deprecated: Use NewVNDetectedObjectObservationWithCoder instead.
func NewDetectedObjectObservationWithRequestRevisionBoundingBox
deprecated
func NewDetectedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNDetectedObjectObservation
Deprecated: Use NewVNDetectedObjectObservationWithRequestRevisionBoundingBox instead.
func NewVNDetectedObjectObservation ¶
func NewVNDetectedObjectObservation() VNDetectedObjectObservation
NewVNDetectedObjectObservation creates a new VNDetectedObjectObservation instance.
func NewVNDetectedObjectObservationWithBoundingBox ¶
func NewVNDetectedObjectObservationWithBoundingBox(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 NewVNDetectedObjectObservationWithCoder ¶
func NewVNDetectedObjectObservationWithCoder(coder foundation.INSCoder) VNDetectedObjectObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNDetectedObjectObservationWithRequestRevisionBoundingBox ¶
func NewVNDetectedObjectObservationWithRequestRevisionBoundingBox(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 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.
func (VNDetectedObjectObservationClass) Class ¶ added in v0.5.0
func (vc VNDetectedObjectObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewDetectedPoint
deprecated
func NewDetectedPoint() VNDetectedPoint
Deprecated: Use NewVNDetectedPoint instead.
func NewDetectedPointWithCoder
deprecated
added in
v0.6.10
func NewDetectedPointWithCoder(coder foundation.INSCoder) VNDetectedPoint
Deprecated: Use NewVNDetectedPointWithCoder instead.
func NewDetectedPointWithLocation
deprecated
func NewDetectedPointWithLocation(location corefoundation.CGPoint) VNDetectedPoint
Deprecated: Use NewVNDetectedPointWithLocation instead.
func NewDetectedPointWithXY
deprecated
func NewDetectedPointWithXY(x float64, y float64) VNDetectedPoint
Deprecated: Use NewVNDetectedPointWithXY instead.
func NewVNDetectedPoint ¶
func NewVNDetectedPoint() VNDetectedPoint
NewVNDetectedPoint creates a new VNDetectedPoint instance.
func NewVNDetectedPointWithCoder ¶
func NewVNDetectedPointWithCoder(coder foundation.INSCoder) VNDetectedPoint
See: https://developer.apple.com/documentation/Vision/VNPoint/init(coder:)
func NewVNDetectedPointWithLocation ¶
func NewVNDetectedPointWithLocation(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 NewVNDetectedPointWithXY ¶
func NewVNDetectedPointWithXY(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 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.
func (VNDetectedPointClass) Class ¶ added in v0.5.0
func (vc VNDetectedPointClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type VNElementType ¶
type VNElementType uint
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 NewFaceLandmarkRegion
deprecated
func NewFaceLandmarkRegion() VNFaceLandmarkRegion
Deprecated: Use NewVNFaceLandmarkRegion instead.
func NewFaceLandmarkRegionWithCoder
deprecated
added in
v0.6.10
func NewFaceLandmarkRegionWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion
Deprecated: Use NewVNFaceLandmarkRegionWithCoder instead.
func NewVNFaceLandmarkRegion ¶
func NewVNFaceLandmarkRegion() VNFaceLandmarkRegion
NewVNFaceLandmarkRegion creates a new VNFaceLandmarkRegion instance.
func NewVNFaceLandmarkRegionWithCoder ¶
func NewVNFaceLandmarkRegionWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion/init(coder:)
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) InitWithCoder ¶ added in v0.6.10
func (f VNFaceLandmarkRegion) InitWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion/init(coder:)
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
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.
Specifying Region Properties ¶
- VNFaceLandmarkRegion2D.NormalizedPoints: A buffer in memory containing normalized landmark points.
- VNFaceLandmarkRegion2D.PrecisionEstimatesPerPoint: An array of precision estimates for each landmark point.
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion2D
func NewFaceLandmarkRegion2D
deprecated
func NewFaceLandmarkRegion2D() VNFaceLandmarkRegion2D
Deprecated: Use NewVNFaceLandmarkRegion2D instead.
func NewFaceLandmarkRegion2DWithCoder
deprecated
added in
v0.6.10
func NewFaceLandmarkRegion2DWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion2D
Deprecated: Use NewVNFaceLandmarkRegion2DWithCoder instead.
func NewVNFaceLandmarkRegion2D ¶
func NewVNFaceLandmarkRegion2D() VNFaceLandmarkRegion2D
NewVNFaceLandmarkRegion2D creates a new VNFaceLandmarkRegion2D instance.
func NewVNFaceLandmarkRegion2DWithCoder ¶
func NewVNFaceLandmarkRegion2DWithCoder(coder foundation.INSCoder) VNFaceLandmarkRegion2D
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarkRegion/init(coder:)
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 VNRequestFaceLandmarksConstellation76Points. 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.
func (VNFaceLandmarkRegion2DClass) Class ¶ added in v0.5.0
func (vc VNFaceLandmarkRegion2DClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
func (VNFaceLandmarkRegionClass) Class ¶ added in v0.5.0
func (vc VNFaceLandmarkRegionClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewFaceLandmarks
deprecated
func NewFaceLandmarks() VNFaceLandmarks
Deprecated: Use NewVNFaceLandmarks instead.
func NewFaceLandmarksWithCoder
deprecated
added in
v0.6.10
func NewFaceLandmarksWithCoder(coder foundation.INSCoder) VNFaceLandmarks
Deprecated: Use NewVNFaceLandmarksWithCoder instead.
func NewVNFaceLandmarks ¶
func NewVNFaceLandmarks() VNFaceLandmarks
NewVNFaceLandmarks creates a new VNFaceLandmarks instance.
func NewVNFaceLandmarksWithCoder ¶
func NewVNFaceLandmarksWithCoder(coder foundation.INSCoder) VNFaceLandmarks
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks/init(coder:)
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) InitWithCoder ¶ added in v0.6.10
func (f VNFaceLandmarks) InitWithCoder(coder foundation.INSCoder) VNFaceLandmarks
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks/init(coder:)
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
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 VNDetectedObjectObservation.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 NewFaceLandmarks2D
deprecated
func NewFaceLandmarks2D() VNFaceLandmarks2D
Deprecated: Use NewVNFaceLandmarks2D instead.
func NewFaceLandmarks2DWithCoder
deprecated
added in
v0.6.10
func NewFaceLandmarks2DWithCoder(coder foundation.INSCoder) VNFaceLandmarks2D
Deprecated: Use NewVNFaceLandmarks2DWithCoder instead.
func NewVNFaceLandmarks2D ¶
func NewVNFaceLandmarks2D() VNFaceLandmarks2D
NewVNFaceLandmarks2D creates a new VNFaceLandmarks2D instance.
func NewVNFaceLandmarks2DWithCoder ¶
func NewVNFaceLandmarks2DWithCoder(coder foundation.INSCoder) VNFaceLandmarks2D
See: https://developer.apple.com/documentation/Vision/VNFaceLandmarks/init(coder:)
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) 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
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.
func (VNFaceLandmarks2DClass) Class ¶ added in v0.5.0
func (vc VNFaceLandmarks2DClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
func (VNFaceLandmarksClass) Class ¶ added in v0.5.0
func (vc VNFaceLandmarksClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
Determining Capture Quality ¶
- VNFaceObservation.FaceCaptureQuality: A value that indicates the quality of the face capture.
See: https://developer.apple.com/documentation/Vision/VNFaceObservation
func NewFaceObservation
deprecated
func NewFaceObservation() VNFaceObservation
Deprecated: Use NewVNFaceObservation instead.
func NewFaceObservationWithBoundingBox
deprecated
func NewFaceObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNFaceObservation
Deprecated: Use NewVNFaceObservationWithBoundingBox instead.
func NewFaceObservationWithCoder
deprecated
added in
v0.6.10
func NewFaceObservationWithCoder(coder foundation.INSCoder) VNFaceObservation
Deprecated: Use NewVNFaceObservationWithCoder instead.
func NewFaceObservationWithRequestRevisionBoundingBox
deprecated
func NewFaceObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNFaceObservation
Deprecated: Use NewVNFaceObservationWithRequestRevisionBoundingBox instead.
func NewFaceObservationWithRequestRevisionBoundingBoxRollYaw
deprecated
func NewFaceObservationWithRequestRevisionBoundingBoxRollYaw(requestRevision uint, boundingBox corefoundation.CGRect, roll foundation.NSNumber, yaw foundation.NSNumber) VNFaceObservation
Deprecated: Use NewVNFaceObservationWithRequestRevisionBoundingBoxRollYaw instead.
func NewFaceObservationWithRequestRevisionBoundingBoxRollYawPitch
deprecated
func NewFaceObservationWithRequestRevisionBoundingBoxRollYawPitch(requestRevision uint, boundingBox corefoundation.CGRect, roll foundation.NSNumber, yaw foundation.NSNumber, pitch foundation.NSNumber) VNFaceObservation
Deprecated: Use NewVNFaceObservationWithRequestRevisionBoundingBoxRollYawPitch instead.
func NewVNFaceObservation ¶
func NewVNFaceObservation() VNFaceObservation
NewVNFaceObservation creates a new VNFaceObservation instance.
func NewVNFaceObservationWithBoundingBox ¶
func NewVNFaceObservationWithBoundingBox(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 NewVNFaceObservationWithCoder ¶
func NewVNFaceObservationWithCoder(coder foundation.INSCoder) VNFaceObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNFaceObservationWithRequestRevisionBoundingBox ¶
func NewVNFaceObservationWithRequestRevisionBoundingBox(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 NewVNFaceObservationWithRequestRevisionBoundingBoxRollYaw ¶
func NewVNFaceObservationWithRequestRevisionBoundingBoxRollYaw(requestRevision uint, boundingBox corefoundation.CGRect, roll foundation.NSNumber, yaw foundation.NSNumber) VNFaceObservation
Creates an observation that contains the roll and yaw 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.
func NewVNFaceObservationWithRequestRevisionBoundingBoxRollYawPitch ¶
func NewVNFaceObservationWithRequestRevisionBoundingBoxRollYawPitch(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 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) 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) 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](<https://developer.apple.com/documentation/Vision/VNFaceObservation>) objects to process as part of the request.
//
// See: https://developer.apple.com/documentation/Vision/VNFaceObservationAccepting/inputFaceObservations
InputFaceObservations() []VNFaceObservation
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.
func (VNFaceObservationClass) Class ¶ added in v0.5.0
func (vc VNFaceObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewFeaturePrintObservation
deprecated
func NewFeaturePrintObservation() VNFeaturePrintObservation
Deprecated: Use NewVNFeaturePrintObservation instead.
func NewFeaturePrintObservationWithCoder
deprecated
added in
v0.6.10
func NewFeaturePrintObservationWithCoder(coder foundation.INSCoder) VNFeaturePrintObservation
Deprecated: Use NewVNFeaturePrintObservationWithCoder instead.
func NewVNFeaturePrintObservation ¶
func NewVNFeaturePrintObservation() VNFeaturePrintObservation
NewVNFeaturePrintObservation creates a new VNFeaturePrintObservation instance.
func NewVNFeaturePrintObservationWithCoder ¶
func NewVNFeaturePrintObservationWithCoder(coder foundation.INSCoder) VNFeaturePrintObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.NSData
The feature print data.
Discussion ¶
The data is divided into separate elements. Determine the type of element using VNFeaturePrintObservation.ElementType, and the number of elements using VNFeaturePrintObservation.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.
func (VNFeaturePrintObservationClass) Class ¶ added in v0.5.0
func (vc VNFeaturePrintObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNGenerateAttentionBasedSaliencyImageRequest
func NewGenerateAttentionBasedSaliencyImageRequest
deprecated
func NewGenerateAttentionBasedSaliencyImageRequest() VNGenerateAttentionBasedSaliencyImageRequest
Deprecated: Use NewVNGenerateAttentionBasedSaliencyImageRequest instead.
func NewGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler
deprecated
func NewGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateAttentionBasedSaliencyImageRequest
Deprecated: Use NewVNGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler instead.
func NewVNGenerateAttentionBasedSaliencyImageRequest ¶
func NewVNGenerateAttentionBasedSaliencyImageRequest() VNGenerateAttentionBasedSaliencyImageRequest
NewVNGenerateAttentionBasedSaliencyImageRequest creates a new VNGenerateAttentionBasedSaliencyImageRequest instance.
func NewVNGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler ¶
func NewVNGenerateAttentionBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNGenerateAttentionBasedSaliencyImageRequestClass) Class ¶ added in v0.5.0
func (vc VNGenerateAttentionBasedSaliencyImageRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewGenerateForegroundInstanceMaskRequest
deprecated
func NewGenerateForegroundInstanceMaskRequest() VNGenerateForegroundInstanceMaskRequest
Deprecated: Use NewVNGenerateForegroundInstanceMaskRequest instead.
func NewGenerateForegroundInstanceMaskRequestWithCompletionHandler
deprecated
func NewGenerateForegroundInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateForegroundInstanceMaskRequest
Deprecated: Use NewVNGenerateForegroundInstanceMaskRequestWithCompletionHandler instead.
func NewVNGenerateForegroundInstanceMaskRequest ¶
func NewVNGenerateForegroundInstanceMaskRequest() VNGenerateForegroundInstanceMaskRequest
NewVNGenerateForegroundInstanceMaskRequest creates a new VNGenerateForegroundInstanceMaskRequest instance.
func NewVNGenerateForegroundInstanceMaskRequestWithCompletionHandler ¶
func NewVNGenerateForegroundInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNGenerateForegroundInstanceMaskRequestClass) Class ¶ added in v0.5.0
func (vc VNGenerateForegroundInstanceMaskRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNGenerateImageFeaturePrintRequest
func NewGenerateImageFeaturePrintRequest
deprecated
func NewGenerateImageFeaturePrintRequest() VNGenerateImageFeaturePrintRequest
Deprecated: Use NewVNGenerateImageFeaturePrintRequest instead.
func NewGenerateImageFeaturePrintRequestWithCompletionHandler
deprecated
func NewGenerateImageFeaturePrintRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateImageFeaturePrintRequest
Deprecated: Use NewVNGenerateImageFeaturePrintRequestWithCompletionHandler instead.
func NewVNGenerateImageFeaturePrintRequest ¶
func NewVNGenerateImageFeaturePrintRequest() VNGenerateImageFeaturePrintRequest
NewVNGenerateImageFeaturePrintRequest creates a new VNGenerateImageFeaturePrintRequest instance.
func NewVNGenerateImageFeaturePrintRequestWithCompletionHandler ¶
func NewVNGenerateImageFeaturePrintRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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 VNImageCropAndScaleOptionScaleFill.
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)
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.
func (VNGenerateImageFeaturePrintRequestClass) Class ¶ added in v0.5.0
func (vc VNGenerateImageFeaturePrintRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNGenerateObjectnessBasedSaliencyImageRequest
func NewGenerateObjectnessBasedSaliencyImageRequest
deprecated
func NewGenerateObjectnessBasedSaliencyImageRequest() VNGenerateObjectnessBasedSaliencyImageRequest
Deprecated: Use NewVNGenerateObjectnessBasedSaliencyImageRequest instead.
func NewGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler
deprecated
func NewGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateObjectnessBasedSaliencyImageRequest
Deprecated: Use NewVNGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler instead.
func NewVNGenerateObjectnessBasedSaliencyImageRequest ¶
func NewVNGenerateObjectnessBasedSaliencyImageRequest() VNGenerateObjectnessBasedSaliencyImageRequest
NewVNGenerateObjectnessBasedSaliencyImageRequest creates a new VNGenerateObjectnessBasedSaliencyImageRequest instance.
func NewVNGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler ¶
func NewVNGenerateObjectnessBasedSaliencyImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNGenerateObjectnessBasedSaliencyImageRequestClass) Class ¶ added in v0.5.0
func (vc VNGenerateObjectnessBasedSaliencyImageRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
See: https://developer.apple.com/documentation/Vision/VNGenerateOpticalFlowRequest
func NewGenerateOpticalFlowRequest
deprecated
func NewGenerateOpticalFlowRequest() VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequest instead.
func NewGenerateOpticalFlowRequestWithCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler instead.
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions instead.
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler
deprecated
func NewGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Deprecated: Use NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler instead.
func NewVNGenerateOpticalFlowRequest ¶
func NewVNGenerateOpticalFlowRequest() VNGenerateOpticalFlowRequest
NewVNGenerateOpticalFlowRequest creates a new VNGenerateOpticalFlowRequest instance.
func NewVNGenerateOpticalFlowRequestWithCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptions(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 NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating 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 NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The CIImage encapsulating 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNGenerateOpticalFlowRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid imageBuffer.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientation values.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientations.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptions(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 NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptions(imageData foundation.NSData, 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 NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, 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 NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewVNGenerateOpticalFlowRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
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 VNGenerateOpticalFlowRequest.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)
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.
func (VNGenerateOpticalFlowRequestClass) Class ¶ added in v0.5.0
func (vc VNGenerateOpticalFlowRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type VNGenerateOpticalFlowRequestComputationAccuracy ¶
type VNGenerateOpticalFlowRequestComputationAccuracy uint
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.
See: https://developer.apple.com/documentation/Vision/VNGeneratePersonInstanceMaskRequest
func NewGeneratePersonInstanceMaskRequest
deprecated
func NewGeneratePersonInstanceMaskRequest() VNGeneratePersonInstanceMaskRequest
Deprecated: Use NewVNGeneratePersonInstanceMaskRequest instead.
func NewGeneratePersonInstanceMaskRequestWithCompletionHandler
deprecated
func NewGeneratePersonInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonInstanceMaskRequest
Deprecated: Use NewVNGeneratePersonInstanceMaskRequestWithCompletionHandler instead.
func NewVNGeneratePersonInstanceMaskRequest ¶
func NewVNGeneratePersonInstanceMaskRequest() VNGeneratePersonInstanceMaskRequest
NewVNGeneratePersonInstanceMaskRequest creates a new VNGeneratePersonInstanceMaskRequest instance.
func NewVNGeneratePersonInstanceMaskRequestWithCompletionHandler ¶
func NewVNGeneratePersonInstanceMaskRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
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.
func (VNGeneratePersonInstanceMaskRequestClass) Class ¶ added in v0.5.0
func (vc VNGeneratePersonInstanceMaskRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNGeneratePersonSegmentationRequest
func NewGeneratePersonSegmentationRequest
deprecated
func NewGeneratePersonSegmentationRequest() VNGeneratePersonSegmentationRequest
Deprecated: Use NewVNGeneratePersonSegmentationRequest instead.
func NewGeneratePersonSegmentationRequestWithCompletionHandler
deprecated
func NewGeneratePersonSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonSegmentationRequest
Deprecated: Use NewVNGeneratePersonSegmentationRequestWithCompletionHandler instead.
func NewGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNGeneratePersonSegmentationRequest
Deprecated: Use NewVNGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewVNGeneratePersonSegmentationRequest ¶
func NewVNGeneratePersonSegmentationRequest() VNGeneratePersonSegmentationRequest
NewVNGeneratePersonSegmentationRequest creates a new VNGeneratePersonSegmentationRequest instance.
func NewVNGeneratePersonSegmentationRequestWithCompletionHandler ¶
func NewVNGeneratePersonSegmentationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNGeneratePersonSegmentationRequest
Creates a generate person segmentation request with a completion handler.
completionHandler: A completion handler that processes the resuts of the request.
func NewVNGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNGeneratePersonSegmentationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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.
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.
func (VNGeneratePersonSegmentationRequestClass) Class ¶ added in v0.5.0
func (vc VNGeneratePersonSegmentationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type VNGeneratePersonSegmentationRequestQualityLevel ¶
type VNGeneratePersonSegmentationRequestQualityLevel uint
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 NewGeometryUtils
deprecated
func NewGeometryUtils() VNGeometryUtils
Deprecated: Use NewVNGeometryUtils instead.
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 *[2]float32, 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.
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.
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:)
func (VNGeometryUtilsClass) Class ¶ added in v0.5.0
func (vc VNGeometryUtilsClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 homography is an isomorphism of projected spaces, a bijection that maps lines to lines.
See: https://developer.apple.com/documentation/Vision/VNHomographicImageRegistrationRequest
func NewHomographicImageRegistrationRequest
deprecated
func NewHomographicImageRegistrationRequest() VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequest instead.
func NewHomographicImageRegistrationRequestWithCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler instead.
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions instead.
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler
deprecated
func NewHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Deprecated: Use NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler instead.
func NewVNHomographicImageRegistrationRequest ¶
func NewVNHomographicImageRegistrationRequest() VNHomographicImageRegistrationRequest
NewVNHomographicImageRegistrationRequest creates a new VNHomographicImageRegistrationRequest instance.
func NewVNHomographicImageRegistrationRequestWithCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptions(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 NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating 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 NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The CIImage encapsulating 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNHomographicImageRegistrationRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid imageBuffer.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientation values.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientations.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptions(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 NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, 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 NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, 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 NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewVNHomographicImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
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.
type VNHomographicImageRegistrationRequestClass ¶
type VNHomographicImageRegistrationRequestClass struct {
// contains filtered or unexported fields
}
func GetVNHomographicImageRegistrationRequestClass ¶
func GetVNHomographicImageRegistrationRequestClass() VNHomographicImageRegistrationRequestClass
GetVNHomographicImageRegistrationRequestClass returns the class object for VNHomographicImageRegistrationRequest.
func (VNHomographicImageRegistrationRequestClass) Alloc ¶
Alloc allocates memory for a new instance of the class.
func (VNHomographicImageRegistrationRequestClass) Class ¶ added in v0.5.0
func (vc VNHomographicImageRegistrationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewHorizonObservation
deprecated
func NewHorizonObservation() VNHorizonObservation
Deprecated: Use NewVNHorizonObservation instead.
func NewHorizonObservationWithCoder
deprecated
added in
v0.6.10
func NewHorizonObservationWithCoder(coder foundation.INSCoder) VNHorizonObservation
Deprecated: Use NewVNHorizonObservationWithCoder instead.
func NewVNHorizonObservation ¶
func NewVNHorizonObservation() VNHorizonObservation
NewVNHorizonObservation creates a new VNHorizonObservation instance.
func NewVNHorizonObservationWithCoder ¶
func NewVNHorizonObservationWithCoder(coder foundation.INSCoder) VNHorizonObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNHorizonObservationClass) Class ¶ added in v0.5.0
func (vc VNHorizonObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation
func NewHumanBodyPose3DObservation
deprecated
func NewHumanBodyPose3DObservation() VNHumanBodyPose3DObservation
Deprecated: Use NewVNHumanBodyPose3DObservation instead.
func NewHumanBodyPose3DObservationWithCoder
deprecated
added in
v0.6.10
func NewHumanBodyPose3DObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPose3DObservation
Deprecated: Use NewVNHumanBodyPose3DObservationWithCoder instead.
func NewVNHumanBodyPose3DObservation ¶
func NewVNHumanBodyPose3DObservation() VNHumanBodyPose3DObservation
NewVNHumanBodyPose3DObservation creates a new VNHumanBodyPose3DObservation instance.
func NewVNHumanBodyPose3DObservationWithCoder ¶
func NewVNHumanBodyPose3DObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPose3DObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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 VNHumanBodyPose3DObservation.HeightEstimation is VNHumanBodyPose3DObservationHeightEstimationMeasured; otherwise, it returns a VNHumanBodyPose3DObservationHeightEstimationReference height.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyPose3DObservation/bodyHeight
func (VNHumanBodyPose3DObservation) GetCameraRelativePositionForJointNameError ¶
func (h VNHumanBodyPose3DObservation) GetCameraRelativePositionForJointNameError(modelPositionOut *[4][4]float32, 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`.
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.
func (VNHumanBodyPose3DObservationClass) Class ¶ added in v0.5.0
func (vc VNHumanBodyPose3DObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewHumanBodyPoseObservation
deprecated
func NewHumanBodyPoseObservation() VNHumanBodyPoseObservation
Deprecated: Use NewVNHumanBodyPoseObservation instead.
func NewHumanBodyPoseObservationWithCoder
deprecated
added in
v0.6.10
func NewHumanBodyPoseObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPoseObservation
Deprecated: Use NewVNHumanBodyPoseObservationWithCoder instead.
func NewVNHumanBodyPoseObservation ¶
func NewVNHumanBodyPoseObservation() VNHumanBodyPoseObservation
NewVNHumanBodyPoseObservation creates a new VNHumanBodyPoseObservation instance.
func NewVNHumanBodyPoseObservationWithCoder ¶
func NewVNHumanBodyPoseObservationWithCoder(coder foundation.INSCoder) VNHumanBodyPoseObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNHumanBodyPoseObservationClass) Class ¶ added in v0.5.0
func (vc VNHumanBodyPoseObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 Parent Joint ¶
- VNHumanBodyRecognizedPoint3D.ParentJoint: The parent joint in the observation.
See: https://developer.apple.com/documentation/Vision/VNHumanBodyRecognizedPoint3D
func NewHumanBodyRecognizedPoint3D
deprecated
func NewHumanBodyRecognizedPoint3D() VNHumanBodyRecognizedPoint3D
Deprecated: Use NewVNHumanBodyRecognizedPoint3D instead.
func NewHumanBodyRecognizedPoint3DWithCoder
deprecated
added in
v0.6.10
func NewHumanBodyRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNHumanBodyRecognizedPoint3D
Deprecated: Use NewVNHumanBodyRecognizedPoint3DWithCoder instead.
func NewHumanBodyRecognizedPoint3DWithPosition
deprecated
func NewHumanBodyRecognizedPoint3DWithPosition(position [4][4]float32) VNHumanBodyRecognizedPoint3D
Deprecated: Use NewVNHumanBodyRecognizedPoint3DWithPosition instead.
func NewVNHumanBodyRecognizedPoint3D ¶
func NewVNHumanBodyRecognizedPoint3D() VNHumanBodyRecognizedPoint3D
NewVNHumanBodyRecognizedPoint3D creates a new VNHumanBodyRecognizedPoint3D instance.
func NewVNHumanBodyRecognizedPoint3DWithCoder ¶
func NewVNHumanBodyRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNHumanBodyRecognizedPoint3D
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(coder:)
func NewVNHumanBodyRecognizedPoint3DWithPosition ¶
func NewVNHumanBodyRecognizedPoint3DWithPosition(position [4][4]float32) 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:)
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) 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.
func (VNHumanBodyRecognizedPoint3DClass) Class ¶ added in v0.5.0
func (vc VNHumanBodyRecognizedPoint3DClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewHumanHandPoseObservation
deprecated
func NewHumanHandPoseObservation() VNHumanHandPoseObservation
Deprecated: Use NewVNHumanHandPoseObservation instead.
func NewHumanHandPoseObservationWithCoder
deprecated
added in
v0.6.10
func NewHumanHandPoseObservationWithCoder(coder foundation.INSCoder) VNHumanHandPoseObservation
Deprecated: Use NewVNHumanHandPoseObservationWithCoder instead.
func NewVNHumanHandPoseObservation ¶
func NewVNHumanHandPoseObservation() VNHumanHandPoseObservation
NewVNHumanHandPoseObservation creates a new VNHumanHandPoseObservation instance.
func NewVNHumanHandPoseObservationWithCoder ¶
func NewVNHumanHandPoseObservationWithCoder(coder foundation.INSCoder) VNHumanHandPoseObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNHumanHandPoseObservationClass) Class ¶ added in v0.5.0
func (vc VNHumanHandPoseObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewHumanObservation
deprecated
func NewHumanObservation() VNHumanObservation
Deprecated: Use NewVNHumanObservation instead.
func NewHumanObservationWithBoundingBox
deprecated
func NewHumanObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNHumanObservation
Deprecated: Use NewVNHumanObservationWithBoundingBox instead.
func NewHumanObservationWithCoder
deprecated
added in
v0.6.10
func NewHumanObservationWithCoder(coder foundation.INSCoder) VNHumanObservation
Deprecated: Use NewVNHumanObservationWithCoder instead.
func NewHumanObservationWithRequestRevisionBoundingBox
deprecated
func NewHumanObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNHumanObservation
Deprecated: Use NewVNHumanObservationWithRequestRevisionBoundingBox instead.
func NewVNHumanObservation ¶
func NewVNHumanObservation() VNHumanObservation
NewVNHumanObservation creates a new VNHumanObservation instance.
func NewVNHumanObservationWithBoundingBox ¶
func NewVNHumanObservationWithBoundingBox(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 NewVNHumanObservationWithCoder ¶
func NewVNHumanObservationWithCoder(coder foundation.INSCoder) VNHumanObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNHumanObservationWithRequestRevisionBoundingBox ¶
func NewVNHumanObservationWithRequestRevisionBoundingBox(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 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.
func (VNHumanObservationClass) Class ¶ added in v0.5.0
func (vc VNHumanObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewImageAestheticsScoresObservation
deprecated
func NewImageAestheticsScoresObservation() VNImageAestheticsScoresObservation
Deprecated: Use NewVNImageAestheticsScoresObservation instead.
func NewImageAestheticsScoresObservationWithCoder
deprecated
added in
v0.6.10
func NewImageAestheticsScoresObservationWithCoder(coder foundation.INSCoder) VNImageAestheticsScoresObservation
Deprecated: Use NewVNImageAestheticsScoresObservationWithCoder instead.
func NewVNImageAestheticsScoresObservation ¶
func NewVNImageAestheticsScoresObservation() VNImageAestheticsScoresObservation
NewVNImageAestheticsScoresObservation creates a new VNImageAestheticsScoresObservation instance.
func NewVNImageAestheticsScoresObservationWithCoder ¶
func NewVNImageAestheticsScoresObservationWithCoder(coder foundation.INSCoder) VNImageAestheticsScoresObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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
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.
func (VNImageAestheticsScoresObservationClass) Class ¶ added in v0.5.0
func (vc VNImageAestheticsScoresObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewImageAlignmentObservation
deprecated
func NewImageAlignmentObservation() VNImageAlignmentObservation
Deprecated: Use NewVNImageAlignmentObservation instead.
func NewImageAlignmentObservationWithCoder
deprecated
added in
v0.6.10
func NewImageAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageAlignmentObservation
Deprecated: Use NewVNImageAlignmentObservationWithCoder instead.
func NewVNImageAlignmentObservation ¶
func NewVNImageAlignmentObservation() VNImageAlignmentObservation
NewVNImageAlignmentObservation creates a new VNImageAlignmentObservation instance.
func NewVNImageAlignmentObservationWithCoder ¶
func NewVNImageAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageAlignmentObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNImageAlignmentObservationClass) Class ¶ added in v0.5.0
func (vc VNImageAlignmentObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewImageBasedRequest
deprecated
func NewImageBasedRequest() VNImageBasedRequest
Deprecated: Use NewVNImageBasedRequest instead.
func NewImageBasedRequestWithCompletionHandler
deprecated
func NewImageBasedRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNImageBasedRequest
Deprecated: Use NewVNImageBasedRequestWithCompletionHandler instead.
func NewVNImageBasedRequest ¶
func NewVNImageBasedRequest() VNImageBasedRequest
NewVNImageBasedRequest creates a new VNImageBasedRequest instance.
func NewVNImageBasedRequestWithCompletionHandler ¶
func NewVNImageBasedRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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.
func (VNImageBasedRequestClass) Class ¶ added in v0.5.0
func (vc VNImageBasedRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type VNImageCropAndScaleOption ¶
type VNImageCropAndScaleOption uint
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 = 258 // 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 = 257 )
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 NewImageHomographicAlignmentObservation
deprecated
func NewImageHomographicAlignmentObservation() VNImageHomographicAlignmentObservation
Deprecated: Use NewVNImageHomographicAlignmentObservation instead.
func NewImageHomographicAlignmentObservationWithCoder
deprecated
added in
v0.6.10
func NewImageHomographicAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageHomographicAlignmentObservation
Deprecated: Use NewVNImageHomographicAlignmentObservationWithCoder instead.
func NewVNImageHomographicAlignmentObservation ¶
func NewVNImageHomographicAlignmentObservation() VNImageHomographicAlignmentObservation
NewVNImageHomographicAlignmentObservation creates a new VNImageHomographicAlignmentObservation instance.
func NewVNImageHomographicAlignmentObservationWithCoder ¶
func NewVNImageHomographicAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageHomographicAlignmentObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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() [3][4]float32
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.
func (VNImageHomographicAlignmentObservationClass) Class ¶ added in v0.5.0
func (vc VNImageHomographicAlignmentObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewImageRegistrationRequest
deprecated
func NewImageRegistrationRequest() VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequest instead.
func NewImageRegistrationRequestWithCompletionHandler
deprecated
func NewImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCGImageOptions
deprecated
func NewImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCGImageOptions instead.
func NewImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptions
deprecated
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptions instead.
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCIImageOptions
deprecated
func NewImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCIImageOptions instead.
func NewImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptions
deprecated
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptions instead.
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptions
deprecated
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptions instead.
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions
deprecated
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions instead.
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptions
deprecated
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptions instead.
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions
deprecated
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions instead.
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedImageDataOptions
deprecated
func NewImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageDataOptions instead.
func NewImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptions
deprecated
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptions instead.
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedImageURLOptions
deprecated
func NewImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageURLOptions instead.
func NewImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler instead.
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptions
deprecated
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptions instead.
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler
deprecated
func NewImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Deprecated: Use NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler instead.
func NewVNImageRegistrationRequest ¶
func NewVNImageRegistrationRequest() VNImageRegistrationRequest
NewVNImageRegistrationRequest creates a new VNImageRegistrationRequest instance.
func NewVNImageRegistrationRequestWithCompletionHandler ¶
func NewVNImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNImageRegistrationRequestWithTargetedCGImageOptions ¶
func NewVNImageRegistrationRequestWithTargetedCGImageOptions(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 NewVNImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptions ¶
func NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNImageRegistrationRequestWithTargetedCIImageOptions ¶
func NewVNImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating 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 NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptions ¶
func NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The CIImage encapsulating 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptions ¶
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRegistrationRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid imageBuffer.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientation values.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientations.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptions ¶
func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptions(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 NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNImageRegistrationRequestWithTargetedImageDataOptions ¶
func NewVNImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, 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 NewVNImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptions ¶
func NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNImageRegistrationRequestWithTargetedImageURLOptions ¶
func NewVNImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, 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 NewVNImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptions ¶
func NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewVNImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
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.
func (VNImageRegistrationRequestClass) Class ¶ added in v0.5.0
func (vc VNImageRegistrationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewImageRequestHandler
deprecated
func NewImageRequestHandler() VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandler instead.
func NewImageRequestHandlerWithCGImageOptions
deprecated
func NewImageRequestHandlerWithCGImageOptions(image coregraphics.CGImageRef, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCGImageOptions instead.
func NewImageRequestHandlerWithCGImageOrientationOptions
deprecated
func NewImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCGImageOrientationOptions instead.
func NewImageRequestHandlerWithCIImageOptions
deprecated
func NewImageRequestHandlerWithCIImageOptions(image *coreimage.CIImage, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCIImageOptions instead.
func NewImageRequestHandlerWithCIImageOrientationOptions
deprecated
func NewImageRequestHandlerWithCIImageOrientationOptions(image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCIImageOrientationOptions instead.
func NewImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions
deprecated
func NewImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions instead.
func NewImageRequestHandlerWithCMSampleBufferOptions
deprecated
func NewImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCMSampleBufferOptions instead.
func NewImageRequestHandlerWithCMSampleBufferOrientationOptions
deprecated
func NewImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCMSampleBufferOrientationOptions instead.
func NewImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions
deprecated
func NewImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions instead.
func NewImageRequestHandlerWithCVPixelBufferOptions
deprecated
func NewImageRequestHandlerWithCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCVPixelBufferOptions instead.
func NewImageRequestHandlerWithCVPixelBufferOrientationOptions
deprecated
func NewImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithCVPixelBufferOrientationOptions instead.
func NewImageRequestHandlerWithDataOptions
deprecated
func NewImageRequestHandlerWithDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithDataOptions instead.
func NewImageRequestHandlerWithDataOrientationOptions
deprecated
func NewImageRequestHandlerWithDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithDataOrientationOptions instead.
func NewImageRequestHandlerWithURLOptions
deprecated
func NewImageRequestHandlerWithURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithURLOptions instead.
func NewImageRequestHandlerWithURLOrientationOptions
deprecated
func NewImageRequestHandlerWithURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
Deprecated: Use NewVNImageRequestHandlerWithURLOrientationOptions instead.
func NewVNImageRequestHandler ¶
func NewVNImageRequestHandler() VNImageRequestHandler
NewVNImageRequestHandler creates a new VNImageRequestHandler instance.
func NewVNImageRequestHandlerWithCGImageOptions ¶
func NewVNImageRequestHandlerWithCGImageOptions(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.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(cgImage:options:)
func NewVNImageRequestHandlerWithCGImageOrientationOptions ¶
func NewVNImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
func NewVNImageRequestHandlerWithCIImageOptions ¶
func NewVNImageRequestHandlerWithCIImageOptions(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.
options: An optional dictionary containing properties keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(ciImage:options:)
func NewVNImageRequestHandlerWithCIImageOrientationOptions ¶
func NewVNImageRequestHandlerWithCIImageOrientationOptions(image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
func NewVNImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions ¶
func NewVNImageRequestHandlerWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, 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.
func NewVNImageRequestHandlerWithCMSampleBufferOptions ¶
func NewVNImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, 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:)
func NewVNImageRequestHandlerWithCMSampleBufferOrientationOptions ¶
func NewVNImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
func NewVNImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions ¶
func NewVNImageRequestHandlerWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
func NewVNImageRequestHandlerWithCVPixelBufferOptions ¶
func NewVNImageRequestHandlerWithCVPixelBufferOptions(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 NewVNImageRequestHandlerWithCVPixelBufferOrientationOptions ¶
func NewVNImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
func NewVNImageRequestHandlerWithDataOptions ¶
func NewVNImageRequestHandlerWithDataOptions(imageData foundation.NSData, 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 NewVNImageRequestHandlerWithDataOrientationOptions ¶
func NewVNImageRequestHandlerWithDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
func NewVNImageRequestHandlerWithURLOptions ¶
func NewVNImageRequestHandlerWithURLOptions(imageURL foundation.NSURL, 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.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(url:options:)
func NewVNImageRequestHandlerWithURLOrientationOptions ¶
func NewVNImageRequestHandlerWithURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
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.
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 imageio.CGImagePropertyOrientation, 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.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
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.
options: An optional dictionary containing properties keys to auxiliary image data.
See: https://developer.apple.com/documentation/Vision/VNImageRequestHandler/init(ciImage:options:)
func (VNImageRequestHandler) InitWithCIImageOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCIImageOrientationOptions(image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
func (VNImageRequestHandler) InitWithCMSampleBufferDepthDataOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCMSampleBufferDepthDataOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, 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.
func (VNImageRequestHandler) InitWithCMSampleBufferOptions ¶
func (i VNImageRequestHandler) InitWithCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, 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:)
func (VNImageRequestHandler) InitWithCMSampleBufferOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
func (VNImageRequestHandler) InitWithCVPixelBufferDepthDataOrientationOptions ¶
func (i VNImageRequestHandler) InitWithCVPixelBufferDepthDataOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, depthData avfoundation.AVDepthData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNImageRequestHandler
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 imageio.CGImagePropertyOrientation, 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.
func (VNImageRequestHandler) InitWithDataOptions ¶
func (i VNImageRequestHandler) InitWithDataOptions(imageData foundation.NSData, 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.NSData, orientation imageio.CGImagePropertyOrientation, 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.
func (VNImageRequestHandler) InitWithURLOptions ¶
func (i VNImageRequestHandler) InitWithURLOptions(imageURL foundation.NSURL, 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.
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.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The orientation of the input `image`.
options: An optional dictionary containing VNImageOption keys to auxiliary image data.
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.
func (VNImageRequestHandlerClass) Class ¶ added in v0.5.0
func (vc VNImageRequestHandlerClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNImageTranslationAlignmentObservation
func NewImageTranslationAlignmentObservation
deprecated
func NewImageTranslationAlignmentObservation() VNImageTranslationAlignmentObservation
Deprecated: Use NewVNImageTranslationAlignmentObservation instead.
func NewImageTranslationAlignmentObservationWithCoder
deprecated
added in
v0.6.10
func NewImageTranslationAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageTranslationAlignmentObservation
Deprecated: Use NewVNImageTranslationAlignmentObservationWithCoder instead.
func NewVNImageTranslationAlignmentObservation ¶
func NewVNImageTranslationAlignmentObservation() VNImageTranslationAlignmentObservation
NewVNImageTranslationAlignmentObservation creates a new VNImageTranslationAlignmentObservation instance.
func NewVNImageTranslationAlignmentObservationWithCoder ¶
func NewVNImageTranslationAlignmentObservationWithCoder(coder foundation.INSCoder) VNImageTranslationAlignmentObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
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.
func (VNImageTranslationAlignmentObservationClass) Class ¶ added in v0.5.0
func (vc VNImageTranslationAlignmentObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewInstanceMaskObservation
deprecated
func NewInstanceMaskObservation() VNInstanceMaskObservation
Deprecated: Use NewVNInstanceMaskObservation instead.
func NewInstanceMaskObservationWithCoder
deprecated
added in
v0.6.10
func NewInstanceMaskObservationWithCoder(coder foundation.INSCoder) VNInstanceMaskObservation
Deprecated: Use NewVNInstanceMaskObservationWithCoder instead.
func NewVNInstanceMaskObservation ¶
func NewVNInstanceMaskObservation() VNInstanceMaskObservation
NewVNInstanceMaskObservation creates a new VNInstanceMaskObservation instance.
func NewVNInstanceMaskObservationWithCoder ¶
func NewVNInstanceMaskObservationWithCoder(coder foundation.INSCoder) VNInstanceMaskObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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
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.
func (VNInstanceMaskObservationClass) Class ¶ added in v0.5.0
func (vc VNInstanceMaskObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewObservation
deprecated
func NewObservation() VNObservation
Deprecated: Use NewVNObservation instead.
func NewObservationWithCoder
deprecated
added in
v0.6.10
func NewObservationWithCoder(coder foundation.INSCoder) VNObservation
Deprecated: Use NewVNObservationWithCoder instead.
func NewVNObservation ¶
func NewVNObservation() VNObservation
NewVNObservation creates a new VNObservation instance.
func NewVNObservationWithCoder ¶
func NewVNObservationWithCoder(coder foundation.INSCoder) VNObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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) InitWithCoder ¶ added in v0.6.10
func (o VNObservation) InitWithCoder(coder foundation.INSCoder) VNObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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() coremedia.CMTimeRange
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.
func (VNObservationClass) Class ¶ added in v0.5.0
func (vc VNObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 modelDescription object includes an image-typed feature description in its 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 NewPixelBufferObservation
deprecated
func NewPixelBufferObservation() VNPixelBufferObservation
Deprecated: Use NewVNPixelBufferObservation instead.
func NewPixelBufferObservationWithCoder
deprecated
added in
v0.6.10
func NewPixelBufferObservationWithCoder(coder foundation.INSCoder) VNPixelBufferObservation
Deprecated: Use NewVNPixelBufferObservationWithCoder instead.
func NewVNPixelBufferObservation ¶
func NewVNPixelBufferObservation() VNPixelBufferObservation
NewVNPixelBufferObservation creates a new VNPixelBufferObservation instance.
func NewVNPixelBufferObservationWithCoder ¶
func NewVNPixelBufferObservationWithCoder(coder foundation.INSCoder) VNPixelBufferObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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) 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
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.
func (VNPixelBufferObservationClass) Class ¶ added in v0.5.0
func (vc VNPixelBufferObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewPoint
deprecated
func NewPoint() VNPoint
Deprecated: Use NewVNPoint instead.
func NewPointWithCoder
deprecated
added in
v0.6.10
func NewPointWithCoder(coder foundation.INSCoder) VNPoint
Deprecated: Use NewVNPointWithCoder instead.
func NewPointWithLocation
deprecated
func NewPointWithLocation(location corefoundation.CGPoint) VNPoint
Deprecated: Use NewVNPointWithLocation instead.
func NewPointWithXY
deprecated
Deprecated: Use NewVNPointWithXY instead.
func NewVNPointWithCoder ¶
func NewVNPointWithCoder(coder foundation.INSCoder) VNPoint
See: https://developer.apple.com/documentation/Vision/VNPoint/init(coder:)
func NewVNPointWithLocation ¶
func NewVNPointWithLocation(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 NewVNPointWithXY ¶
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) InitWithCoder ¶ added in v0.6.10
func (p VNPoint) InitWithCoder(coder foundation.INSCoder) VNPoint
See: https://developer.apple.com/documentation/Vision/VNPoint/init(coder:)
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.
See: https://developer.apple.com/documentation/Vision/VNPoint3D
func NewPoint3D
deprecated
func NewPoint3D() VNPoint3D
Deprecated: Use NewVNPoint3D instead.
func NewPoint3DWithCoder
deprecated
added in
v0.6.10
func NewPoint3DWithCoder(coder foundation.INSCoder) VNPoint3D
Deprecated: Use NewVNPoint3DWithCoder instead.
func NewPoint3DWithPosition
deprecated
Deprecated: Use NewVNPoint3DWithPosition instead.
func NewVNPoint3DWithCoder ¶
func NewVNPoint3DWithCoder(coder foundation.INSCoder) VNPoint3D
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(coder:)
func NewVNPoint3DWithPosition ¶
Creates a point object with the position you specify.
position: The three-dimensional position.
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(position:)
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) InitWithCoder ¶ added in v0.6.10
func (p VNPoint3D) InitWithCoder(coder foundation.INSCoder) VNPoint3D
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(coder:)
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.
func (VNPoint3DClass) Class ¶ added in v0.5.0
func (vc VNPoint3DClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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) Class ¶ added in v0.5.0
func (vc VNPointClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNRecognizeAnimalsRequest
func NewRecognizeAnimalsRequest
deprecated
func NewRecognizeAnimalsRequest() VNRecognizeAnimalsRequest
Deprecated: Use NewVNRecognizeAnimalsRequest instead.
func NewRecognizeAnimalsRequestWithCompletionHandler
deprecated
func NewRecognizeAnimalsRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRecognizeAnimalsRequest
Deprecated: Use NewVNRecognizeAnimalsRequestWithCompletionHandler instead.
func NewVNRecognizeAnimalsRequest ¶
func NewVNRecognizeAnimalsRequest() VNRecognizeAnimalsRequest
NewVNRecognizeAnimalsRequest creates a new VNRecognizeAnimalsRequest instance.
func NewVNRecognizeAnimalsRequestWithCompletionHandler ¶
func NewVNRecognizeAnimalsRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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()
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.
func (VNRecognizeAnimalsRequestClass) Class ¶ added in v0.5.0
func (vc VNRecognizeAnimalsRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNRecognizeTextRequest
func NewRecognizeTextRequest
deprecated
func NewRecognizeTextRequest() VNRecognizeTextRequest
Deprecated: Use NewVNRecognizeTextRequest instead.
func NewRecognizeTextRequestWithCompletionHandler
deprecated
func NewRecognizeTextRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRecognizeTextRequest
Deprecated: Use NewVNRecognizeTextRequestWithCompletionHandler instead.
func NewVNRecognizeTextRequest ¶
func NewVNRecognizeTextRequest() VNRecognizeTextRequest
NewVNRecognizeTextRequest creates a new VNRecognizeTextRequest instance.
func NewVNRecognizeTextRequestWithCompletionHandler ¶
func NewVNRecognizeTextRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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 VNRecognizeTextRequest.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.
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.
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 VNRequestTextRecognitionLevelFast to prioritize speed over accuracy, and to VNRequestTextRecognitionLevelAccurate 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 (o VNRecognizeTextRequest) SetProgressHandler(value objc.ID)
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) 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
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.
func (VNRecognizeTextRequestClass) Class ¶ added in v0.5.0
func (vc VNRecognizeTextRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewRecognizedObjectObservation
deprecated
func NewRecognizedObjectObservation() VNRecognizedObjectObservation
Deprecated: Use NewVNRecognizedObjectObservation instead.
func NewRecognizedObjectObservationWithBoundingBox
deprecated
func NewRecognizedObjectObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
Deprecated: Use NewVNRecognizedObjectObservationWithBoundingBox instead.
func NewRecognizedObjectObservationWithCoder
deprecated
added in
v0.6.10
func NewRecognizedObjectObservationWithCoder(coder foundation.INSCoder) VNRecognizedObjectObservation
Deprecated: Use NewVNRecognizedObjectObservationWithCoder instead.
func NewRecognizedObjectObservationWithRequestRevisionBoundingBox
deprecated
func NewRecognizedObjectObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedObjectObservation
Deprecated: Use NewVNRecognizedObjectObservationWithRequestRevisionBoundingBox instead.
func NewVNRecognizedObjectObservation ¶
func NewVNRecognizedObjectObservation() VNRecognizedObjectObservation
NewVNRecognizedObjectObservation creates a new VNRecognizedObjectObservation instance.
func NewVNRecognizedObjectObservationWithBoundingBox ¶
func NewVNRecognizedObjectObservationWithBoundingBox(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 NewVNRecognizedObjectObservationWithCoder ¶
func NewVNRecognizedObjectObservationWithCoder(coder foundation.INSCoder) VNRecognizedObjectObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNRecognizedObjectObservationWithRequestRevisionBoundingBox ¶
func NewVNRecognizedObjectObservationWithRequestRevisionBoundingBox(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 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.
func (VNRecognizedObjectObservationClass) Class ¶ added in v0.5.0
func (vc VNRecognizedObjectObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewRecognizedPoint
deprecated
func NewRecognizedPoint() VNRecognizedPoint
Deprecated: Use NewVNRecognizedPoint instead.
func NewRecognizedPointWithCoder
deprecated
added in
v0.6.10
func NewRecognizedPointWithCoder(coder foundation.INSCoder) VNRecognizedPoint
Deprecated: Use NewVNRecognizedPointWithCoder instead.
func NewRecognizedPointWithLocation
deprecated
func NewRecognizedPointWithLocation(location corefoundation.CGPoint) VNRecognizedPoint
Deprecated: Use NewVNRecognizedPointWithLocation instead.
func NewRecognizedPointWithXY
deprecated
func NewRecognizedPointWithXY(x float64, y float64) VNRecognizedPoint
Deprecated: Use NewVNRecognizedPointWithXY instead.
func NewVNRecognizedPoint ¶
func NewVNRecognizedPoint() VNRecognizedPoint
NewVNRecognizedPoint creates a new VNRecognizedPoint instance.
func NewVNRecognizedPointWithCoder ¶
func NewVNRecognizedPointWithCoder(coder foundation.INSCoder) VNRecognizedPoint
See: https://developer.apple.com/documentation/Vision/VNPoint/init(coder:)
func NewVNRecognizedPointWithLocation ¶
func NewVNRecognizedPointWithLocation(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 NewVNRecognizedPointWithXY ¶
func NewVNRecognizedPointWithXY(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 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 NewRecognizedPoint3D
deprecated
func NewRecognizedPoint3D() VNRecognizedPoint3D
Deprecated: Use NewVNRecognizedPoint3D instead.
func NewRecognizedPoint3DWithCoder
deprecated
added in
v0.6.10
func NewRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNRecognizedPoint3D
Deprecated: Use NewVNRecognizedPoint3DWithCoder instead.
func NewRecognizedPoint3DWithPosition
deprecated
func NewRecognizedPoint3DWithPosition(position [4][4]float32) VNRecognizedPoint3D
Deprecated: Use NewVNRecognizedPoint3DWithPosition instead.
func NewVNRecognizedPoint3D ¶
func NewVNRecognizedPoint3D() VNRecognizedPoint3D
NewVNRecognizedPoint3D creates a new VNRecognizedPoint3D instance.
func NewVNRecognizedPoint3DWithCoder ¶
func NewVNRecognizedPoint3DWithCoder(coder foundation.INSCoder) VNRecognizedPoint3D
See: https://developer.apple.com/documentation/Vision/VNPoint3D/init(coder:)
func NewVNRecognizedPoint3DWithPosition ¶
func NewVNRecognizedPoint3DWithPosition(position [4][4]float32) 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:)
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.
func (VNRecognizedPoint3DClass) Class ¶ added in v0.5.0
func (vc VNRecognizedPoint3DClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
func (VNRecognizedPointClass) Class ¶ added in v0.5.0
func (vc VNRecognizedPointClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 ( // VNBodyLandmarkRegionKeyFace is a group key identifying the face, which includes the eyes, ears, and nose. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/bodyLandmarkRegionKeyFace VNBodyLandmarkRegionKeyFace VNRecognizedPointGroupKey // VNBodyLandmarkRegionKeyLeftArm is a group key identifying the landmarks of the left arm. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/bodyLandmarkRegionKeyLeftArm VNBodyLandmarkRegionKeyLeftArm VNRecognizedPointGroupKey // VNBodyLandmarkRegionKeyLeftLeg is a group key identifying the landmarks of the left leg. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/bodyLandmarkRegionKeyLeftLeg VNBodyLandmarkRegionKeyLeftLeg VNRecognizedPointGroupKey // VNBodyLandmarkRegionKeyRightArm is a group key identifying the landmarks of the right arm. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/bodyLandmarkRegionKeyRightArm VNBodyLandmarkRegionKeyRightArm VNRecognizedPointGroupKey // VNBodyLandmarkRegionKeyRightLeg is a group key identifying the landmarks of the right leg. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/bodyLandmarkRegionKeyRightLeg VNBodyLandmarkRegionKeyRightLeg VNRecognizedPointGroupKey // VNBodyLandmarkRegionKeyTorso is a group key identifying the torso, which includes the neck, shoulders, hips, and root. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointGroupKey/bodyLandmarkRegionKeyTorso VNBodyLandmarkRegionKeyTorso VNRecognizedPointGroupKey // 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
var ( // VNBodyLandmarkKeyLeftAnkle is the left ankle. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftAnkle VNBodyLandmarkKeyLeftAnkle VNRecognizedPointKey // VNBodyLandmarkKeyLeftEar is the left ear. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftEar VNBodyLandmarkKeyLeftEar VNRecognizedPointKey // VNBodyLandmarkKeyLeftElbow is the left elbow. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftElbow VNBodyLandmarkKeyLeftElbow VNRecognizedPointKey // VNBodyLandmarkKeyLeftEye is the left eye. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftEye VNBodyLandmarkKeyLeftEye VNRecognizedPointKey // VNBodyLandmarkKeyLeftHip is the left hip. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftHip VNBodyLandmarkKeyLeftHip VNRecognizedPointKey // VNBodyLandmarkKeyLeftKnee is the left knee. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftKnee VNBodyLandmarkKeyLeftKnee VNRecognizedPointKey // VNBodyLandmarkKeyLeftShoulder is the left shoulder. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftShoulder VNBodyLandmarkKeyLeftShoulder VNRecognizedPointKey // VNBodyLandmarkKeyLeftWrist is the left wrist. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyLeftWrist VNBodyLandmarkKeyLeftWrist VNRecognizedPointKey // VNBodyLandmarkKeyNeck is the center point of the neck. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyNeck VNBodyLandmarkKeyNeck VNRecognizedPointKey // VNBodyLandmarkKeyNose is the nose. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyNose VNBodyLandmarkKeyNose VNRecognizedPointKey // VNBodyLandmarkKeyRightAnkle is the right ankle. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightAnkle VNBodyLandmarkKeyRightAnkle VNRecognizedPointKey // VNBodyLandmarkKeyRightEar is the right ear. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightEar VNBodyLandmarkKeyRightEar VNRecognizedPointKey // VNBodyLandmarkKeyRightElbow is the right elbow. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightElbow VNBodyLandmarkKeyRightElbow VNRecognizedPointKey // VNBodyLandmarkKeyRightEye is the right eye. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightEye VNBodyLandmarkKeyRightEye VNRecognizedPointKey // VNBodyLandmarkKeyRightHip is the right hip. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightHip VNBodyLandmarkKeyRightHip VNRecognizedPointKey // VNBodyLandmarkKeyRightKnee is the right knee. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightKnee VNBodyLandmarkKeyRightKnee VNRecognizedPointKey // VNBodyLandmarkKeyRightShoulder is the right shoulder. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightShoulder VNBodyLandmarkKeyRightShoulder VNRecognizedPointKey // VNBodyLandmarkKeyRightWrist is the right wrist. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRightWrist VNBodyLandmarkKeyRightWrist VNRecognizedPointKey // VNBodyLandmarkKeyRoot is the center point of the waist. // // Deprecated: Deprecated since macOS 11.0. // // See: https://developer.apple.com/documentation/Vision/VNRecognizedPointKey/bodyLandmarkKeyRoot VNBodyLandmarkKeyRoot 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 NewRecognizedPoints3DObservation
deprecated
func NewRecognizedPoints3DObservation() VNRecognizedPoints3DObservation
Deprecated: Use NewVNRecognizedPoints3DObservation instead.
func NewRecognizedPoints3DObservationWithCoder
deprecated
added in
v0.6.10
func NewRecognizedPoints3DObservationWithCoder(coder foundation.INSCoder) VNRecognizedPoints3DObservation
Deprecated: Use NewVNRecognizedPoints3DObservationWithCoder instead.
func NewVNRecognizedPoints3DObservation ¶
func NewVNRecognizedPoints3DObservation() VNRecognizedPoints3DObservation
NewVNRecognizedPoints3DObservation creates a new VNRecognizedPoints3DObservation instance.
func NewVNRecognizedPoints3DObservationWithCoder ¶
func NewVNRecognizedPoints3DObservationWithCoder(coder foundation.INSCoder) VNRecognizedPoints3DObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNRecognizedPoints3DObservationClass) Class ¶ added in v0.5.0
func (vc VNRecognizedPoints3DObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewRecognizedPointsObservation
deprecated
func NewRecognizedPointsObservation() VNRecognizedPointsObservation
Deprecated: Use NewVNRecognizedPointsObservation instead.
func NewRecognizedPointsObservationWithCoder
deprecated
added in
v0.6.10
func NewRecognizedPointsObservationWithCoder(coder foundation.INSCoder) VNRecognizedPointsObservation
Deprecated: Use NewVNRecognizedPointsObservationWithCoder instead.
func NewVNRecognizedPointsObservation ¶
func NewVNRecognizedPointsObservation() VNRecognizedPointsObservation
NewVNRecognizedPointsObservation creates a new VNRecognizedPointsObservation instance.
func NewVNRecognizedPointsObservationWithCoder ¶
func NewVNRecognizedPointsObservationWithCoder(coder foundation.INSCoder) VNRecognizedPointsObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNRecognizedPointsObservationClass) Class ¶ added in v0.5.0
func (vc VNRecognizedPointsObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewRecognizedText
deprecated
func NewRecognizedText() VNRecognizedText
Deprecated: Use NewVNRecognizedText instead.
func NewRecognizedTextWithCoder
deprecated
added in
v0.6.10
func NewRecognizedTextWithCoder(coder foundation.INSCoder) VNRecognizedText
Deprecated: Use NewVNRecognizedTextWithCoder instead.
func NewVNRecognizedText ¶
func NewVNRecognizedText() VNRecognizedText
NewVNRecognizedText creates a new VNRecognizedText instance.
func NewVNRecognizedTextWithCoder ¶
func NewVNRecognizedTextWithCoder(coder foundation.INSCoder) VNRecognizedText
See: https://developer.apple.com/documentation/Vision/VNRecognizedText/init(coder:)
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 VNRecognizeTextRequest.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) InitWithCoder ¶ added in v0.6.10
func (r VNRecognizedText) InitWithCoder(coder foundation.INSCoder) VNRecognizedText
See: https://developer.apple.com/documentation/Vision/VNRecognizedText/init(coder:)
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.
func (VNRecognizedTextClass) Class ¶ added in v0.5.0
func (vc VNRecognizedTextClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 n top candidates for a recognized text string.
See: https://developer.apple.com/documentation/Vision/VNRecognizedTextObservation
func NewRecognizedTextObservation
deprecated
func NewRecognizedTextObservation() VNRecognizedTextObservation
Deprecated: Use NewVNRecognizedTextObservation instead.
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight
deprecated
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNRecognizedTextObservation
Deprecated: Use NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight instead.
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft
deprecated
func NewRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNRecognizedTextObservation
Deprecated: Use NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft instead.
func NewRecognizedTextObservationWithBoundingBox
deprecated
func NewRecognizedTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRecognizedTextObservation
Deprecated: Use NewVNRecognizedTextObservationWithBoundingBox instead.
func NewRecognizedTextObservationWithCoder
deprecated
added in
v0.6.10
func NewRecognizedTextObservationWithCoder(coder foundation.INSCoder) VNRecognizedTextObservation
Deprecated: Use NewVNRecognizedTextObservationWithCoder instead.
func NewRecognizedTextObservationWithRequestRevisionBoundingBox
deprecated
func NewRecognizedTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRecognizedTextObservation
Deprecated: Use NewVNRecognizedTextObservationWithRequestRevisionBoundingBox instead.
func NewVNRecognizedTextObservation ¶
func NewVNRecognizedTextObservation() VNRecognizedTextObservation
NewVNRecognizedTextObservation creates a new VNRecognizedTextObservation instance.
func NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(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 NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewVNRecognizedTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(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 NewVNRecognizedTextObservationWithBoundingBox ¶
func NewVNRecognizedTextObservationWithBoundingBox(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 NewVNRecognizedTextObservationWithCoder ¶
func NewVNRecognizedTextObservationWithCoder(coder foundation.INSCoder) VNRecognizedTextObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNRecognizedTextObservationWithRequestRevisionBoundingBox ¶
func NewVNRecognizedTextObservationWithRequestRevisionBoundingBox(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 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 n 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 n top candidates, sorted by decreasing confidence score.
Discussion ¶
This function returns no more than n candidates, but it may return fewer than n 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.
func (VNRecognizedTextObservationClass) Class ¶ added in v0.5.0
func (vc VNRecognizedTextObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewRectangleObservation
deprecated
func NewRectangleObservation() VNRectangleObservation
Deprecated: Use NewVNRectangleObservation instead.
func NewRectangleObservationWithBoundingBox
deprecated
func NewRectangleObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNRectangleObservation
Deprecated: Use NewVNRectangleObservationWithBoundingBox instead.
func NewRectangleObservationWithCoder
deprecated
added in
v0.6.10
func NewRectangleObservationWithCoder(coder foundation.INSCoder) VNRectangleObservation
Deprecated: Use NewVNRectangleObservationWithCoder instead.
func NewRectangleObservationWithRequestRevisionBoundingBox
deprecated
func NewRectangleObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNRectangleObservation
Deprecated: Use NewVNRectangleObservationWithRequestRevisionBoundingBox instead.
func NewRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight
deprecated
func NewRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNRectangleObservation
Deprecated: Use NewVNRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight instead.
func NewRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft
deprecated
func NewRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNRectangleObservation
Deprecated: Use NewVNRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft instead.
func NewVNRectangleObservation ¶
func NewVNRectangleObservation() VNRectangleObservation
NewVNRectangleObservation creates a new VNRectangleObservation instance.
func NewVNRectangleObservationWithBoundingBox ¶
func NewVNRectangleObservationWithBoundingBox(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 NewVNRectangleObservationWithCoder ¶
func NewVNRectangleObservationWithCoder(coder foundation.INSCoder) VNRectangleObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNRectangleObservationWithRequestRevisionBoundingBox ¶
func NewVNRectangleObservationWithRequestRevisionBoundingBox(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 NewVNRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewVNRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(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 NewVNRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewVNRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(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 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) 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.
func (VNRectangleObservationClass) Class ¶ added in v0.5.0
func (vc VNRectangleObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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
Canceling a Request ¶
- VNRequest.Cancel: Cancels the request before it can finish executing.
See: https://developer.apple.com/documentation/Vision/VNRequest
func NewRequest
deprecated
func NewRequest() VNRequest
Deprecated: Use NewVNRequest instead.
func NewRequestWithCompletionHandler
deprecated
func NewRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNRequest
Deprecated: Use NewVNRequestWithCompletionHandler instead.
func NewVNRequestWithCompletionHandler ¶
func NewVNRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.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() VNRequestErrorHandler
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 VNImageRequestHandler.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) InitSync ¶ added in v0.6.17
InitSync is a synchronous wrapper around VNRequest.InitWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNRequest) InitWithCompletionHandler ¶
func (r VNRequest) InitWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.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 VNRequest.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) SetUsesCPUOnly ¶
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) Class ¶ added in v0.5.0
func (vc VNRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 VNRequestErrorHandler ¶ added in v0.6.17
VNRequestErrorHandler handles The block to invoke after the request finishes processing. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
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]
- [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 VNRequestFaceLandmarksConstellation ¶
type VNRequestFaceLandmarksConstellation uint
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 VNRequestFloat64ErrorHandler ¶ added in v0.6.17
VNRequestFloat64ErrorHandler is the signature for a completion handler block.
type VNRequestProgressHandler ¶
type VNRequestProgressHandler = func(request VNRequest, fractionCompleted float64, error_ 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
SetProgressHandler(value objc.ID)
// 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 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.
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 (VNRequestProgressProvidingObject) ProgressHandler ¶
func (o VNRequestProgressProvidingObject) 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 (VNRequestProgressProvidingObject) SetProgressHandler ¶
func (o VNRequestProgressProvidingObject) SetProgressHandler(value objc.ID)
type VNRequestRevisionProviding ¶
type VNRequestRevisionProviding interface {
objectivec.IObject
// The revision of the [VNRequest](<https://developer.apple.com/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 uint
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 NewSaliencyImageObservation
deprecated
func NewSaliencyImageObservation() VNSaliencyImageObservation
Deprecated: Use NewVNSaliencyImageObservation instead.
func NewSaliencyImageObservationWithCoder
deprecated
added in
v0.6.10
func NewSaliencyImageObservationWithCoder(coder foundation.INSCoder) VNSaliencyImageObservation
Deprecated: Use NewVNSaliencyImageObservationWithCoder instead.
func NewVNSaliencyImageObservation ¶
func NewVNSaliencyImageObservation() VNSaliencyImageObservation
NewVNSaliencyImageObservation creates a new VNSaliencyImageObservation instance.
func NewVNSaliencyImageObservationWithCoder ¶
func NewVNSaliencyImageObservationWithCoder(coder foundation.INSCoder) VNSaliencyImageObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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.
func (VNSaliencyImageObservationClass) Class ¶ added in v0.5.0
func (vc VNSaliencyImageObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewSequenceRequestHandler
deprecated
func NewSequenceRequestHandler() VNSequenceRequestHandler
Deprecated: Use NewVNSequenceRequestHandler instead.
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.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-3zt7l
func (VNSequenceRequestHandler) PerformRequestsOnCGImageOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCGImageOrientationError(requests []VNRequest, image coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation) (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.
orientation: The orientation of the input `image`.
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.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-9jtgj
func (VNSequenceRequestHandler) PerformRequestsOnCIImageOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCIImageOrientationError(requests []VNRequest, image *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation) (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.
orientation: The orientation of the input `image`.
func (VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferError(requests []VNRequest, sampleBuffer coremedia.CMSampleBufferRef) (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.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-45e73
func (VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCMSampleBufferOrientationError(requests []VNRequest, sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation) (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.
orientation: The orientation of the image contained within the sample buffer.
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.
See: https://developer.apple.com/documentation/Vision/VNSequenceRequestHandler/perform(_:on:)-3d7nt
func (VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferOrientationError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnCVPixelBufferOrientationError(requests []VNRequest, pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation) (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.
orientation: The orientation of the input `image`.
func (VNSequenceRequestHandler) PerformRequestsOnImageDataError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnImageDataError(requests []VNRequest, imageData foundation.NSData) (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.NSData, orientation imageio.CGImagePropertyOrientation) (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.
func (VNSequenceRequestHandler) PerformRequestsOnImageURLError ¶
func (s VNSequenceRequestHandler) PerformRequestsOnImageURLError(requests []VNRequest, imageURL foundation.NSURL) (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.NSURL, orientation imageio.CGImagePropertyOrientation) (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.
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.
func (VNSequenceRequestHandlerClass) Class ¶ added in v0.5.0
func (vc VNSequenceRequestHandlerClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewStatefulRequest
deprecated
func NewStatefulRequest() VNStatefulRequest
Deprecated: Use NewVNStatefulRequest instead.
func NewStatefulRequestWithCompletionHandler
deprecated
func NewStatefulRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNStatefulRequest
Deprecated: Use NewVNStatefulRequestWithCompletionHandler instead.
func NewStatefulRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewStatefulRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNStatefulRequest
Deprecated: Use NewVNStatefulRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewVNStatefulRequest ¶
func NewVNStatefulRequest() VNStatefulRequest
NewVNStatefulRequest creates a new VNStatefulRequest instance.
func NewVNStatefulRequestWithCompletionHandler ¶
func NewVNStatefulRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNStatefulRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNStatefulRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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() coremedia.CMTime
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) InitWithFrameAnalysisSpacing ¶ added in v0.6.17
func (s VNStatefulRequest) InitWithFrameAnalysisSpacing(ctx context.Context, frameAnalysisSpacing coremedia.CMTime) (*VNRequest, error)
InitWithFrameAnalysisSpacing is a synchronous wrapper around VNStatefulRequest.InitWithFrameAnalysisSpacingCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNStatefulRequest) InitWithFrameAnalysisSpacingCompletionHandler ¶
func (s VNStatefulRequest) InitWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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.
func (VNStatefulRequestClass) Class ¶ added in v0.5.0
func (vc VNStatefulRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewTargetedImageRequest
deprecated
func NewTargetedImageRequest() VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequest instead.
func NewTargetedImageRequestWithCompletionHandler
deprecated
func NewTargetedImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCGImageOptions
deprecated
func NewTargetedImageRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCGImageOptions instead.
func NewTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCGImageOrientationOptions
deprecated
func NewTargetedImageRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCGImageOrientationOptions instead.
func NewTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCIImageOptions
deprecated
func NewTargetedImageRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCIImageOptions instead.
func NewTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCIImageOrientationOptions
deprecated
func NewTargetedImageRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCIImageOrientationOptions instead.
func NewTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCMSampleBufferOptions
deprecated
func NewTargetedImageRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCMSampleBufferOptions instead.
func NewTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions
deprecated
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions instead.
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCVPixelBufferOptions
deprecated
func NewTargetedImageRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCVPixelBufferOptions instead.
func NewTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions
deprecated
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions instead.
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedImageDataOptions
deprecated
func NewTargetedImageRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageDataOptions instead.
func NewTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedImageDataOrientationOptions
deprecated
func NewTargetedImageRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageDataOrientationOptions instead.
func NewTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedImageURLOptions
deprecated
func NewTargetedImageRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageURLOptions instead.
func NewTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler instead.
func NewTargetedImageRequestWithTargetedImageURLOrientationOptions
deprecated
func NewTargetedImageRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageURLOrientationOptions instead.
func NewTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler
deprecated
func NewTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Deprecated: Use NewVNTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler instead.
func NewVNTargetedImageRequest ¶
func NewVNTargetedImageRequest() VNTargetedImageRequest
NewVNTargetedImageRequest creates a new VNTargetedImageRequest instance.
func NewVNTargetedImageRequestWithCompletionHandler ¶
func NewVNTargetedImageRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNTargetedImageRequestWithTargetedCGImageOptions ¶
func NewVNTargetedImageRequestWithTargetedCGImageOptions(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 NewVNTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTargetedImageRequestWithTargetedCGImageOrientationOptions ¶
func NewVNTargetedImageRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTargetedImageRequestWithTargetedCIImageOptions ¶
func NewVNTargetedImageRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating 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 NewVNTargetedImageRequestWithTargetedCIImageOrientationOptions ¶
func NewVNTargetedImageRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The CIImage encapsulating 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOptions ¶
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid imageBuffer.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientation values.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientations.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNTargetedImageRequestWithTargetedCVPixelBufferOptions ¶
func NewVNTargetedImageRequestWithTargetedCVPixelBufferOptions(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 NewVNTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTargetedImageRequestWithTargetedImageDataOptions ¶
func NewVNTargetedImageRequestWithTargetedImageDataOptions(imageData foundation.NSData, 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 NewVNTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTargetedImageRequestWithTargetedImageDataOrientationOptions ¶
func NewVNTargetedImageRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTargetedImageRequestWithTargetedImageURLOptions ¶
func NewVNTargetedImageRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, 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 NewVNTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTargetedImageRequestWithTargetedImageURLOrientationOptions ¶
func NewVNTargetedImageRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewVNTargetedImageRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
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 VNRequestErrorHandler) 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) InitWithTargetedCGImageOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCGImageOptionsSync(ctx context.Context, cgImage coregraphics.CGImageRef, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCGImageOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCGImageOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCGImageOrientationOptionsSync(ctx context.Context, cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCGImageOrientationOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCGImageOrientationOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
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.
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 VNRequestErrorHandler) VNTargetedImageRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating 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) InitWithTargetedCIImageOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCIImageOptionsSync(ctx context.Context, ciImage *coreimage.CIImage, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCIImageOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCIImageOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The CIImage encapsulating 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.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCIImageOrientationOptionsSync(ctx context.Context, ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCIImageOrientationOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCIImageOrientationOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTargetedImageRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid imageBuffer.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOptionsSync(ctx context.Context, sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCMSampleBufferOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCMSampleBufferOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientation values.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientations.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func (VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCMSampleBufferOrientationOptionsSync(ctx context.Context, sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCMSampleBufferOrientationOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCMSampleBufferOrientationOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
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 VNRequestErrorHandler) 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) InitWithTargetedCVPixelBufferOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOptionsSync(ctx context.Context, pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCVPixelBufferOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCVPixelBufferOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedCVPixelBufferOrientationOptionsSync(ctx context.Context, pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedCVPixelBufferOrientationOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedCVPixelBufferOrientationOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedImageDataOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOptions(imageData foundation.NSData, 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.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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) InitWithTargetedImageDataOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedImageDataOptionsSync(ctx context.Context, imageData foundation.NSData, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedImageDataOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedImageDataOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedImageDataOrientationOptionsSync(ctx context.Context, imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedImageDataOrientationOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedImageDataOrientationOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedImageURLOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOptions(imageURL foundation.NSURL, 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.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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) InitWithTargetedImageURLOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedImageURLOptionsSync(ctx context.Context, imageURL foundation.NSURL, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedImageURLOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedImageURLOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptions ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func (VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func (VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsSync ¶ added in v0.6.17
func (t VNTargetedImageRequest) InitWithTargetedImageURLOrientationOptionsSync(ctx context.Context, imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) (*VNRequest, error)
InitWithTargetedImageURLOrientationOptionsSync is a synchronous wrapper around VNTargetedImageRequest.InitWithTargetedImageURLOrientationOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
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.
func (VNTargetedImageRequestClass) Class ¶ added in v0.5.0
func (vc VNTargetedImageRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewTextObservation
deprecated
func NewTextObservation() VNTextObservation
Deprecated: Use NewVNTextObservation instead.
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight
deprecated
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(requestRevision uint, topLeft corefoundation.CGPoint, bottomLeft corefoundation.CGPoint, bottomRight corefoundation.CGPoint, topRight corefoundation.CGPoint) VNTextObservation
Deprecated: Use NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight instead.
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft
deprecated
func NewTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(requestRevision uint, topLeft corefoundation.CGPoint, topRight corefoundation.CGPoint, bottomRight corefoundation.CGPoint, bottomLeft corefoundation.CGPoint) VNTextObservation
Deprecated: Use NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft instead.
func NewTextObservationWithBoundingBox
deprecated
func NewTextObservationWithBoundingBox(boundingBox corefoundation.CGRect) VNTextObservation
Deprecated: Use NewVNTextObservationWithBoundingBox instead.
func NewTextObservationWithCoder
deprecated
added in
v0.6.10
func NewTextObservationWithCoder(coder foundation.INSCoder) VNTextObservation
Deprecated: Use NewVNTextObservationWithCoder instead.
func NewTextObservationWithRequestRevisionBoundingBox
deprecated
func NewTextObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox corefoundation.CGRect) VNTextObservation
Deprecated: Use NewVNTextObservationWithRequestRevisionBoundingBox instead.
func NewVNTextObservation ¶
func NewVNTextObservation() VNTextObservation
NewVNTextObservation creates a new VNTextObservation instance.
func NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight ¶
func NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftBottomLeftBottomRightTopRight(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 NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft ¶
func NewVNTextObservationRectangleObservationWithRequestRevisionTopLeftTopRightBottomRightBottomLeft(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 NewVNTextObservationWithBoundingBox ¶
func NewVNTextObservationWithBoundingBox(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 NewVNTextObservationWithCoder ¶
func NewVNTextObservationWithCoder(coder foundation.INSCoder) VNTextObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
func NewVNTextObservationWithRequestRevisionBoundingBox ¶
func NewVNTextObservationWithRequestRevisionBoundingBox(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 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.
func (VNTextObservationClass) Class ¶ added in v0.5.0
func (vc VNTextObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewTrackHomographicImageRegistrationRequest
deprecated
func NewTrackHomographicImageRegistrationRequest() VNTrackHomographicImageRegistrationRequest
Deprecated: Use NewVNTrackHomographicImageRegistrationRequest instead.
func NewTrackHomographicImageRegistrationRequestWithCompletionHandler
deprecated
func NewTrackHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackHomographicImageRegistrationRequest
Deprecated: Use NewVNTrackHomographicImageRegistrationRequestWithCompletionHandler instead.
func NewTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackHomographicImageRegistrationRequest
Deprecated: Use NewVNTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewVNTrackHomographicImageRegistrationRequest ¶
func NewVNTrackHomographicImageRegistrationRequest() VNTrackHomographicImageRegistrationRequest
NewVNTrackHomographicImageRegistrationRequest creates a new VNTrackHomographicImageRegistrationRequest instance.
func NewVNTrackHomographicImageRegistrationRequestWithCompletionHandler ¶
func NewVNTrackHomographicImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 NewVNTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNTrackHomographicImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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.
func (VNTrackHomographicImageRegistrationRequestClass) Class ¶ added in v0.5.0
func (vc VNTrackHomographicImageRegistrationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
See: https://developer.apple.com/documentation/Vision/VNTrackObjectRequest
func NewTrackObjectRequest
deprecated
func NewTrackObjectRequest() VNTrackObjectRequest
Deprecated: Use NewVNTrackObjectRequest instead.
func NewTrackObjectRequestWithCompletionHandler
deprecated
func NewTrackObjectRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackObjectRequest
Deprecated: Use NewVNTrackObjectRequestWithCompletionHandler instead.
func NewTrackObjectRequestWithDetectedObjectObservation
deprecated
func NewTrackObjectRequestWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
Deprecated: Use NewVNTrackObjectRequestWithDetectedObjectObservation instead.
func NewTrackObjectRequestWithDetectedObjectObservationCompletionHandler
deprecated
func NewTrackObjectRequestWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, completionHandler VNRequestErrorHandler) VNTrackObjectRequest
Deprecated: Use NewVNTrackObjectRequestWithDetectedObjectObservationCompletionHandler instead.
func NewVNTrackObjectRequest ¶
func NewVNTrackObjectRequest() VNTrackObjectRequest
NewVNTrackObjectRequest creates a new VNTrackObjectRequest instance.
func NewVNTrackObjectRequestWithCompletionHandler ¶
func NewVNTrackObjectRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNTrackObjectRequestWithDetectedObjectObservation ¶
func NewVNTrackObjectRequestWithDetectedObjectObservation(observation IVNDetectedObjectObservation) VNTrackObjectRequest
Creates a new object tracking request with a detected object observation.
observation: A detected object observation with bounding box information.
func NewVNTrackObjectRequestWithDetectedObjectObservationCompletionHandler ¶
func NewVNTrackObjectRequestWithDetectedObjectObservationCompletionHandler(observation IVNDetectedObjectObservation, completionHandler VNRequestErrorHandler) 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 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 VNRequestErrorHandler) 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) InitWithDetectedObjectObservationSync ¶ added in v0.6.17
func (t VNTrackObjectRequest) InitWithDetectedObjectObservationSync(ctx context.Context, observation IVNDetectedObjectObservation) (*VNRequest, error)
InitWithDetectedObjectObservationSync is a synchronous wrapper around VNTrackObjectRequest.InitWithDetectedObjectObservationCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
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.
func (VNTrackObjectRequestClass) Class ¶ added in v0.5.0
func (vc VNTrackObjectRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewTrackOpticalFlowRequest
deprecated
func NewTrackOpticalFlowRequest() VNTrackOpticalFlowRequest
Deprecated: Use NewVNTrackOpticalFlowRequest instead.
func NewTrackOpticalFlowRequestWithCompletionHandler
deprecated
func NewTrackOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackOpticalFlowRequest
Deprecated: Use NewVNTrackOpticalFlowRequestWithCompletionHandler instead.
func NewTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackOpticalFlowRequest
Deprecated: Use NewVNTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewVNTrackOpticalFlowRequest ¶
func NewVNTrackOpticalFlowRequest() VNTrackOpticalFlowRequest
NewVNTrackOpticalFlowRequest creates a new VNTrackOpticalFlowRequest instance.
func NewVNTrackOpticalFlowRequestWithCompletionHandler ¶
func NewVNTrackOpticalFlowRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 NewVNTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNTrackOpticalFlowRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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 VNTrackOpticalFlowRequestComputationAccuracyMedium.
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 VNTrackOpticalFlowRequest.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.
func (VNTrackOpticalFlowRequestClass) Class ¶ added in v0.5.0
func (vc VNTrackOpticalFlowRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type VNTrackOpticalFlowRequestComputationAccuracy ¶
type VNTrackOpticalFlowRequestComputationAccuracy uint
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.
See: https://developer.apple.com/documentation/Vision/VNTrackRectangleRequest
func NewTrackRectangleRequest
deprecated
func NewTrackRectangleRequest() VNTrackRectangleRequest
Deprecated: Use NewVNTrackRectangleRequest instead.
func NewTrackRectangleRequestWithCompletionHandler
deprecated
func NewTrackRectangleRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackRectangleRequest
Deprecated: Use NewVNTrackRectangleRequestWithCompletionHandler instead.
func NewTrackRectangleRequestWithRectangleObservation
deprecated
func NewTrackRectangleRequestWithRectangleObservation(observation IVNRectangleObservation) VNTrackRectangleRequest
Deprecated: Use NewVNTrackRectangleRequestWithRectangleObservation instead.
func NewTrackRectangleRequestWithRectangleObservationCompletionHandler
deprecated
func NewTrackRectangleRequestWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler VNRequestErrorHandler) VNTrackRectangleRequest
Deprecated: Use NewVNTrackRectangleRequestWithRectangleObservationCompletionHandler instead.
func NewVNTrackRectangleRequest ¶
func NewVNTrackRectangleRequest() VNTrackRectangleRequest
NewVNTrackRectangleRequest creates a new VNTrackRectangleRequest instance.
func NewVNTrackRectangleRequestWithCompletionHandler ¶
func NewVNTrackRectangleRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNTrackRectangleRequestWithRectangleObservation ¶
func NewVNTrackRectangleRequestWithRectangleObservation(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 NewVNTrackRectangleRequestWithRectangleObservationCompletionHandler ¶
func NewVNTrackRectangleRequestWithRectangleObservationCompletionHandler(observation IVNRectangleObservation, completionHandler VNRequestErrorHandler) 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 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 VNRequestErrorHandler) 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) InitWithRectangleObservationSync ¶ added in v0.6.17
func (t VNTrackRectangleRequest) InitWithRectangleObservationSync(ctx context.Context, observation IVNRectangleObservation) (*VNRequest, error)
InitWithRectangleObservationSync is a synchronous wrapper around VNTrackRectangleRequest.InitWithRectangleObservationCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
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.
func (VNTrackRectangleRequestClass) Class ¶ added in v0.5.0
func (vc VNTrackRectangleRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewTrackTranslationalImageRegistrationRequest
deprecated
func NewTrackTranslationalImageRegistrationRequest() VNTrackTranslationalImageRegistrationRequest
Deprecated: Use NewVNTrackTranslationalImageRegistrationRequest instead.
func NewTrackTranslationalImageRegistrationRequestWithCompletionHandler
deprecated
func NewTrackTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackTranslationalImageRegistrationRequest
Deprecated: Use NewVNTrackTranslationalImageRegistrationRequestWithCompletionHandler instead.
func NewTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler
deprecated
func NewTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) VNTrackTranslationalImageRegistrationRequest
Deprecated: Use NewVNTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler instead.
func NewVNTrackTranslationalImageRegistrationRequest ¶
func NewVNTrackTranslationalImageRegistrationRequest() VNTrackTranslationalImageRegistrationRequest
NewVNTrackTranslationalImageRegistrationRequest creates a new VNTrackTranslationalImageRegistrationRequest instance.
func NewVNTrackTranslationalImageRegistrationRequestWithCompletionHandler ¶
func NewVNTrackTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 NewVNTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler ¶
func NewVNTrackTranslationalImageRegistrationRequestWithFrameAnalysisSpacingCompletionHandler(frameAnalysisSpacing coremedia.CMTime, completionHandler VNRequestErrorHandler) 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.
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.
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.
func (VNTrackTranslationalImageRegistrationRequestClass) Class ¶ added in v0.5.0
func (vc VNTrackTranslationalImageRegistrationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.IsLastFrame: 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 NewTrackingRequest
deprecated
func NewTrackingRequest() VNTrackingRequest
Deprecated: Use NewVNTrackingRequest instead.
func NewTrackingRequestWithCompletionHandler
deprecated
func NewTrackingRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTrackingRequest
Deprecated: Use NewVNTrackingRequestWithCompletionHandler instead.
func NewVNTrackingRequest ¶
func NewVNTrackingRequest() VNTrackingRequest
NewVNTrackingRequest creates a new VNTrackingRequest instance.
func NewVNTrackingRequestWithCompletionHandler ¶
func NewVNTrackingRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
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) IsLastFrame ¶ added in v0.6.5
func (t VNTrackingRequest) IsLastFrame() 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.
func (VNTrackingRequestClass) Class ¶ added in v0.5.0
func (vc VNTrackingRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.MovingAverageRadius: The moving average radius of the object the request is tracking.
See: https://developer.apple.com/documentation/Vision/VNTrajectoryObservation
func NewTrajectoryObservation
deprecated
func NewTrajectoryObservation() VNTrajectoryObservation
Deprecated: Use NewVNTrajectoryObservation instead.
func NewTrajectoryObservationWithCoder
deprecated
added in
v0.6.10
func NewTrajectoryObservationWithCoder(coder foundation.INSCoder) VNTrajectoryObservation
Deprecated: Use NewVNTrajectoryObservationWithCoder instead.
func NewVNTrajectoryObservation ¶
func NewVNTrajectoryObservation() VNTrajectoryObservation
NewVNTrajectoryObservation creates a new VNTrajectoryObservation instance.
func NewVNTrajectoryObservationWithCoder ¶
func NewVNTrajectoryObservationWithCoder(coder foundation.INSCoder) VNTrajectoryObservation
See: https://developer.apple.com/documentation/Vision/VNObservation/init(coder:)
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) 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
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.
func (VNTrajectoryObservationClass) Class ¶ added in v0.5.0
func (vc VNTrajectoryObservationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewTranslationalImageRegistrationRequest
deprecated
func NewTranslationalImageRegistrationRequest() VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequest instead.
func NewTranslationalImageRegistrationRequestWithCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptions(cgImage coregraphics.CGImageRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions instead.
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler
deprecated
func NewTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Deprecated: Use NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler instead.
func NewVNTranslationalImageRegistrationRequest ¶
func NewVNTranslationalImageRegistrationRequest() VNTranslationalImageRegistrationRequest
NewVNTranslationalImageRegistrationRequest creates a new VNTranslationalImageRegistrationRequest instance.
func NewVNTranslationalImageRegistrationRequestWithCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithCompletionHandler(completionHandler VNRequestErrorHandler) 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 VNImageRequestHandler.PerformRequestsError.
See: https://developer.apple.com/documentation/Vision/VNRequest/init(completionHandler:)
func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptions(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 NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOptionsCompletionHandler(cgImage coregraphics.CGImageRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptions(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCGImageOrientationOptionsCompletionHandler(cgImage coregraphics.CGImageRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptions(ciImage *coreimage.CIImage, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating the targeted image.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOptionsCompletionHandler(ciImage *coreimage.CIImage, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image.
ciImage: The CIImage encapsulating 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 NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptions(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request targeting a Core Image image of known orientation.
ciImage: The CIImage encapsulating 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCIImageOrientationOptionsCompletionHandler(ciImage *coreimage.CIImage, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptions(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary) VNTranslationalImageRegistrationRequest
Creates a new request that targets an image in a sample buffer.
sampleBuffer: A sample buffer containing a valid imageBuffer.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptions(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientation values.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCMSampleBufferOrientationOptionsCompletionHandler(sampleBuffer coremedia.CMSampleBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
orientation: The EXIF orientation of the image. See CGImagePropertyOrientation for supported orientations.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The callback the system invokes when the request finishes executing.
func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptions(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 NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptions(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedCVPixelBufferOrientationOptionsCompletionHandler(pixelBuffer corevideo.CVImageBufferRef, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptions(imageData foundation.NSData, 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 NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOptionsCompletionHandler(imageData foundation.NSData, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptions(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageDataOrientationOptionsCompletionHandler(imageData foundation.NSData, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptions(imageURL foundation.NSURL, 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 NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOptionsCompletionHandler(imageURL foundation.NSURL, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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 NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptions(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, 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.
options: A dictionary with options specifying auxiliary information for the image.
func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler ¶
func NewVNTranslationalImageRegistrationRequestWithTargetedImageURLOrientationOptionsCompletionHandler(imageURL foundation.NSURL, orientation imageio.CGImagePropertyOrientation, options foundation.INSDictionary, completionHandler VNRequestErrorHandler) 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.
options: A dictionary with options specifying auxiliary information for the image.
completionHandler: The block to invoke when the request has finished executing.
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.
func (VNTranslationalImageRegistrationRequestClass) Class ¶ added in v0.5.0
func (vc VNTranslationalImageRegistrationRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewVNVectorByAddingVectorToVector ¶
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 NewVNVectorByMultiplyingVectorByScalar ¶
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 NewVNVectorBySubtractingVectorFromVector ¶
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 NewVNVectorWithCoder ¶
func NewVNVectorWithCoder(coder foundation.INSCoder) VNVector
See: https://developer.apple.com/documentation/Vision/VNVector/init(coder:)
func NewVNVectorWithRTheta ¶
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 NewVNVectorWithVectorHeadTail ¶
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 NewVNVectorWithXComponentYComponent ¶
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 NewVector
deprecated
func NewVector() VNVector
Deprecated: Use NewVNVector instead.
func NewVectorByAddingVectorToVector
deprecated
Deprecated: Use NewVNVectorByAddingVectorToVector instead.
func NewVectorByMultiplyingVectorByScalar
deprecated
Deprecated: Use NewVNVectorByMultiplyingVectorByScalar instead.
func NewVectorBySubtractingVectorFromVector
deprecated
Deprecated: Use NewVNVectorBySubtractingVectorFromVector instead.
func NewVectorWithCoder
deprecated
added in
v0.6.10
func NewVectorWithCoder(coder foundation.INSCoder) VNVector
Deprecated: Use NewVNVectorWithCoder instead.
func NewVectorWithRTheta
deprecated
Deprecated: Use NewVNVectorWithRTheta instead.
func NewVectorWithVectorHeadTail
deprecated
Deprecated: Use NewVNVectorWithVectorHeadTail instead.
func NewVectorWithXComponentYComponent
deprecated
Deprecated: Use NewVNVectorWithXComponentYComponent instead.
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) InitWithCoder ¶ added in v0.6.10
func (v VNVector) InitWithCoder(coder foundation.INSCoder) VNVector
See: https://developer.apple.com/documentation/Vision/VNVector/init(coder:)
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) Class ¶ added in v0.5.0
func (vc VNVectorClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 VNVideoProcessingOption
deprecated
type VNVideoProcessingOption = string
VNVideoProcessingOption is options to pass to the video processor when adding requests.
Deprecated: Deprecated since macOS 11.0.
See: https://developer.apple.com/documentation/Vision/VNVideoProcessingOption
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 NewVNVideoProcessorWithURL ¶
func NewVNVideoProcessorWithURL(videoURL foundation.NSURL) 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 NewVideoProcessor
deprecated
func NewVideoProcessor() VNVideoProcessor
Deprecated: Use NewVNVideoProcessor instead.
func NewVideoProcessorWithURL
deprecated
func NewVideoProcessorWithURL(videoURL foundation.NSURL) VNVideoProcessor
Deprecated: Use NewVNVideoProcessorWithURL instead.
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 VNVideoProcessor.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 coremedia.CMTimeRange) (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.
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.NSURL) 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 NewVideoProcessorCadence
deprecated
func NewVideoProcessorCadence() VNVideoProcessorCadence
Deprecated: Use NewVNVideoProcessorCadence instead.
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) Init ¶
func (v VNVideoProcessorCadence) Init() VNVideoProcessorCadence
Init initializes the instance.
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.
func (VNVideoProcessorCadenceClass) Class ¶ added in v0.5.0
func (vc VNVideoProcessorCadenceClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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.
func (VNVideoProcessorClass) Class ¶ added in v0.5.0
func (vc VNVideoProcessorClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewVNVideoProcessorFrameRateCadenceWithFrameRate ¶
func NewVNVideoProcessorFrameRateCadenceWithFrameRate(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 NewVideoProcessorFrameRateCadence
deprecated
func NewVideoProcessorFrameRateCadence() VNVideoProcessorFrameRateCadence
Deprecated: Use NewVNVideoProcessorFrameRateCadence instead.
func NewVideoProcessorFrameRateCadenceWithFrameRate
deprecated
func NewVideoProcessorFrameRateCadenceWithFrameRate(frameRate int) VNVideoProcessorFrameRateCadence
Deprecated: Use NewVNVideoProcessorFrameRateCadenceWithFrameRate instead.
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.
func (VNVideoProcessorFrameRateCadenceClass) Class ¶ added in v0.5.0
func (vc VNVideoProcessorFrameRateCadenceClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewVideoProcessorRequestProcessingOptions
deprecated
func NewVideoProcessorRequestProcessingOptions() VNVideoProcessorRequestProcessingOptions
Deprecated: Use NewVNVideoProcessorRequestProcessingOptions instead.
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.
func (VNVideoProcessorRequestProcessingOptionsClass) Class ¶ added in v0.5.0
func (vc VNVideoProcessorRequestProcessingOptionsClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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 NewVNVideoProcessorTimeIntervalCadenceWithTimeInterval ¶
func NewVNVideoProcessorTimeIntervalCadenceWithTimeInterval(timeInterval corefoundation.CFTimeInterval) 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 NewVideoProcessorTimeIntervalCadence
deprecated
func NewVideoProcessorTimeIntervalCadence() VNVideoProcessorTimeIntervalCadence
Deprecated: Use NewVNVideoProcessorTimeIntervalCadence instead.
func NewVideoProcessorTimeIntervalCadenceWithTimeInterval
deprecated
func NewVideoProcessorTimeIntervalCadenceWithTimeInterval(timeInterval corefoundation.CFTimeInterval) VNVideoProcessorTimeIntervalCadence
Deprecated: Use NewVNVideoProcessorTimeIntervalCadenceWithTimeInterval instead.
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 corefoundation.CFTimeInterval) 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() corefoundation.CFTimeInterval
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.
func (VNVideoProcessorTimeIntervalCadenceClass) Class ¶ added in v0.5.0
func (vc VNVideoProcessorTimeIntervalCadenceClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
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