Vision to detect corners and or 3 lines.

End goal: to detect 3 lines, and 2 corners accurately. Trying contours but they are a bit off. Is there a way or settings in contours to detect corners and lines more accurately, maybe less an sharper edged/corner contours? Or some other API or methods please? I would love an email please ;) thank you. 2. also an overlay/scale issue

Answered by DTS Engineer in 821330022

Hello @Mike@ThatSoft,

Have you tried playing with the various properties of the DetectControursRequest?

For example, by default, the resolution of the request will be limited to 512 pixels in the longest dimension, increasing that may result in greater accuracy.

-- Greg

Hello @Mike@ThatSoft,

Have you tried playing with the various properties of the DetectControursRequest?

For example, by default, the resolution of the request will be limited to 512 pixels in the longest dimension, increasing that may result in greater accuracy.

-- Greg

hello @Greg, I do see and experimented with: private var epsilon: Float = 0.001 I see this: let req = VNDetectContoursRequest() I see no resolution of the request. Can you please advise or a sample of this resolution setting? as you saw I really desire straight line detection and the corners. Sorry I'm not a real programmer at all, trying though. 60 yr old man :) thank you. feel free to email. thx. Greg, I tried this: (did i do it right?)

private lazy var request: VNDetectContoursRequest = { let req = VNDetectContoursRequest() req.maximumImageDimension = 2000 return req }()

see no real difference in the contour shape though. Note those pics were very cropped = zoomed in.

Other big critical problem/issue I have been struggling with, is over laying the contour. Can we discuss here, or you prefer a new question with that subject? thx. I'd prefer email please :).

Hello @Mike@ThatSoft,

Yes, maximumImageDimension gives you some control over the input resolution.

You can learn about more of the contour request properties in this WWDC video (timestamped link to the relevant portion): https://developer.apple.com/videos/play/wwdc2020/10673/?time=694

If you are unable to achieve the accuracy you desire, please file an enhancement request using Feedback Assistant.

Other big critical problem/issue I have been struggling with, is over laying the contour. Can we discuss here, or you prefer a new question with that subject?

Please open a new thread to address this.

-- Greg

Vision to detect corners and or 3 lines.
 
 
Q