add ex3
This commit is contained in:
parent
3e2cf3ee0f
commit
4dbe6bfd7a
26
ex3.py
Normal file
26
ex3.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import os.path
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
|
|
||||||
|
class ImageStandardizer:
|
||||||
|
def __init__(self, input_dir: str) -> None:
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
# todo scan for .jpeg files
|
||||||
|
|
||||||
|
# scan input dir for files
|
||||||
|
files = glob(input_dir + '/**/*.jpg', recursive=True)
|
||||||
|
if len(files) == 0:
|
||||||
|
raise ValueError
|
||||||
|
|
||||||
|
# convert them into absolute paths
|
||||||
|
files = [os.path.abspath(x) for x in files]
|
||||||
|
|
||||||
|
# sort filenames
|
||||||
|
files.sort()
|
||||||
|
|
||||||
|
def analyze_images(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_standardized_images(self) -> None:
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user