我正在尝试访问图像的特定部分以对图像的用户定义区域执行 VNCoreMLRequest。我在某些感兴趣的区域遇到错误,而其他区域则很好。每个区域都是标准化的。
以下两个领域有效:
regionOfInterest CGRect (origin = (x = 0.49538024164889838, y = 0.31979695431472077), size = (width = 0.26865671641791045, height = 0.24492385786802032))
regionOfInterest CGRect (origin = (x = 0.13290689410092396, y = 0.28807106598984761), size = (width = 0.24733475479744135, height = 0.19416243654822332))
但以下两个领域不起作用:
regionOfInterest CGRect (origin = (x = 0.15422885572139303, y = 0.87563451776649747), size = (width = 0.29992892679459843, height = 0.32106598984771573))
错误消息:“感兴趣区域 [0.148543, 0.874365, 0.319829, 0.31599] 不在 [0 0 1 1] 的标准化范围内”
regionOfInterest CGRect (origin = (x = 0.57640369580668083, y = 0.90862944162436543), size = (width = 0.24307036247334754, height = 0.36928934010152287))
有人能指出我没有看到什么吗?也许有一些我不了解的东西regionOfInterest