diff --git a/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm b/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm index 98d46f17e..964cd38c7 100644 --- a/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm +++ b/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm @@ -90,7 +90,7 @@ static const NSInteger kMPPOrientationDegreesLeft = -270; (UIImageOrientation)imageOrientation ROIAllowed:(BOOL)ROIAllowed error:(NSError **)error { - if (CGRectEqualToRect(roi, CGRectZero) && !ROIAllowed) { + if (!CGRectEqualToRect(roi, CGRectZero) && !ROIAllowed) { [MPPCommonUtils createCustomError:error withCode:MPPTasksErrorCodeInvalidArgumentError description:@"This task doesn't support region-of-interest."];