Object detection
General
The ANDROMEDE software offers 4 different algorithms for the detection of particles. Only the simplest one, Threshold, has been specifically developed. The others are already available in the openCV library or in the Tractrac software. For this reason, the description will be rather brief and we will refer the user to other resources for the technical aspect of the algorithms. The description below will mainly concern the most optimal use of these algorithms in a context of surface velocity measurement.
The calculation of the detections is done by clicking on the button Object detection . The detections are then stored in the format (for each point): trajectory identifier, X position, Y position, Size (surface), Intensity. For the algorithms that do not give size or intensity, these variables are equal to 0. The detections of each image are grouped together by image. All detections are stored at this stage even if some particles will be eliminated by the displacement model.
The detected particles can be visualized after the calculation by selecting Processed_with_Object or original_with_Object in the display menu. The size of dots on the image can be changed with the up and down arrow on the keyboard.
GoodFeatureToTrack
This method is based on the algorithm GoodFeatureToTrack of OpenCV, itself written from the work of Shi and Tomasi. It consists in determining points of interest defined as regions with a large variation of intensity in all directions (https://docs.opencv.org/3.4/d9/df8/tutorial_root.html). In our case, the modifiable parameters are the number of points and possibly the quality level. The maximum number of points allows to restrict the detections to a number compatible with the computation time and the memory (about 500 to 2000). To find an optimum threshold, a preliminary processing is necessary. If too many points are set, areas that are not particles are identified. We can then lower the maximum number.
By increasing the Quality level, (e.g. 0.1) only the points with the most variations in intensity will be selected. This allows to focus on light particles on a black background, filtering out the detections that are not particles. However, it can be interesting in some configurations to be able to detect tracers with a wider range of intensity. This is for example the case for natural floaters (leaves) which would pass in more or less lit areas. The minimum distance is the distance between 2 particles. It depends on the seeding density. A default value equal to the size of the particles seems a good compromise if the frame rate is sufficiently high.
Threshold
The method Threshold is a simple thresholding of the image. It is adapted to a seeding with particles of different sizes and intensities. Indeed, these quantities (sizes and intensities) will be stored to help the identification of the motion in the following steps (Nearest model). The definition of the thresholds is done by directly reading the values on the graphic interface. The sizes are given in pixel, the area taken into account will be the square of the given value. The intensities are in ratio of the maximum intensity, 1 corresponds to the maximum intensity. If the image is colored, the choice is made on each band (not available in the current version except in command line). The following method “histogram” is almost similar but size, color, band can be provided by selecting object on the image. This method is less efficient when the particles have the same size and intensity or when the average variation of intensity is large (shadow area in particular).
Gaussian convolution : DOG
This method was developed in the tractrac software (https://perso.univ-rennes1.fr/joris.heyman/tractrac.html). It consists in convolving the image with a particular function acting as a bandpass filter with a predefined width. This method is adapted to particles of the same size, rather bright (on a dark background) or dark (on a light background). The parameter is the size of the convolution peak (Peak convolution size ) which is the spatial size of the filter. It must correspond to the size of the particles on the image (in pixels). The parameter peak neighbor allows to group peaks close enough on the convolved image (filtering). We can propose a value identical to the Peak convolution size . The Gaussian subpixel method is also preferable. Finally we can choose if the particles are rather bright or dark in order to look for maximums or minimums on the convolved image.
histogram
The histogram method allows to search in the image for patterns with close histograms. It is based on the algorithms #calcHist and #calcBackProject of openCV. A good explanation of the method is available at https://github.com/L42Project/. It is rather reserved for videos with few particles or objects having the same sizes and intensities. First, you have to define a number of classes corresponding to the discretization of the light intensity on the desired object. If the object is very different in color from the rest of the image then few classes are sufficient and there is a filtering effect that facilitates detection. We then specify on which band the detection will be made.
If all the colors are represented in the object, it is recommended to use band 1 of the HSV images.
If for example the particles are red, one will be able to take the band 1 of the images in RGB.
If the images are in gray level, the band number is not taken into account.
When the detection is requested, a window appears, it is then necessary to select the zone representing the object or the type of object to follow. The selection is made by creating a rectangle around the object. When the selection is judged satisfactory, press the “Enter” key. The size of the rectangle chosen is important because objects varying by more than 20% of this size will not be detected.
Manual
The Manual mode allows the user to visually select the objects to be tracked. The object Detection button activates the mode. A left click on the image allows to select the object, to change the time you can use the keyboard arrows. Detection can be done in any order or by skipping time steps. When the trajectory of an object is finished, we move to the other object by pressing the CTRL key and selecting the new object. When all the trajectories have been drawn, a right click validates the selections. There is no need to go through the motion model step and the Analysis menu can be launched.