Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Timing Measurements

(courtesy of Alvaro Sanchez-Gonzalez)

I just timed the three algorithms on the function that is in charge of splitting the bunches using the three algorithms. I got the following numbers in seconds to split a single image (based on the average of doing it 20 times):

  • scipyLabel: 0.057 s
  • autothreshold: 0.31 s (with 25 iterations)
  • autothreshold: 0.17 s (with 16 iterations, which should be enough)
  • contourLabel: 1.18 s

These tests have been done applying a snrfilter of 3. This is quite critical as the time taken by the labeling function and the island size check itself depends a lot on the number of islands, and the weaker the snr filter the more remaining noise islands are there. If you run the same for a value of snrfilter=5 you get the following times:

  • scipyLabel: 0.015 s
  • autothreshold: 0.24 s (with 25 iterations)
  • autothreshold: 0.17 s (with 16 iterations, which should be enough)
  • contourLabel: 0.54 s

The countourlabel is the one which improves most. This is due to the fact that most of the iterations to split the islands are run for a low threshold, which increases in small steps, so it can benefit the most from not having islands made out of noise. However in this case you would be throwing away more of the image information since the beginning, which is kind of the opposite we wanted to do by following the contours.

Algorithm Steps

(courtesy of Mihir Mongia)

...