There is probably something like this already, but probably not free and open source, as quick search through F-Droid did not show it.

A fitness app where you place your phone under your face and it counts how many push ups you did.
What would be the best way to detect a push-up?
My idea is to have user touch the touchscreen with their nose. That would initiate the first part.
Second part would be more complex: use the front-facing camera to figure out if user’s face is far enough to be considered a completed push-up. User would have to calibrate the app at the start, or maybe even at the start of each session, indicating how far away is the max height that they achieve. Probably no need for full facial recognition for this, some colour-matching algorithm should be enough. And use phone’s gyro to check whether phone is actually in a horisontal position.

Maybe this idea has enough potential to actually get a project going.

  • thecodemonk@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    Or you could have them place the phone on their back and use the sensors to detect the up and down movement then audibly count the reps.

  • tomatobeard@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    The proximity sensor may be the way to go, but the range is pretty small. Still, less complicated than using the camera, and if someone is seeking this kind of app, I doubt they’d want to “cheat” by only pushing up 10cm, haha. Could place the phone under your chest instead of face too.

  • glad_cat@lemmy.sdf.org
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    There used to be a lot of apps that did this after the year 2000. Maybe you could ask for microphone permission and add one push-up when the user says something loud (anything actually as long as it’s loud). It would add one push-up when you’re close to the microphone and say one, two, three, etc.

    No need to recognize words or translate, just add one according to the level of the sound.