diff --git a/HandPose/README.md b/HandPose/README.md new file mode 100644 index 000000000..c4c26e6ed --- /dev/null +++ b/HandPose/README.md @@ -0,0 +1,21 @@ +Please run getModels.sh from the command line to download the model in the correct folder. + +### USAGE + +#### Python +**For using it on single image : ** +python handPoseImage.py + +**For using on video : ** +python handPoseVideo.py + +#### C++ +**From the command line : ** +cmake . +make + +**For using it on single image : ** +./handPoseImage + +**For using on video : ** +./handPoseVideo diff --git a/HandPose/handPoseImage.cpp b/HandPose/handPoseImage.cpp index 680f6f421..939cd674f 100644 --- a/HandPose/handPoseImage.cpp +++ b/HandPose/handPoseImage.cpp @@ -27,7 +27,7 @@ int main(int argc, char **argv) cout << "USAGE : ./handPoseImage " << endl; - string imageFile = "hand.jpg"; + string imageFile = "right-frontal.jpg"; // Take arguments from commmand line if (argc == 2) { diff --git a/HandPose/handPoseImage.py b/HandPose/handPoseImage.py index 2d0620ac6..5e09b8fe8 100644 --- a/HandPose/handPoseImage.py +++ b/HandPose/handPoseImage.py @@ -8,7 +8,7 @@ POSE_PAIRS = [ [0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[0,9],[9,10],[10,11],[11,12],[0,13],[13,14],[14,15],[15,16],[0,17],[17,18],[18,19],[19,20] ] net = cv2.dnn.readNetFromCaffe(protoFile, weightsFile) -frame = cv2.imread("hand.jpg") +frame = cv2.imread("right-frontal.jpg") frameCopy = np.copy(frame) frameWidth = frame.shape[1] frameHeight = frame.shape[0] diff --git a/HandPose/handPoseVideo.cpp b/HandPose/handPoseVideo.cpp index 77330df61..5386213e6 100644 --- a/HandPose/handPoseVideo.cpp +++ b/HandPose/handPoseVideo.cpp @@ -25,7 +25,7 @@ int main(int argc, char **argv) { float thresh = 0.01; - cv::VideoCapture cap(0); + cv::VideoCapture cap("asl.mp4"); if (!cap.isOpened()) { diff --git a/README.md b/README.md index b5f5ab12b..c22e9b80a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Learn OpenCV : C++ and Python Examples. You can find the details at [LearnOpenC | Blog Post | | | ------------- |:-------------| + +|[Hand Keypoint Detection using Deep Learning and OpenCV](https://www.learnopencv.com/hand-keypoint-detection-using-deep-learning-and-opencv/) | |[Deep learning based Object Detection and Instance Segmentation using Mask R-CNN in OpenCV (Python / C++)](https://www.learnopencv.com/deep-learning-based-object-detection-and-instance-segmentation-using-mask-r-cnn-in-opencv-python-c/) | [Code](https://github.com/spmallick/learnopencv/tree/master/Mask-RCNN) | |[Install OpenCV 4 on Ubuntu 18.04](https://www.learnopencv.com/install-opencv-4-on-ubuntu-18-04/) | [Code](https://github.com/spmallick/learnopencv/blob/master/InstallScripts/installOpenCV-18-04.sh) | |[Install OpenCV 4 on Ubuntu 16.04](https://www.learnopencv.com/install-opencv-4-on-ubuntu-16-04/) | [Code](https://github.com/spmallick/learnopencv/blob/master/InstallScripts/installOpenCV-16-04.sh) |