我正在使用下面的代码来检测图像中的矩形。
let detector = CIDetector(ofType: CIDetectorTypeRectangle,
context: ciContext,
options: [CIDetectorAccuracy: CIDetectorAccuracyHigh])
使用此方法,我每次只会得到一个CIRectangleFeature
。由于图像中可能包含子矩形,因此我想检查检测到的矩形的大小是否为A4大小。
不确定如何执行此操作。请帮助