Focus stacking would indeed be very welcome. It is faster than autofocus and can capture more information.
Speaking of bugs in the software: There’s a small inconvenience with the file numbering from the scanner. There are only two leading zeros when taking more than 1000 pictures (001.jpeg instead of 0001.jpeg).
Sorry. There’s a misunderstanding. Not the openflexure-stitch app is struggling. The focus-stacker (ImageJ or Petteri) doesn’t manage to stack the 3 stitched images, each ~50mb.
I wrote a bash script to stack the tiles at each xy position first and a R script to copy the exif data. That’s where the camera stage mapping info is kept, right? However, when stitching I then get an error from which I guess the exif is corrupted. Maybe I should have learned Python
.
Also the focus stacker decreases the size by a few px. When I crop all images to 800x600 before stitching, I still get the same error.
$ openflexure-stitch ./stacked/.
Traceback (most recent call last):
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/loading/metadata.py", line 36, in read_metadata_from_file
usercomment = exif_usercomment_json(exif)
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/loading/metadata.py", line 128, in exif_usercomment_json
return json.loads(exif_dict["Exif"][piexif.ExifIFD.UserComment].decode())
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bazzo/.local/bin/openflexure-stitch", line 8, in <module>
sys.exit(load_tile_and_stitch_cli())
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/pipeline.py", line 112, in load_tile_and_stitch_cli
load_tile_and_stitch(
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/pipeline.py", line 34, in load_tile_and_stitch
tiling_inputs, starting_csm, csm_calibration_width = load_images(
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/loading/__init__.py", line 23, in load_images
image_metadata = load_metadata_for_images(folder, fnames, tiling_settings)
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/loading/__init__.py", line 71, in load_metadata_for_images
metadata_list: List[ImageMetadata] = [
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/loading/__init__.py", line 72, in <listcomp>
read_metadata_from_file(
File "/home/bazzo/Downloads/openflexure-stitching/src/openflexure_stitching/loading/metadata.py", line 82, in read_metadata_from_file
stage_position = [int(d) for d in m.groups()]
AttributeError: 'NoneType' object has no attribute 'groups'