Automated Slide Scanning and Tiling

Hi all, just thought I’d share some updates on the scanning and tiling code.

Example outputs can be found in this Youtube video, or at the Gigapans here, here and here.


348 images automatically captured, downloaded and tiled!

Cool pictures out the way, here’s the plan for anyone interested

The aim is to let a user put a sample under the microscope, set a background image, then leave the microscope running, finding its own path, until all of the interesting sample is scanned. Hopefully this will speed up a lot of medical uses with irregularly shaped samples.

To make this more useful (and to avoid issues with integrating Fiji or other tiling programs), our tiling code can copy all the images to the user’s computer in real time, and tile them based on the OpenFlexure metadata rather than filename. It estimates positions from the stage locations and camera stage mapping, finds better overlaps between each pair, then “shuffles” the images around to find the optimal position. Unlike in Fiji, you set your thresholds once all pairs have been processed, rather than at the start. This means the user can see the outputs and set thresholds accordingly, and quickly test multiple thresholds without rerunning the entire procedure.

This is still in early development, but if anyone has any suggestions, feedback or wants to test it out, please let me know.

6 Likes

This is so amazing!. I’ve never seen anything like it, not even on any commercial instrument. The quality is incredible as well. Well done

1 Like

Thats super interesting! I just got my microscope set up (although my lighting setup is still kind of janky) and was messing around with using open cv to stich together images. It worked well, but I’m sure the performance penalty is large for not utilizing the image metadata.

What magnification objective is on the scope you used to make the image?

1 Like

The images on Gigapan say that they are using 60x and 40x objectives.

OpenCV was my starting point too, but it really limits how much you can use the metadata and speed up some of the time consuming steps. The image in the video and post are both 60x, and one of the Gigapan images is 40x. It works with 100x as well, as long as the camera stage mapping data is a good estimate it should work with any OFM scans with a decent overlap between images.

As @dgrosen has mentioned before as well, Fiji requires rectangular scans and images captured or named in a snake or raster order. This approach is fine with any path or filename