Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong value of rectangle #13

Open
kennir opened this issue Jan 23, 2025 · 0 comments
Open

wrong value of rectangle #13

kennir opened this issue Jan 23, 2025 · 0 comments

Comments

@kennir
Copy link

kennir commented Jan 23, 2025

May I ask if the maxX here should be maxY?

'''
#if os(iOS)
@available(iOS 12.0, *)
#endif
func processObservation(_ observation: VNFaceObservation,_ imageSize: CGSize) -> [String:Any?] {
// Retrieve all torso points.
let recognizedPoints = observation.boundingBox
let coord = VNImagePointForNormalizedPoint(recognizedPoints.origin,
Int(imageSize.width),
Int(imageSize.height))
return [
"minX":Double(recognizedPoints.minX),
"maxX":Double(recognizedPoints.maxX),
"minY":Double(recognizedPoints.minY),
"maxY":Double(recognizedPoints.maxX), <------ maxY ?
"height":Double(recognizedPoints.height),
"width":Double(recognizedPoints.width),
"origin": ["x":coord.x,"y":coord.y]
]
}
'''

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant