Filtering Contours from Vision

Hello, I need help I desire to select/filter the contours on an image. Not sure best way to do that. Idea select/filter for bottom left most contour? see image attached please. also will need end points or court corners. and need contour to be fine line, smooth, ie accurate of the court end line and side lines only is desired. thank you :) or also glad for other ideas or api to determine the lines/corners I need.

glad to email to discuss if that is better/easier actually prefer that. thanks.

Answered by DTS Engineer in 820303022

Hello @Mike@ThatSoft,

You can use the normalizedPoints of each of the contours you receive to search for which contour contains the bottom-left most point.

-- Greg

Hello @Mike@ThatSoft,

You can use the normalizedPoints of each of the contours you receive to search for which contour contains the bottom-left most point.

-- Greg

Hello Greg, thanks for your reply. kept trying & filtered by 2nd largest area contour. Forgive my terms please I am not a real programmer. Believe I am using normalizedPoints at least in the SwiftUI test little app I found a tutorial to alter and test on. My app I see var keyContours = [VNContour]() Is this using normalized points? ok, well now lets say we have 1 contour. I be glad to share with you the image so you can see it? can we e-mail? can we get a contour bounding box? need 4 corners.

hello I got contour filtered. Should I ask this here or make a new question? still contour related. See pics. this zoomed in a lot. can we somehow get contours to be more, or contour the contour more accurately? or less contours might help and thus detect corners more? or any method to detach corners or lines better and accurately please? :) note: the black line is the contour, not the circle.

Filtering Contours from Vision
 
 
Q