make sure work without cuda
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 2.0 MiB |
+1
-1
@@ -28,7 +28,7 @@ def main():
|
|||||||
# verbose: 是否打印详细初始化日志
|
# verbose: 是否打印详细初始化日志
|
||||||
|
|
||||||
# 方式1: 从视频文件读取
|
# 方式1: 从视频文件读取
|
||||||
sensor = orisys.Sensor("./s1.mp4", isstitch=True, cuda=True, verbose=True)
|
sensor = orisys.Sensor("./s1.mp4", isstitch=True, cuda=False, verbose=True)
|
||||||
|
|
||||||
# 方式2: 从摄像头读取(取消注释使用)
|
# 方式2: 从摄像头读取(取消注释使用)
|
||||||
# sensor = orisys.Sensor(0, isstitch=True, cuda=True, verbose=True)
|
# sensor = orisys.Sensor(0, isstitch=True, cuda=True, verbose=True)
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ class Stitcher:
|
|||||||
|
|
||||||
h, w = img.shape[:2]
|
h, w = img.shape[:2]
|
||||||
n_boxes = 0
|
n_boxes = 0
|
||||||
bk_thresh = 35 # initial black threshold
|
bk_thresh = 0 # initial black threshold
|
||||||
bk_thresh_step = 5
|
bk_thresh_step = 5
|
||||||
bk_thresh_max = 100
|
bk_thresh_max = 100
|
||||||
|
|
||||||
@@ -461,7 +461,8 @@ class Stitcher:
|
|||||||
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (k, k))
|
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (k, k))
|
||||||
mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel, iterations=1)
|
mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel, iterations=1)
|
||||||
mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel, iterations=2)
|
mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel, iterations=2)
|
||||||
|
# cv2.imshow("mask", mask)
|
||||||
|
# cv2.waitKey(0)
|
||||||
# find contours of candidate regions
|
# find contours of candidate regions
|
||||||
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
|
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,11 @@
|
|||||||
"index": [1,2,3,6,7,8,11,12,13],
|
"index": [1,2,3,6,7,8,11,12,13],
|
||||||
"pos_default": [[260, 56], [577, 62], [897, 69], [1214, 75], [1530, 81], [256, 391], [570, 397], [889, 403], [1208, 409], [1523, 416], [248, 724], [563, 730], [882, 738], [1201, 743], [1516, 751]]
|
"pos_default": [[260, 56], [577, 62], [897, 69], [1214, 75], [1530, 81], [256, 391], [570, 397], [889, 403], [1208, 409], [1523, 416], [248, 724], [563, 730], [882, 738], [1201, 743], [1516, 751]]
|
||||||
},
|
},
|
||||||
|
"stitcher": {
|
||||||
|
"min_area_frac": 0.01,
|
||||||
|
"max_area_frac": 0.05,
|
||||||
|
"max_aspect_ratio": 100
|
||||||
|
},
|
||||||
"contact": {
|
"contact": {
|
||||||
"min_contour_area": 3000,
|
"min_contour_area": 3000,
|
||||||
"min_magnitude": 1.0,
|
"min_magnitude": 1.0,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ from queue import Queue, Empty
|
|||||||
from .Stitcher import Stitcher
|
from .Stitcher import Stitcher
|
||||||
from .tracker import Tracker
|
from .tracker import Tracker
|
||||||
from .nHHD import nHHD
|
from .nHHD import nHHD
|
||||||
from .getDensity import getFilteredDensity
|
# from .getDensity import getFilteredDensity
|
||||||
from . import configs
|
from . import configs
|
||||||
from .get_depth import *
|
from .get_depth import *
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user