supersolar commited on
Commit
84150b6
1 Parent(s): 72e1214

Update 1.py

Browse files
Files changed (1) hide show
  1. 1.py +2 -2
1.py CHANGED
@@ -114,8 +114,8 @@ def merge_image_with_mask(image_input_path, detections, output_folder):
114
  dilated_mask = cv2.dilate(combined_mask, kernel, iterations=1)
115
 
116
  # 保存膨胀后的掩码
117
- #mask_path = os.path.join(mask_folder, 'test1.png')
118
- #cv2.imwrite(mask_path, dilated_mask * 255)
119
 
120
  # 读取原始图像
121
  original_image = cv2.imread(image_input_path)
 
114
  dilated_mask = cv2.dilate(combined_mask, kernel, iterations=1)
115
 
116
  # 保存膨胀后的掩码
117
+ mask_path = os.path.join(mask_folder, image_name)
118
+ cv2.imwrite(mask_path, dilated_mask * 255)
119
 
120
  # 读取原始图像
121
  original_image = cv2.imread(image_input_path)