v2 working
This commit is contained in:
19
rotate.py
Normal file
19
rotate.py
Normal file
@ -0,0 +1,19 @@
|
||||
import cv2
|
||||
import os
|
||||
|
||||
folder = r"video/camC" # ← podaj swoją ścieżkę
|
||||
|
||||
# rozszerzenia jakie chcesz obracać
|
||||
ext = (".jpg", ".jpeg", ".png")
|
||||
|
||||
for filename in os.listdir(folder):
|
||||
if filename.lower().endswith(ext):
|
||||
path = os.path.join(folder, filename)
|
||||
|
||||
img = cv2.imread(path)
|
||||
rotated = cv2.rotate(img, cv2.ROTATE_180)
|
||||
|
||||
cv2.imwrite(path, rotated) # nadpisanie pliku
|
||||
print(f"Obrócono: {filename}")
|
||||
|
||||
print("Gotowe ✔️")
|
||||
Reference in New Issue
Block a user