make sure work without cuda
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user