From 7d4caa820dc4583e4b795f273244a29ce2bf97ab Mon Sep 17 00:00:00 2001 From: Scott Register Date: Mon, 21 Oct 2024 19:49:59 -0700 Subject: [PATCH] newest shit --- notebooks/foo_points_prev.py | 6 ++++-- notebooks/rvm_split_seconds.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/notebooks/foo_points_prev.py b/notebooks/foo_points_prev.py index 7c31c90..11ddc99 100644 --- a/notebooks/foo_points_prev.py +++ b/notebooks/foo_points_prev.py @@ -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: diff --git a/notebooks/rvm_split_seconds.sh b/notebooks/rvm_split_seconds.sh index dc143cd..b1f8e94 100755 --- a/notebooks/rvm_split_seconds.sh +++ b/notebooks/rvm_split_seconds.sh @@ -24,7 +24,7 @@ ffmpeg -i "$input_file" -c copy -f segment -segment_time "$time" -reset_timestam cd "$output_folder" # Create a file list for the segments and move each segment to its own folder -counter=1 +counter=0 for segment in segment_*.mp4; do segment_folder="segment_$counter" mkdir -p "$segment_folder"