Skip to content

Commit

Permalink
added some more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stormymcstorm committed Apr 17, 2023
1 parent 8de7280 commit facfc7d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Jesture
Copyright (c) 2022 JestureApp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Jesture Pipe
# JesturePipe
JesturePipe is the backend pipeline for the Jesture application.

## Prerequisites
* OpenCV

## Bazel Workspace Setup
```starlark
Expand Down
6 changes: 0 additions & 6 deletions TODO.md

This file was deleted.

12 changes: 12 additions & 0 deletions jesturepipe/jesturepipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,39 +62,51 @@ class JesturePipe : private mediapipe::CalculatorGraph {

bool isRunning() const;

/// \brief Adds a frame to the pipeline at the given timestamp
absl::Status AddFrame(std::unique_ptr<mediapipe::ImageFrame> frame,
unsigned long timestamp);

/// \brief Adds a callback for gesture recognition
absl::Status OnGestureRecognition(
std::function<absl::Status(int gesture_id, unsigned long timestamp)>
packet_callback);

/// \brief Adds a callback for gesture recordings
absl::Status OnRecordedGesture(
std::function<absl::Status(Gesture gesture, unsigned long timestamp)>
packet_callback);

/// \brief Adds a callback for hand landmarks
absl::Status OnLandmarks(
std::function<absl::Status(
std::vector<mediapipe::NormalizedLandmarkList> multi_hand_landmarks,
unsigned long timestamp)>
packet_callback);

/// \brief Adds a callback for hand presences
absl::Status OnHandPresence(
std::function<absl::Status(bool present, unsigned long timestamp)>
packet_callback);

/// \brief Checks whether or not the pipeline is currently recording
bool IsRecording() const;

/// \brief Sets the recording mode for the pipeline
absl::Status SetRecording(bool);

/// \brief Sets the gesture associated with the given id
void SetGesture(int gesture_id, Gesture gesture);

/// \brief Removes the gesture associated with the given id
void RemoveGesture(int gesture_id);

/// \brief Removes all gestures
void ClearGestures();

/// \brief Sets the action associated with the given gesture id
void SetAction(int gesture_id, ActionList actions);

/// \brief Removes the action associated with the given gesture id
void RemoveAction(int gesture_id);

private:
Expand Down
17 changes: 11 additions & 6 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,16 @@ def jesturepipe_repositories():
path = "/opt/homebrew",
)

maybe(
git_repository,
# maybe(
# git_repository,
# name = "actions",
# remote = "[email protected]:jesture/actions.git",
# # tag = "v0.1.1",
# commit = "81a1fc11b6ac9e7bfa039e05499739b58164f9c1",
# shallow_since = "1681110432 +0000",
# )
http_archive(
name = "actions",
remote = "[email protected]:jesture/actions.git",
# tag = "v0.1.1",
commit = "81a1fc11b6ac9e7bfa039e05499739b58164f9c1",
shallow_since = "1681110432 +0000",
strip_prefix = "Actions-1.0.0",
url = "https://github.com/JestureApp/Actions/archive/refs/tags/v1.0.0.zip",
)

0 comments on commit facfc7d

Please sign in to comment.