|
|
The particle detection is currently requiring an image acquired in darkfield-mode (bright particles on dark background). The image segmentation is based on a watershed algorithm and is realized mainly using openCV functions and can be controlled using a number of parameters that are exposed to the user interface. Processing a very large image (e.g. 17000 x 17000 px) can take a few minutes, which makes interactive adjustment of the parameters difficult. Therefore, the particle detection window (shown below) displays a small region (1000 x 1000 px) on which the image segmentation takes usually less than a second. **Left-clicking anywhere in the main Window (fullimage) makes the preview window jump to that location. Alternatively, by right-clicking and dragging the mouse in the preview window allows to scroll over the full sample.**
|
|
|
 |
|
|
\ No newline at end of file |
|
|
The particle detection is currently requiring an image acquired in darkfield-mode (bright particles on dark background). The image segmentation is based on a watershed algorithm and is realized mainly using openCV functions and can be controlled using a number of parameters that are exposed to the user interface. Processing a very large image (e.g. 17000 x 17000 px) can take a few minutes, which makes interactive adjustment of the parameters difficult. Therefore, the particle detection window (shown below) displays a small region (1000 x 1000 px) on which the image segmentation takes usually less than a second. After having determined a useful set of parameters interactively, the parameter set can be applied to the entire fullimage by clicking on "detect all".
|
|
|
**Left-clicking anywhere in the main Window (fullimage) makes the preview window jump to that location. Alternatively, by right-clicking and dragging the mouse in the preview window allows to scroll over the full sample.** The image below displays the general structure of the detection window:
|
|
|

|
|
|
On the left the individual steps of the image segmentation algorithm is depicted (read from top to bottom). Each step can be previewed by pressing the corresponding preview button. When pressed, an overlay shows the state of the image segmentation until the selected step. With the transparency slider below the transparency of the overlay is controlled.
|
|
|
|
|
|
The following section explains the individual steps in detail.
|
|
|
|
|
|
**1.) Contrast adjustment:**
|
|
|
After having done a grayscale adjustment, the contrast of the image is adjusted, if the corresponding checkbox is checked. For the adjustment, the curve in the histogram is applied, which can be modified by clicking and dragging the two control markers. The aim is to maximize the contrast between particles (bright) and background (dark).
|
|
|

|
|
|
|
|
|
**2.) Noise reduction by blurring:**
|
|
|
By applying a Gaussian blur with an adequate kernel size (in pixel) the noise level is reduced (note, that the kernel size has to be an odd number).
|
|
|

|
|
|
|
|
|
**3.) Thresholding:**
|
|
|
Next a threshold is applied at the given level. In the example, the threshold at 0.08 means, that every pixel that is >= 8 % of complete white will be considered as a particle. Thus, a binary image (black = background, white = particle) is obtained.
|
|
|

|
|
|
|
|
|
**4.) Close holes:**
|
|
|
The next option allows to close holes above a certain brightness level. Thereby, holes within particles that were produced by the thresholding in step 3 can be closed.
|
|
|

|
|
|
|
|
|
**5.) Erode convexity defects:**
|
|
|
This is a function, which in most cases does affect the final segmentation and probably will be discarded in newer versions of GEPARD. It essentially looks for convexity defects (i.e., concave areas) and erodes the particles there. This could in some cases guide the watershed algorithm to split particles.
|
|
|

|
|
|
|
|
|
**6.) Filter particles by size:**
|
|
|
With thee
|
|
|
|
|
|
**7.) Show sure foreground:**
|
|
|
This preview shows how the "sure foreground", which is the starting point for the actual watershed algorithm, looks like. Everything in green will be definitely a particle, whereas each yellow spot depicts the center of each individual particle.
|
|
|

|
|
|
|
|
|
**8.) Watershed compactness, Show watershed markers:**
|
|
|
Starting from the previously shown yellow dots the watershed algorithm tries to find particle borders. This can be controlled to some extent using the "compactness", a float value ranging from 0 to 1. It effects how "straight" the borders will be. The below image shows the two extremes of 0 (curvy boundaries) to 1 (perfectly straight boundaries). In most cases, values between 0 and 0.1 are useful. Clicking on **"show matershed markers"** displays the currently produced boarders.
|
|
|

|
|
|
|
|
|
**9.)
|
|
|
|
|
|
|