Skip to content

Commit

Permalink
update requirements and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
VanDavv committed Oct 21, 2021
1 parent 959704e commit fd4ea6d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
12 changes: 5 additions & 7 deletions depthai_sdk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
opencv-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l"
opencv-contrib-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l"
opencv-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l"
opencv-contrib-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l"
blobconverter==1.2.2
pytube==11.0.1
depthai
opencv-python>4
opencv-contrib-python>4
blobconverter>=1.2.2
pytube>=11.0.1
depthai>2
2 changes: 1 addition & 1 deletion depthai_sdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='depthai-sdk',
version='1.1.1',
version='1.1.2',
description='This package contains convenience classes and functions that help in most common tasks while using DepthAI API',
long_description=io.open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
Expand Down
9 changes: 4 additions & 5 deletions depthai_sdk/src/depthai_sdk/fps.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class FPSHandler:
def __init__(self, cap=None, maxTicks = 100):
"""
Args:
cap (cv2.VideoCapture): handler to the video file object
maxTicks (int): maximum queue length in tickFps computation
cap (cv2.VideoCapture, Optional): handler to the video file object
maxTicks (int, Optional): maximum ticks amount for FPS calculation
"""
self._timestamp = None
self._start = None
Expand All @@ -31,9 +31,8 @@ def __init__(self, cap=None, maxTicks = 100):
self._ticks = {}

if maxTicks < 2:
warnings.warn(f"FPSHandler maxTicks value must be 2 or higher. "
f"It will automatically be set to 2 instead of {maxTicks}")
maxTicks = 2
raise ValueError(f"Proviced maxTicks value must be 2 or higher (supplied: {maxTicks})")

self._maxTicks = maxTicks

def nextIter(self):
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ argcomplete==1.12.1
-e ./depthai_sdk
--extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
depthai==2.10.0.0.dev+7a0749a61597c086c5fd6e579618ae33accec8df
opencv-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l"
opencv-contrib-python==4.5.1.48 ; platform_machine != "aarch64" and platform_machine != "armv6l" and platform_machine != "armv7l"
opencv-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l"
opencv-contrib-python==4.4.0.46 ; platform_machine == "armv6l" or platform_machine == "armv7l"

0 comments on commit fd4ea6d

Please sign in to comment.