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.

9 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

Post removed for personal reasons

Hi Garvolian,
Just tidying up the code a bit (a lot) after a massive rewrite, I’ll send you a link and instructions by Thursday unless it’s urgent and you want to test out the current version?
Sorry to keep you waiting
Joe

Post removed for personal reasons

Sorry to keep you waiting, new features are now merged in main of the repo

At the moment it’s definitely not seamless but should work okay with OFM scans of medium size with a decent overlap, please let me know how you get on

2 Likes

I opened up a few issues. Would be great if you could take a look!

We also had a related update at Building the high-resolution, motorized OpenFlexure Microscope (v7) using the Rodeostat kit - #8 by kenzo - Tools - Accelerated Discovery.

2 Likes

That’s really helpful, cheers. Happy with all the issues you’ve raised and I’ll look into them. Next version of our OS should come with OpenFlexure Stitching bundled to run automatically as scans run, which should take away a lot of the headache

That’s a really useful write up you’ve shared, I’ll turn the feedback into some issues as well

2 Likes