Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

improved code structure #3

Merged
merged 4 commits into from
Aug 5, 2022
Merged

improved code structure #3

merged 4 commits into from
Aug 5, 2022

Conversation

dpshekhawat
Copy link
Collaborator

@dpshekhawat dpshekhawat commented Aug 1, 2022

Results of the PR:

  • More code readability.
  • Set environment variables for -

THRES -> for confidence threshold.
TIMEINT -> for time interval of capturing frames.
CAPTURE -> to stop capturing if set to False.

  • Not burning any CPU while waiting around.
  • Handling Permission Error.

main.py Outdated Show resolved Hide resolved
main.py Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@pkliczewski pkliczewski left a comment

Choose a reason for hiding this comment

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

It looks much better but adding 3 more comments

main.py Outdated Show resolved Hide resolved
main.py Outdated
# Get Frames
ret, frame = cap.read()

if ret:
Copy link
Collaborator

Choose a reason for hiding this comment

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

read method returns True if object is read correctly (reference). We only attempt to detect object if we fail.

main.py Outdated Show resolved Hide resolved
@pkliczewski
Copy link
Collaborator

Looks great, the change is ready to merge

@dpshekhawat dpshekhawat merged commit a1be881 into main Aug 5, 2022
@dpshekhawat dpshekhawat deleted the dev branch September 6, 2022 17:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants