newest shit
This commit is contained in:
@@ -118,11 +118,13 @@ def apply_green_mask(frame, masks):
|
||||
resized_mask = cv2.resize(
|
||||
mask.astype(np.float32),
|
||||
(frame.shape[1], frame.shape[0]),
|
||||
interpolation=cv2.INTER_LINEAR
|
||||
interpolation=cv2.INTER_CUBIC
|
||||
)
|
||||
# Threshold the resized mask to obtain a boolean mask
|
||||
# add a small gausian blur to the mask to smooth out the edges
|
||||
resized_mask = cv2.GaussianBlur(resized_mask, (50, 50), 0)
|
||||
blurred_mask = cv2.GaussianBlur(resized_mask, (5, 5), 0)
|
||||
|
||||
combined_mask = np.maximum(combined_mask, blurred_mask)
|
||||
|
||||
mask = resized_mask > 0.5
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user