Updated formatting
This commit is contained in:
parent
4401b11c3a
commit
37e14a7cad
|
@ -86,7 +86,8 @@ static NSString *const kTaskName = @"objectDetector";
|
|||
// Capturing `self` as weak in order to avoid `self` being kept in memory
|
||||
// and cause a retain cycle, after self is set to `nil`.
|
||||
MPPObjectDetector *__weak weakSelf = self;
|
||||
dispatch_queue_t callbackQueue = dispatch_queue_create([MPPVisionTaskRunner uniqueQueueNameWithTaskName:kTaskName], NULL);
|
||||
dispatch_queue_t callbackQueue =
|
||||
dispatch_queue_create([MPPVisionTaskRunner uniqueQueueNameWithTaskName:kTaskName], NULL);
|
||||
packetsCallback = [=](absl::StatusOr<PacketMap> statusOrPackets) {
|
||||
if (!weakSelf) {
|
||||
return;
|
||||
|
@ -117,13 +118,11 @@ static NSString *const kTaskName = @"objectDetector";
|
|||
objectDetectionResultWithDetectionsPacket:statusOrPackets.value()[kDetectionsStreamName
|
||||
.cppString]];
|
||||
|
||||
NSInteger timeStampInMilliseconds = outputPacketMap[kImageOutStreamName.cppString]
|
||||
.Timestamp()
|
||||
.Value() /
|
||||
NSInteger timeStampInMilliseconds =
|
||||
outputPacketMap[kImageOutStreamName.cppString].Timestamp().Value() /
|
||||
kMicroSecondsPerMilliSecond;
|
||||
dispatch_async(callbackQueue, ^{
|
||||
[weakSelf.objectDetectorDelegate
|
||||
objectDetector:weakSelf
|
||||
[weakSelf.objectDetectorDelegate objectDetector:weakSelf
|
||||
didFinishDetectionWithResult:result
|
||||
timestampInMilliseconds:timeStampInMilliseconds
|
||||
error:callbackError];
|
||||
|
|
|
@ -44,13 +44,14 @@ NS_SWIFT_NAME(ObjectDetectorDelegate)
|
|||
*
|
||||
* @param objectDetector The object detector which performed the object detection.
|
||||
* This is useful to test equality when there are multiple instances of `MPPObjectDetector`.
|
||||
* @param result The `MPPObjectDetectionResult` object that contains a list of detections, each detection
|
||||
* has a bounding box that is expressed in the unrotated input frame of reference coordinates
|
||||
* system, i.e. in `[0,image_width) x [0,image_height)`, which are the dimensions of the underlying
|
||||
* image data.
|
||||
* @param result The `MPPObjectDetectionResult` object that contains a list of detections, each
|
||||
* detection has a bounding box that is expressed in the unrotated input frame of reference
|
||||
* coordinates system, i.e. in `[0,image_width) x [0,image_height)`, which are the dimensions of the
|
||||
* underlying image data.
|
||||
* @param timestampInMilliseconds The timestamp (in milliseconds) which indicates when the input
|
||||
* image was sent to the object detector.
|
||||
* @param error An optional error parameter populated when there is an error in performing object detection on the input live stream image data.
|
||||
* @param error An optional error parameter populated when there is an error in performing object
|
||||
* detection on the input live stream image data.
|
||||
*
|
||||
*/
|
||||
- (void)objectDetector:(MPPObjectDetector *)objectDetector
|
||||
|
|
Loading…
Reference in New Issue
Block a user