Updated face detector to use new methods from vision task runner
This commit is contained in:
parent
6fabc35ce7
commit
23d97292a6
|
@ -128,10 +128,8 @@ static NSString *const kTaskName = @"faceDetector";
|
|||
timestampInMilliseconds:(NSInteger)timestampInMilliseconds
|
||||
error:(NSError **)error {
|
||||
std::optional<NormalizedRect> rect =
|
||||
[_visionTaskRunner normalizedRectFromRegionOfInterest:CGRectZero
|
||||
[_visionTaskRunner normalizedRectWithImageOrientation:image.orientation
|
||||
imageSize:CGSizeMake(image.width, image.height)
|
||||
imageOrientation:image.orientation
|
||||
ROIAllowed:NO
|
||||
error:error];
|
||||
if (!rect.has_value()) {
|
||||
return std::nullopt;
|
||||
|
@ -154,10 +152,8 @@ static NSString *const kTaskName = @"faceDetector";
|
|||
|
||||
- (nullable MPPFaceDetectorResult *)detectInImage:(MPPImage *)image error:(NSError **)error {
|
||||
std::optional<NormalizedRect> rect =
|
||||
[_visionTaskRunner normalizedRectFromRegionOfInterest:CGRectZero
|
||||
[_visionTaskRunner normalizedRectWithImageOrientation:image.orientation
|
||||
imageSize:CGSizeMake(image.width, image.height)
|
||||
imageOrientation:image.orientation
|
||||
ROIAllowed:NO
|
||||
error:error];
|
||||
if (!rect.has_value()) {
|
||||
return nil;
|
||||
|
|
Loading…
Reference in New Issue
Block a user