Automatisation: Particle-count from non-leveled images


I am currently writing my bachelor thesis and want to automate particle counting for roughly 500 to 600 files.

The sample files contain squares with an area of 3,1 by 3,1 mm. In each image only 2 squares (outlined) are to be analysed. Since the microscope I have to use is not static, the squares are not leveled and the zoom factor can differ from image to image.

I have roughly 20 images for each filter and 2 squares per image. For that I want to crop the image to square-size depending on the zoom-factor. The overall goal is to automate counting particles in the 2 squares outlined. The particle analysis is based on particle size. The goal right now is to level all the pictures in the directory so that the dark borders in each picture are level.

To make sure the particle analysis is normalized I want to automate leveling the pictures, so that I can use the same ROI and search for the same particle size in each file. To save time I want to run the necessary macro(s) on whole directorys. I also want to output data-files in a newly created folder containing a distribution of particle size, partcle sum, and filename for each square. This data is to be imported into a excel-file for further analysis.

I have 2 problems / tasks right now:

  • automatically leveling the pictures for the whole directory using a macro
  • calculating square lenght and width based on the zoom factor to crop the image accordingly

I already had a look the DS4H Image Alignment plugin but that does seem to be more work and doesnt speed up the process.

Can you help me out?

Thank you and have a nice day.