检查CIRectangleFeature是否为a4大小

时间:2018-10-29 11:44:30

标签: ios swift cidetector

我正在使用下面的代码来检测图像中的矩形。

let detector = CIDetector(ofType: CIDetectorTypeRectangle,
                                     context: ciContext,
                                     options: [CIDetectorAccuracy: CIDetectorAccuracyHigh])

使用此方法,我每次只会得到一个CIRectangleFeature。由于图像中可能包含子矩形,因此我想检查检测到的矩形的大小是否为A4大小。

不确定如何执行此操作。请帮助

0 个答案:

没有答案