fixed video path
This commit is contained in:
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
+3
-10
@@ -6,6 +6,8 @@ import imutils as im
|
|||||||
IMG_SCALE_UP = 1
|
IMG_SCALE_UP = 1
|
||||||
SEARCH_AREA = 0.2
|
SEARCH_AREA = 0.2
|
||||||
|
|
||||||
|
(major_ver, minor_ver, subminor_ver) = cv2.__version__.split('.')
|
||||||
|
print(cv2.__version__)
|
||||||
|
|
||||||
def bbox_extend(bbox: cv2.typing.Rect, search_area: float):
|
def bbox_extend(bbox: cv2.typing.Rect, search_area: float):
|
||||||
we2 = int(round(bbox[2]*search_area/2))
|
we2 = int(round(bbox[2]*search_area/2))
|
||||||
@@ -63,15 +65,6 @@ def match(image_bbox, image_template, current_angle):
|
|||||||
|
|
||||||
return current_angle, best_maxLoc
|
return current_angle, best_maxLoc
|
||||||
|
|
||||||
(major_ver, minor_ver, subminor_ver) = cv2.__version__.split('.')
|
|
||||||
|
|
||||||
# Set up tracker.
|
|
||||||
# Instead of MIL, you can also use
|
|
||||||
|
|
||||||
print(cv2.__version__)
|
|
||||||
|
|
||||||
bbox = (100, 100, 100, 100)
|
|
||||||
bbox = bbox_extend(bbox, 0.5)
|
|
||||||
|
|
||||||
trackers = {
|
trackers = {
|
||||||
'KCF': cv2.TrackerKCF,
|
'KCF': cv2.TrackerKCF,
|
||||||
@@ -87,7 +80,7 @@ trackers = {
|
|||||||
tracker_type = 'KCF'
|
tracker_type = 'KCF'
|
||||||
tracker = trackers[tracker_type].create()
|
tracker = trackers[tracker_type].create()
|
||||||
|
|
||||||
video = cv2.VideoCapture("/media/jens/Home/Videos/production_id 4525346 (1080p).mp4")
|
video = cv2.VideoCapture("./data/production_id 4525346 (1080p).mp4")
|
||||||
|
|
||||||
# Exit if video not open
|
# Exit if video not open
|
||||||
# d.
|
# d.
|
||||||
|
|||||||
Reference in New Issue
Block a user