Skip to content

Add feature to capture gesture images#2

Open
proishan11 wants to merge 1 commit into
mohdomama:masterfrom
proishan11:feat/img
Open

Add feature to capture gesture images#2
proishan11 wants to merge 1 commit into
mohdomama:masterfrom
proishan11:feat/img

Conversation

@proishan11

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread CaptureImage.py
@@ -0,0 +1,47 @@
import os
import sys
import cv2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order imports alphabetically.

Comment thread CaptureImage.py


def main() :

@RJ722 RJ722 Oct 8, 2018

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove empty line.

Comment thread CaptureImage.py
imageName = input("Enter the image name")

cap = cv2.VideoCapture(0)
rootName = 'HandGestures/' + gestureClass

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use os.path.join. Joining using / is always a bad idea.

Comment thread CaptureImage.py
path = os.path.join("./", rootName)
print(path)

cv2.imwrite(path+"/{}{}.jpg".format(imageName, currentFrame), frame)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment, use os.path.join

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, remove unnecessary new lines. What editor do you use? You can generally find these exceptions using a linter like flake8/pep8 while writing code. Try installing one of those.

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

Successfully merging this pull request may close these issues.

2 participants