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

FaceLandmarks show incorrect CGPoints while drawing path #14

Open
Nisha-SpaceoTech opened this issue Jul 19, 2018 · 1 comment
Open

Comments

@Nisha-SpaceoTech
Copy link

When I try to replace camera with static image, it detects the face landmarks but points are misplaced. Below is the code, where the points are misplaced and it draws the path on wrong position.

if let boundingBox = self.faceLandmarks.inputFaceObservations?.first?.boundingBox {
let faceBoundingBox = boundingBox.scaled(to: self.imgView.frame.size)
//different types of landmarks

                    let allpoints = observation.landmarks?.allPoints
                    self.convertPointsForFace(allpoints, faceBoundingBox)

}

Can you please help me to get correct facelandmarks points from static image?

@KeeganRen
Copy link
Member

@Nisha-SpaceoTech you can use the func only once.
FaceARDetect/FaceARDetectIOS.h
-(BOOL) run_FaceAR:(cv::Mat)captured_image frame__:(int)frame_count fx__:(double)fx fy__:(double)fy cx__:(double)cx cy__:(double)cy;

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

2 participants