version 0.7.11. add exception when having only 1 point
This commit is contained in:
@@ -2,7 +2,7 @@ import argparse
|
|||||||
|
|
||||||
from tsmark.video_annotator import Marker
|
from tsmark.video_annotator import Marker
|
||||||
|
|
||||||
VERSION = "0.7.10"
|
VERSION = "0.7.11"
|
||||||
|
|
||||||
|
|
||||||
class SmartFormatter(argparse.HelpFormatter):
|
class SmartFormatter(argparse.HelpFormatter):
|
||||||
|
|||||||
@@ -323,10 +323,7 @@ class Marker:
|
|||||||
history = np.array(history, np.int32).reshape((-1, 1, 2))
|
history = np.array(history, np.int32).reshape((-1, 1, 2))
|
||||||
cv2.polylines(frame, [history], False, COLOR_INTERP, 1)
|
cv2.polylines(frame, [history], False, COLOR_INTERP, 1)
|
||||||
|
|
||||||
except KeyError:
|
except (KeyError, IndexError, TypeError):
|
||||||
print(self.get_interpolated_point(), self.nr)
|
|
||||||
pass
|
|
||||||
except IndexError:
|
|
||||||
print(self.get_interpolated_point(), self.nr)
|
print(self.get_interpolated_point(), self.nr)
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user