1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// VNTrackRectangleRequest tracks a rectangle in a sequence of images.
///
/// The VNTrackRectangleRequest is a special tracker to track rectangular shape objects. The VNTrackRectangleRequest is initialized with a VNRectangleObservation object that contains a rectangle bounding box and four corners locations. VNRectangleObservation can be obtained by running rectangle detector (VNDetectRectanglesRequest). The VNTrackRectangleRequest is processed using one of the [VNSequenceRequestHandler performRequests:...] methods.
///
/// Note: The rectangular object doesn't have to look like a rectangle when projected into the plane of the image of interest. For example, it may look like trapezoid.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackrectanglerequest?language=objc)
#[unsafe(super(VNTrackingRequest, VNImageBasedRequest, VNRequest, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
pub struct VNTrackRectangleRequest;
);
#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
extern_conformance!(
unsafe impl NSCopying for VNTrackRectangleRequest {}
);
#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
unsafe impl CopyingHelper for VNTrackRectangleRequest {
type Result = Self;
}
#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
extern_conformance!(
unsafe impl NSObjectProtocol for VNTrackRectangleRequest {}
);
#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
impl VNTrackRectangleRequest {
extern_methods!(
#[cfg(feature = "VNObservation")]
/// Create a new rectangle tracking request with rectangle observation.
///
///
/// Parameter `observation`: Rectangle observation with bounding box and rectangle corners location info.
#[unsafe(method(initWithRectangleObservation:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRectangleObservation(
this: Allocated<Self>,
observation: &VNRectangleObservation,
) -> Retained<Self>;
#[cfg(all(feature = "VNObservation", feature = "block2"))]
/// Create a new rectangle tracking request with rectangle observation.
///
///
/// Parameter `observation`: Rectangle observation with bounding box and rectangle corners location info.
///
/// Parameter `completionHandler`: The block that is invoked when the request has been performed.
///
/// # Safety
///
/// `completion_handler` must be a valid pointer or null.
#[unsafe(method(initWithRectangleObservation:completionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRectangleObservation_completionHandler(
this: Allocated<Self>,
observation: &VNRectangleObservation,
completion_handler: VNRequestCompletionHandler,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "block2")]
/// # Safety
///
/// `completion_handler` must be a valid pointer or null.
#[unsafe(method(initWithCompletionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCompletionHandler(
this: Allocated<Self>,
completion_handler: VNRequestCompletionHandler,
) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
impl VNTrackRectangleRequest {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackrectanglerequestrevision1?language=objc)
pub static VNTrackRectangleRequestRevision1: NSUInteger = 1;