Fixed bug in roi assignment

This commit is contained in:
Prianka Liz Kariat 2023-03-23 18:40:15 +05:30
parent 6e62c113fb
commit 3227635ea0

View File

@ -97,7 +97,7 @@ static const NSInteger kMPPOrientationDegreesLeft = -270;
return std::nullopt; return std::nullopt;
} }
CGRect calculatedRoi = CGRectEqualToRect(roi, CGRectZero) ? roi : CGRectMake(0.0, 0.0, 1.0, 1.0); CGRect calculatedRoi = CGRectEqualToRect(roi, CGRectZero) ? CGRectMake(0.0, 0.0, 1.0, 1.0) : roi;
NormalizedRect normalizedRect; NormalizedRect normalizedRect;
normalizedRect.set_x_center(CGRectGetMidX(calculatedRoi)); normalizedRect.set_x_center(CGRectGetMidX(calculatedRoi));
@ -138,7 +138,7 @@ static const NSInteger kMPPOrientationDegreesLeft = -270;
} }
- (std::optional<PacketMap>)processImagePacketMap:(const PacketMap &)packetMap - (std::optional<PacketMap>)processImagePacketMap:(const PacketMap &)packetMap
error:(NSError **)error { error:(NSError **)error {
if (_runningMode != MPPRunningModeImage) { if (_runningMode != MPPRunningModeImage) {
[MPPCommonUtils [MPPCommonUtils
createCustomError:error createCustomError:error