2
また、この質問が見つかりましたon Apple Dev Forum。CIDetectorは、CIDetectorTypeRectangle型の複数のCIFeatureを返しますか?
CIDetectorTypeRectangle
で設定されたCIDetector
は1つ以上の長方形を返すことはできますか?
現時点では、画像が長方形でいっぱいであっても、このコードではfeature.count
が0
または1
になります。
let context = CIContext()
let opts = [CIDetectorAccuracy : CIDetectorAccuracyHigh]
let detector = CIDetector(ofType: CIDetectorTypeRectangle, context: context, options: opts)
let image = CIImage(image: self.photoTaken)
let features = detector.features(in: image)
print(features.count) // never more than 1
Apple Devフォーラムで何の答えも見つからなかったのは分かりました。未来はすぐに到着します.2年後です!ありがとうジョー。 – Tulleb