update: I added
// Close the path to ensure it can be filled
newPath.closeSubpath()
but Path still not closed or .fill fillable.
Post
Replies
Boosts
Views
Activity
looks like I got a line added across the top, but that top section did not .fill in. here is the func:
func updateContourPath(contourPath: Path, topLeft: CGPoint, topRight: CGPoint) -> Path {
var newPath = Path()
// Copy the original path
newPath.addPath(contourPath)
// Move to the starting point and add a line to the ending point
newPath.move(to: topLeft)
newPath.addLine(to: topRight)
return newPath
}
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 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.
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.
humm ok, can we please email for steps to get CreateML model to work as I need? thanks. you have my email I assume? much appreciated.
woops, 30-40 mpg ball speed...
thanks for help please. :)