pose_camera_view 1.0.3 copy "pose_camera_view: ^1.0.3" to clipboard
pose_camera_view: ^1.0.3 copied to clipboard

Pose Camera view uses Google ML Kit to track your push-ups. It emits 'init', 'middle', and 'completed' events for each rep, and displays the total count.

banner

PoseCameraView Widget #

build pose_camera_view

A Flutter widget that allows you to detect and analyze poses in real-time using the device's camera, with a specific focus on push-up tracking.

Preview #

Installation #

Add pose_camera_view to dependecies in your file pubspec.yaml:

dependencies:
  pose_camera_view: <última_versión>

Make the import in your code.

import 'package:pose_camera_view/pose_camera_view.dart';

How use it

PoseCameraView(
  onPoseData: (poseData) {
    switch (poseData.pushUpState) {
      case PushUpState.middle:
        print("MIDDLE");
        break;
      case PushUpState.completed:
        print("COMPLETED");
        counterNotifier.value++;
        break;
      case PushUpState.init:
        print("INIT");
        break;
      case PushUpState.neutral:
        // Manejar este caso
        break;
    }
  },
  elbowAngleMin: 60.0,
  elbowAngleMax: 160.0,
)

Parameters #

  • onPoseData: Callback that is called with the detected pose data.
  • elbowAngleMin: Minimum elbow angle to consider a valid flexion.
  • elbowAngleMax: Maximum elbow angle to consider a valid flexion.

Push Up states #

  • PushUpState.init: Initial position of pushup.
  • PushUpState.middle: Halfway through pushup.
  • PushUpState.completed: Pushup completed.

Examples #

For a more complete example, see the example folder in this repository. Contributions Contributions are welcome. Please open an issue or send a pull request with your suggestions.

License #

This project is licensed under the MIT License - see the LICENSE file for more details.

6
likes
0
points
52
downloads

Publisher

verified publisherpaolojoaquin.com

Weekly Downloads

Pose Camera view uses Google ML Kit to track your push-ups. It emits 'init', 'middle', and 'completed' events for each rep, and displays the total count.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

camera, flutter, google_ml_kit

More

Packages that depend on pose_camera_view