Tony Merritt
Tony Merritt

Reputation: 1197

rectangle detection only detecting large rectangles not smaller ones? iOS, Swift

I am using vision to detect rectangles but it only seems to be detecting larger rectangles that are more square than rectangle. Is there a way to detect longer rectangles?

Upvotes: 0

Views: 723

Answers (1)

Robert
Robert

Reputation: 361

You have to adjust the minimumAspectRatio of the VNDetectRectanglesRequest which is 0.5 per default. The green rectangle seems to have a much lower one.

Upvotes: 1

Related Questions