Move Color Enum to utils.py

This commit is contained in:
Benjamin Loison 2024-04-18 00:19:01 +02:00
parent eac2cf2174
commit cca81927dd
No known key found for this signature in database
2 changed files with 11 additions and 10 deletions

View File

@ -8,7 +8,7 @@ import os
from tqdm import tqdm
import csv
import rawpy
from enum import Enum, auto
from utils import Color
imagesFolderPath = '/mnt/HDD0/raise'
imagesFolderPathFileName = imagesFolderPath.replace('/', '_')
@ -38,15 +38,6 @@ WALL = range(2_807, 2_912)
minColor = None
maxColor = None
class Color(Enum):
RED = auto()
GREEN_RIGHT = auto()
GREEN_BOTTOM = auto()
BLUE = auto()
def __str__(self):
return self.name.lower()
# `color` is the actual color to estimate PRNU with.
def treatImage(imageFileName, computeExtremes = False, color = None):
global mean, numberOfImagesInMean, minColor, maxColor

10
datasets/raise/utils.py Normal file
View File

@ -0,0 +1,10 @@
from enum import Enum, auto
class Color(Enum):
RED = auto()
GREEN_RIGHT = auto()
GREEN_BOTTOM = auto()
BLUE = auto()
def __str__(self):
return self.name.lower()