INNER CODE UNIT · Python

beta

chonyy/ML-auto-baseball-pitching-overlay · src/generate_overlay.py:29

            beta = 1.0 - alpha
            corrected_frame = image_registration(
                background_frame, overlay_frame, shifts, list_idx, width, height
            )
            background_frame = cv2.addWeighted(
                corrected_frame, alpha, background_frame, beta, 0
            )

            # Prepare balls to draw
            if overlay_frame.ball_in_frame:
                balls_in_curves[list_idx + 1].append(
                    [
                        overlay_frame.ball[0],
                        overlay_frame.ball[1],
                        overlay_frame.ball_color,
                    ]
                )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…