Sperm Sizer is a tool that helps you measure the lengths of sperm cells in digital photos by simply clicking on the sperm cell you want to measure. It can be customized to measure different components such as the head, body and tail.
For more information and ground-truth data, view our methods paper on Sperm Sizer.
Sperm Sizer: a program to semi-automate the measurement of sperm length
Please cite this paper if you decide to use Sperm Sizer in your publication.
| Select | Pan | Zoom | Undo | Redo | Next Image | Previous Image | | :–: | :–: | :–: | :–: | :–: | :–: | :–: | | Left Click | Drag with Right Click</kdb> | Scroll Wheel</kdb> | A</kdb> | D</kdb> | S</kdb> | W</kdb> |
Add Images
button to load photos of the sperm cells you want to measure.Export Measurements
button.Sperm Sizer requires Java 8 or later to run. Make sure you have Java installed on your device.
Measurements are provided in pixels
. For conversion into a different unit (e.g. micrometers
), export the measurements to a CSV file and perform the conversions using Microsoft Excel.
Measurements in Microsoft Excel |
---|
The length of a line is calculated by treating each pixel as a coordinate and summing up the straight-line distance between each pixel. For example, a 3-pixel straight line would have a length of 2 pixels, and a 2-pixel diagonal line would have a length of √2 (≈1.41) pixels.
3-pixel Straight Line (l = 2) | 2-pixel Diagonal Line (l = √2) |
---|---|
1. Designate four points.
2. Binarize the image via thresholding.
* Use the smallest threshold value that results in all points being connected.
3. Select the group of pixels connecting the points together and:
1. Remove all other pixels.
2. Fill holes.
4. Perform line smoothing:
1. Apply Gaussian blur.
2. Repeat Step 2.
5. Skeletonize.
6. Remove all pixels within TrimRadius pixels of the first and last point.
7. Snap both ends of the line to the first and last point.
Note: Snapping, trim radius and Gaussian blur intensity can be configured in the settings.
Sperm Sizer can be configured via config.ini, a file located in the same directory as Sperm Sizer.
For best results, ensure that:
(Scenario A)
(Scenario B)
(Scenario C)
Note: If the sperm cells on your image are lighter than the background, consider inverting the colors (e.g. using Microsoft Paint).
Scenario | Ideal | Not Ideal |
---|---|---|
A | ||
B | ||
C |
When selecting the first or last point on a sperm cell, you have the option of drawing a line. To do this, simply Left Click and drag. This is useful when you are having trouble measuring sperm cells with very faint heads and/or tails.
Note: When drawing a line, always drag from head to tail. Dragging in the opposite direction (tail to head) will produce incorrect results.
Dragging from Head to Tail | Dragging from Tail to Head |
---|---|
To measure different components, edit the Labels
property in config.ini. For example, if you only want to measure the entire length of a sperm cell, use Labels=Sperm Cell
. This would measure 1 component named “Sperm Cell”, requiring 2 inputs.
Note: By default, Labels=Head,Body,Tail
. This means 3 components are measured (“Head”, “Body” and “Tail”), requiring 4 inputs.
Sperm Sizer uses a version of ImageJ where the skeletonization function in the BinaryProcessor
class is subject to a timeout. This allows for interruptible skeletonization. The JAR is available the lib directory.
https://github.com/aibolem/DeepSperm