diff --git a/Rocket/archive/imgs/.gitkeep b/Rocket/archive/imgs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Rocket/archive/test_camera.py b/Rocket/archive/test_camera.py index 528b34d..84cb351 100755 --- a/Rocket/archive/test_camera.py +++ b/Rocket/archive/test_camera.py @@ -179,14 +179,16 @@ def acquire_images_for(device: eb.PvDevice, stream: eb.PvStream, record_for: int # TODO: Add a timestamp to the image name # IDEA: Also add the frame rate and bandwidth to the image name for debugging purposes img_name = f"img_{time.perf_counter()}_fps_{frame_rate_val:.1f}_bw_{bandwidth_val / 1000000.0:.1f}.jpg" + + time_when_starting_to_save_img = time.perf_counter() cv2.imwrite(img_name, image_data) + time_when_img_saved = time.perf_counter() - else: - logging.warn( - " Payload type not supported by this sample") + print( + f"Time to save image: {time_when_img_saved - time_when_starting_to_save_img}") - logging.info( - f" {frame_rate_val:.1f} FPS {bandwidth_val / 1000000.0:.1f} Mb/s") + else: + logging.warn("Payload type not supported by this sample") else: # Non OK operational result logging.error(operational_result.GetCodeString())