Add the ability to hardcode resolution
This commit is contained in:
@@ -32,7 +32,7 @@ for camera in IMAGES_CAMERAS_FOLDER:
|
|||||||
random.shuffle(imagesCamerasFileNames[camera])
|
random.shuffle(imagesCamerasFileNames[camera])
|
||||||
|
|
||||||
# Limit number of images per camera with the one having the less images.
|
# Limit number of images per camera with the one having the less images.
|
||||||
minimumNumberOfImagesCameras = 4#min([len(imagesCamerasFileNames[camera]) for camera in IMAGES_CAMERAS_FOLDER])
|
minimumNumberOfImagesCameras = min([len(imagesCamerasFileNames[camera]) for camera in IMAGES_CAMERAS_FOLDER])
|
||||||
for camera in IMAGES_CAMERAS_FOLDER:
|
for camera in IMAGES_CAMERAS_FOLDER:
|
||||||
imagesCamerasFileNames[camera] = imagesCamerasFileNames[camera][:minimumNumberOfImagesCameras]
|
imagesCamerasFileNames[camera] = imagesCamerasFileNames[camera][:minimumNumberOfImagesCameras]
|
||||||
print(camera, imagesCamerasFileNames[camera])
|
print(camera, imagesCamerasFileNames[camera])
|
||||||
@@ -43,13 +43,14 @@ camerasIterativeMean = {camera: iterativeMean() for camera in IMAGES_CAMERAS_FOL
|
|||||||
# Compute the minimal color channel camera resolution.
|
# Compute the minimal color channel camera resolution.
|
||||||
# Assume that for each camera, its images have the same resolution.
|
# Assume that for each camera, its images have the same resolution.
|
||||||
# The following consider a given color channel resolution, assuming they all have the same resolution.
|
# The following consider a given color channel resolution, assuming they all have the same resolution.
|
||||||
minimalColorChannelCameraResolution = None
|
minimalColorChannelCameraResolution = (100, 100)#None
|
||||||
for camera in IMAGES_CAMERAS_FOLDER:
|
if minimalColorChannelCameraResolution is None:
|
||||||
imageFileName = imagesCamerasFileNames[camera][0]
|
for camera in IMAGES_CAMERAS_FOLDER:
|
||||||
imageFilePath = f'{IMAGES_CAMERAS_FOLDER[camera]}/{imageFileName}'
|
imageFileName = imagesCamerasFileNames[camera][0]
|
||||||
singleColorChannelImagesShape = getColorChannel(imageFilePath, Color.RED).shape
|
imageFilePath = f'{IMAGES_CAMERAS_FOLDER[camera]}/{imageFileName}'
|
||||||
if minimalColorChannelCameraResolution is None or singleColorChannelImagesShape < minimalColorChannelCameraResolution:
|
singleColorChannelImagesShape = getColorChannel(imageFilePath, Color.RED).shape
|
||||||
minimalColorChannelCameraResolution = singleColorChannelImagesShape
|
if minimalColorChannelCameraResolution is None or singleColorChannelImagesShape < minimalColorChannelCameraResolution:
|
||||||
|
minimalColorChannelCameraResolution = singleColorChannelImagesShape
|
||||||
|
|
||||||
minColor = 0#None
|
minColor = 0#None
|
||||||
maxColor = 7952#None
|
maxColor = 7952#None
|
||||||
|
Reference in New Issue
Block a user