thot-detector/grayscaler.py
2022-08-01 19:39:28 -05:00

13 lines
289 B
Python

import cv2
import os
lines = ""
for file_name in os.listdir("thots_false"):
path = "thots_false/" + file_name
img = cv2.imread(path, cv2.IMREAD_GRAYSCALE)
#cv2.imwrite(path, img)
lines += path+ "\n"
f = open("thots_false/bg.txt", "w")
f.write(lines)
f.close()