-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
33 lines (32 loc) · 1.17 KB
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import cv2
import os
import config
from scripts.compare_files import compare_files
# For each Folder in ./images
for subFolderName in os.listdir(config.image_path):
# For each Image in subFolder
for imageFile in os.listdir(config.image_path + subFolderName):
# If Thermal image
if imageFile.find(config.thermal_image_suffix) > -1:
imageFileName = imageFile[0:4]
thermalImagePath = (
config.image_path
+ subFolderName
+ "\\"
+ imageFileName
+ config.thermal_image_suffix
+ config.image_extention
)
visualImagePath = (
config.image_path
+ subFolderName
+ "\\"
+ imageFileName
+ config.visual_image_suffix
+ config.image_extention
)
[summary, distances, normalizationParams] = compare_files(
cv2.imread(thermalImagePath, cv2.IMREAD_GRAYSCALE),
cv2.imread(visualImagePath, cv2.IMREAD_GRAYSCALE),
)
print(subFolderName, imageFileName, normalizationParams)