From 563bf3d37557aa99ce10340a5a3d746b750c370d Mon Sep 17 00:00:00 2001 From: micnekr Date: Thu, 24 Feb 2022 16:36:38 +0000 Subject: [PATCH] Removed the unneeded prints --- main.py | 1 - sensors/camera/base_camera.py | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/main.py b/main.py index e913f66..15379c3 100755 --- a/main.py +++ b/main.py @@ -95,4 +95,3 @@ def poll_sensors_and_write(sensors, out_file): # Get time now now_time = datetime.now() iteration_index += 1 - print(end_time, datetime.now()) diff --git a/sensors/camera/base_camera.py b/sensors/camera/base_camera.py index 039f419..4610f47 100644 --- a/sensors/camera/base_camera.py +++ b/sensors/camera/base_camera.py @@ -20,7 +20,6 @@ # Does not exist = found save_id += 1 not_found = os.path.exists(f"./out/{save_id}_nir.png") -print("Image ID:", save_id) class CameraData(Data): @@ -97,7 +96,6 @@ def serialise_as_png(self) -> bytes: # Return as bytes; dynamic size based on size of image ID result = int.to_bytes(image_id, length=(image_id.bit_length()+7)//8, byteorder='big') - print("Serialised image file id", image_id) save_id += 1 # Next image return result @@ -107,7 +105,6 @@ def deserialise_as_png(b): """Deserialise the image data as a png.""" # Load from bytes load_id = int.from_bytes(b, byteorder='big') - print("Deserialised image file id", load_id) # As PNG, get from ID nir = cv2.imread(os.path.join(".", "out", str(load_id) + "_nir.png"), \ cv2.IMREAD_ANYCOLOR) @@ -153,7 +150,7 @@ def process(image): if CAN_DISCARD: # Discard the images if not useful if CameraData.should_discard(image): - print("Discarding the image") + print("Warning: Discarding the image") return None return image