mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-07 11:21:11 +03:00
Various fixes (#17342)
* Remove imutils * Ensure that state is maintained when setting search params * Change script for version of setuptools * Fix * Fix
This commit is contained in:
@@ -265,6 +265,19 @@ def draw_box_with_label(
|
||||
)
|
||||
|
||||
|
||||
def grab_cv2_contours(cnts):
|
||||
# if the length the contours tuple returned by cv2.findContours
|
||||
# is '2' then we are using either OpenCV v2.4, v4-beta, or
|
||||
# v4-official
|
||||
if len(cnts) == 2:
|
||||
return cnts[0]
|
||||
|
||||
# if the length of the contours tuple is '3' then we are using
|
||||
# either OpenCV v3, v4-pre, or v4-alpha
|
||||
elif len(cnts) == 3:
|
||||
return cnts[1]
|
||||
|
||||
|
||||
def is_label_printable(label) -> bool:
|
||||
"""Check if label is printable."""
|
||||
return not bool(set(label) - set(printable))
|
||||
|
||||
Reference in New Issue
Block a user