make sure work without cuda

This commit is contained in:
unknown
2025-12-29 17:20:48 +08:00
parent 55228413d4
commit b9573c5781
5 changed files with 10 additions and 4 deletions
+3 -2
View File
@@ -443,7 +443,7 @@ class Stitcher:
h, w = img.shape[:2]
n_boxes = 0
bk_thresh = 35 # initial black threshold
bk_thresh = 0 # initial black threshold
bk_thresh_step = 5
bk_thresh_max = 100
@@ -461,7 +461,8 @@ class Stitcher:
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (k, k))
mask = cv2.morphologyEx(mask, cv2.MORPH_OPEN, kernel, iterations=1)
mask = cv2.morphologyEx(mask, cv2.MORPH_CLOSE, kernel, iterations=2)
# cv2.imshow("mask", mask)
# cv2.waitKey(0)
# find contours of candidate regions
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
+5
View File
@@ -10,6 +10,11 @@
"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]]
},
"stitcher": {
"min_area_frac": 0.01,
"max_area_frac": 0.05,
"max_aspect_ratio": 100
},
"contact": {
"min_contour_area": 3000,
"min_magnitude": 1.0,
+1 -1
View File
@@ -18,7 +18,7 @@ from queue import Queue, Empty
from .Stitcher import Stitcher
from .tracker import Tracker
from .nHHD import nHHD
from .getDensity import getFilteredDensity
# from .getDensity import getFilteredDensity
from . import configs
from .get_depth import *