chore(docs): document ScoreExtractor tiling and refactor debug scripts (#563)
This commit is contained in:
21
scripts/debug/dump_slices.py
Normal file
21
scripts/debug/dump_slices.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import cv2
|
||||
import os
|
||||
|
||||
img = cv2.imread(r"C:\Users\Certes\.gemini\antigravity\brain\975cea00-dd68-4689-9ee3-f1a2408b4ee6\final_check_100_sec.png")
|
||||
if img is None:
|
||||
print("Image not found!")
|
||||
exit(1)
|
||||
|
||||
out_dir = r"C:\Users\Certes\.gemini\antigravity\brain\975cea00-dd68-4689-9ee3-f1a2408b4ee6\slices"
|
||||
os.makedirs(out_dir, exist_ok=True)
|
||||
|
||||
h, w = img.shape[:2]
|
||||
# Final check image is a single ROW (very long panorama).
|
||||
# We will cut it into 2000px chunks.
|
||||
idx = 0
|
||||
for x in range(0, w, 2000):
|
||||
slice_img = img[:, x:min(x+2000, w)]
|
||||
cv2.imwrite(os.path.join(out_dir, f"pano_slice_{idx:02d}.png"), slice_img)
|
||||
idx += 1
|
||||
|
||||
print(f"Generated {idx} slices.")
|
||||
Reference in New Issue
Block a user