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

Performance issues? #3

Open
NatanTechofNY opened this issue Feb 28, 2017 · 5 comments
Open

Performance issues? #3

NatanTechofNY opened this issue Feb 28, 2017 · 5 comments

Comments

@NatanTechofNY
Copy link

Any reason why the game lags so bad and why frame drops?
Also, the game does not align the mouth correctly.

@stanchiang
Copy link
Owner

What device are you using? I need to optimize the video feed to boost fps. It works fine on my 6+. If I document the app more would you be interested in helping fix it with a pull request?

The mouth alignment functionality might be off if your not on a 6+. If you go to the game gallery.swift there is a bool called debugmode. Turning that on will load a debugging UI. You access it by swiping left on the camera. From there you can adjust the one called PPI up or down to get the mouth aligned. The problem comes from a buggy conversion between pixels and cgpoints. I have a constant set by that PPI debug var to compensate for the bug and it's tuned to each device. I had it working at one point but maybe it got messed up down the road.

@NatanTechofNY
Copy link
Author

NatanTechofNY commented Feb 28, 2017

I am running on a 7+. If you document the app I can help you out. Just let me know when you do. Also make sure that the API calls to Segment do not interfere with the frames or performance. I would hold off on Segment Analytics till you have a steady working application.

@stanchiang
Copy link
Owner

There's also a difference in how the tracking works between the app store version and the one in master. This new one can track the face at more angles, but does more calculations so that also impacts performance. I just haven't been able to test the most up to date version on any devices other than my own.

@stanchiang
Copy link
Owner

Ok I'll let you know when I have more documentation. Good idea about the segment calls.

@stanchiang
Copy link
Owner

Instead of documenting everything, I stripped out all the unnecessary code into a boilerplate version for just the augmented reality functionality. http://git.io/fluidAR

In that app, if you go to the DebugView.swift you should see a getAdjustedPPI which is returning a constant based on the devices height. This was to compensate for my buggy pixel to point converter in my file CVFFaceDetect.mm called pixelToPoints.

You can try to debug root cause at the pixelToPoints function or tweak the getAdjustedPPI constants to fix the issue

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