Copy sharpest image from stack, not the most average sharpness!

This commit is contained in:
jaknapper 2025-06-23 18:08:27 +01:00
parent febb0d2690
commit 7c3a9ad01f

View file

@ -353,8 +353,7 @@ class AutofocusThing(Thing):
image to images dir."""
image_list = glob.glob(os.path.join(stack_dir, "*"))
image_list = sorted(image_list, key=os.path.getsize)
central_index = (len(image_list) - 1) // 2
central_image = image_list[central_index]
central_image = image_list[-1]
xy_location = os.path.basename(stack_dir)
logger.info(central_image)