Mask timecode in phase refine and guard cutter scene starts
This commit is contained in:
@@ -206,7 +206,12 @@ def _hires_phase_feature(frame: np.ndarray) -> np.ndarray:
|
||||
with an 8×8 spatial histogram grid provides enough spatial resolution to
|
||||
discriminate facial expression phases within a single continuous scene.
|
||||
"""
|
||||
trimmed = _trim_dark_borders(frame)
|
||||
trimmed = _trim_dark_borders(frame).copy()
|
||||
h0, w0 = trimmed.shape[:2]
|
||||
# Source and trailer masters often contain burned-in timecode in the
|
||||
# upper-left corner. It changes every frame and can dominate fine phase
|
||||
# matching, so neutralise that area before extracting hi-res features.
|
||||
trimmed[: int(h0 * 0.16), : int(w0 * 0.28)] = 0
|
||||
h, w = trimmed.shape[:2]
|
||||
cropped = trimmed[int(h * 0.05):int(h * 0.95), :]
|
||||
gray = cv2.cvtColor(cropped, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
Reference in New Issue
Block a user