9

I need to detect circles in an image. iOS11 allows to detect and track rectangles but how can we track circles ?

Is it possible ?

fvisticot
  • 7,936
  • 14
  • 49
  • 79

1 Answers1

1

I have not seen anything like CIRectangleFeature for circles. As a workaround you may use OpenCV framework that has a Hough Circle Transformation.

Pro: it's multi-platform compliant.

Con: you need to embed a large library for one feature.

Edit: I tried implementing an objc class VNDetectCirclesRequest : VNImageBasedRequest. Unfortunately, those classes have a private implementation and the program crashes with "-[VNDetectCirclesRequest internalPerformInContext:error:] has not been implemented". I have also tried to implement this method, but the parameter context is of type VNRequestPerformingContext that is private.

See OpenCV doc

Xvolks
  • 2,065
  • 1
  • 21
  • 32
  • 1
    Yes I have done that and it works... but I would like to use multiple libraries... Apple has vision it should have the "basics" to make a vision app without adding a new one !! – fvisticot Jul 22 '17 at 08:48
  • I agree with you, but there is no magic, if it does not exists into iOS... – Xvolks Jul 22 '17 at 20:10