Skip to content

AmirShahid/Stitching

Repository files navigation

Images Stitching Part of our Automated Slide Scanner

Multi-threaded C++ implementation for Image Stitching.

Introduction

In the Automated Medical Image Scanning, we have a significant issue with the moving camera position on the slide, thus the captured images is so likely to have overlapping fields with horizental and vertical adjacent images. We have developed a program in C++(due to its performance) which exports a DLL to be used in any project(an example for C# is under Stitching_CSHARP) to concat images regarding to the Matching Common Templates among adjacent overlapping images.

Overlapping image samples before stitching:

Row 7 : 8 - Columns 26 : 30:

Usage

  1. Clone to the repository:

    git clone https://github.com/AmirShahid/Stitching.git
    
  2. Set Stitching/StitchConfig.json parameters as you want it can run on RAM to be faster. if you set load_from_disk you should address your data as said in the Data section.

  3. Build the C++ Project to export a DLL including its dependencies like jpeg62.dll,opencv_imgproc343.dll, ...

(You can use it without exporting DLL in C++ projects like in Stitching/Main.cpp)

  1. Put DLL files beside your project and whenever camera iterate a row in lamel call get_lr_shifts then save the output shifts

  2. Finally when the whole lamel has been scanned call Stitch_all to get an array including the whole lamel image in diffrent zoom levels.

Output Structure

The output are the small non-overlapping tiles with diffrent details like google map tilesets and can be read through leaflet. the tiles in a specific zoom level can be concated to make a full lamel image. you can see a 40x40 output for 7 zoom leves here, this is a example for the top zoom level:

for more guidance you can see program.cs under Stitching_CSHARP.

Requirements

Data

We've made our own datasets with our Basler camera. you can add your dataset with setting data_dir parameter in StitchConfig.json and the images names can be like {pref}_{row_number}_{column_number}.{ext} where pref and ext should set through StitchConfig.

Questions

Please add an issue if you have any question

About

Medical Image Stitching GPU implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published