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

.touchUpInside without blinking + camera live preview #8

Open
SwiftyFlow opened this issue Dec 15, 2021 · 4 comments
Open

.touchUpInside without blinking + camera live preview #8

SwiftyFlow opened this issue Dec 15, 2021 · 4 comments

Comments

@SwiftyFlow
Copy link

SwiftyFlow commented Dec 15, 2021

Would it be possible to .touchUpInside without blinking? just when hitting the button box...

Also have the camera live preview?

Thanks!

@SwiftyFlow SwiftyFlow changed the title .touchUpInside without blinking .touchUpInside without blinking + camera live preview Dec 15, 2021
@broag
Copy link
Collaborator

broag commented Dec 15, 2021

Both would be possible. I'll take a look at what it would require in a bit here...

@SwiftyFlow
Copy link
Author

wow you answered so fast! If it makes more sense, I'd like to track the nose, and if the nose hits the button, consider it pressed... All that by seeing the user's face so he can see his nose hitting the button... Legend!

@broag
Copy link
Collaborator

broag commented Dec 15, 2021

Yeah I know what you are talking about. It should be pretty easy, you really just want a focus trigger which already exists for highlighting. If you can stand a delay, I think there is already a feature that you could enable to do this by "Dwell Clicking".

@broag
Copy link
Collaborator

broag commented Dec 16, 2021

So Jabberwocky HTKit built using a plugin based architecture and you can create your own HTFeature classes (in your project) and then initialize them. Although this might take a bit of digging in on your part, you can create both of the things you want without any changes to the JabberwockyHTKit.

The Feature loading looks like this:

let features: [HTFeature.Type] = [
        BannerWarningsFeature.self,
        // CursorBlinkClickFeature.self, // -- DON'T NEED THIS
        CursorDrawFeature.self,
        // CursorDwellClickFeature.self, // -- REPLACING THIS WITH YOUR OWN HOVER CLICK FEATURE...
        YourCursorHoverClickFeature.self, // --YOUR HOVER CLICK FEATURE
        FaceMeshFeature.self, // --THIS OR YOUR OWN CAMERA PREVIEW FEATURE
        CursorFocusAndClickAnimationFeature.self,
        CursorFocusFeature.self,
        CursorRecalibrationFeature.self
    ]
HeadTracking.configure(withEngine: ARKitHTEngine.self, withFeatures: features)
HeadTracking.shared.enable()

And you would want to create a Feature that is "very" similar to: https://github.com/swiftablellc/jabberwocky-head-tracking-kit-ios/blob/master/JabberwockyHTKit/Features/CursorDwellClickFeature.swift

And for the camera live preview there is a mesh based feature that already exists for demoing. Maybe it'll work for you: https://github.com/swiftablellc/jabberwocky-head-tracking-kit-ios/blob/master/JabberwockyHTKit/Features/FaceMeshFeature.swift

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