chore(docs): document ScoreExtractor tiling and refactor debug scripts (#563)
This commit is contained in:
17
scripts/debug/test_crop_raw.py
Normal file
17
scripts/debug/test_crop_raw.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
frame = cv2.imread("C:/Users/Certes/.gemini/antigravity/brain/975cea00-dd68-4689-9ee3-f1a2408b4ee6/raw_frame_30s.png")
|
||||
|
||||
# Crop based on ASCII mathematical deduction
|
||||
# Top black letterbox is 0:100
|
||||
# White sheet music is 100:280
|
||||
# Guitarist is 280:720
|
||||
|
||||
crop1 = frame[103:280, :]
|
||||
cv2.imwrite("C:/Users/Certes/.gemini/antigravity/brain/975cea00-dd68-4689-9ee3-f1a2408b4ee6/crop_103_280.png", crop1)
|
||||
|
||||
crop2 = frame[0:180, :]
|
||||
cv2.imwrite("C:/Users/Certes/.gemini/antigravity/brain/975cea00-dd68-4689-9ee3-f1a2408b4ee6/crop_0_180.png", crop2)
|
||||
|
||||
print("Saved crop_103_280.png and crop_0_180.png")
|
||||
Reference in New Issue
Block a user