descriptor
TypeScriptget descriptor(): RequestDescriptorSwift declarationvar descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
struct · iOS 18.0+ · SDK 27.1
struct DetectContoursRequestA request that detects the contours of the edges of an image.
get descriptor(): RequestDescriptorSwift declarationvar descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
get contrastPivot(): (number) | nullSwift declarationvar contrastPivot: Float?The pixel value to use as a pivot for the contrast. 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.
set contrastPivot(value: (number) | null)Swift declarationvar contrastPivot: Float?The pixel value to use as a pivot for the contrast. 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.
get regionOfInterest(): NormalizedRectSwift declarationvar regionOfInterest: NormalizedRectThe region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.
set regionOfInterest(value: NormalizedRect)Swift declarationvar regionOfInterest: NormalizedRectThe region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.
setComputeDevice(computeDevice: (_CoreML_MLComputeDevice) | null, computeStage: ComputeStage): voidSwift declarationmutating func setComputeDevice(_ computeDevice: MLComputeDevice?, for computeStage: ComputeStage)Assigns a compute device for a compute stage. 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. Use `supportedComputeStageDevices` to get valid compute devices for a request’s compute stages. - Parameters: - `computeDevice: `The compute device to assign to the compute stage. - `computeStage: `The compute stage.
get contrastAdjustment(): numberSwift declarationvar contrastAdjustment: FloatThe amount by which to adjust the image contrast. 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.
set contrastAdjustment(value: number)Swift declarationvar contrastAdjustment: FloatThe amount by which to adjust the image contrast. 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.
get detectsDarkOnLight(): booleanSwift declarationvar detectsDarkOnLight: BoolA Boolean value that indicates whether the request detects a dark object on a light background to aid in detection. The default value is `true`.
set detectsDarkOnLight(value: boolean)Swift declarationvar detectsDarkOnLight: BoolA Boolean value that indicates whether the request detects a dark object on a light background to aid in detection. The default value is `true`.
static get supportedRevisions(): Array<DetectContoursRequest_Revision>Swift declarationstatic let supportedRevisions: [DetectContoursRequest.Revision]get maximumImageDimension(): numberSwift declarationvar maximumImageDimension: IntThe maximum image dimension to use for contour detection. 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. The minimum value supported is 64. The default value is 512.
set maximumImageDimension(value: number)Swift declarationvar maximumImageDimension: IntThe maximum image dimension to use for contour detection. 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. The minimum value supported is 64. The default value is 512.
get revision(): DetectContoursRequest_RevisionSwift declarationlet revision: DetectContoursRequest.RevisionThe request's configured revision.
static init(revision?: (DetectContoursRequest_Revision) | null): DetectContoursRequestSwift declarationinit(_ revision: DetectContoursRequest.Revision? = nil)- Parameters: - revision: The specific algorithm or implementation revision that is to be used to perform the request.
No declarations were skipped in this snapshot.