Skip to content

How does detection work?

Eugene Katrukha edited this page Jan 25, 2019 · 7 revisions

In short, detection scheme is presented on this picture:

detechtion scheme

First, the image is convoluted with Gaussian mexican hat filter with the size provided by a user. Gaussian enhances spots of specified size, while "mexican hat" lobes remove the inhomogeneous background.

On the second stage, we build a histogram of the convoluted image and fit it with Gaussian to find a threshold. Gaussian fit represents noise background, i.e. the majority of pixels at the image. The regular cut-out is about 3*SD (i.e. particles with SNR>3), but in the plugin detection parameters, it can be increased (making it SNR=4,SNR=5,SNR=10, etc). So the Intensity threshold number is exactly the coefficient before SD.

The convoluted image is thresholded, some speckles are removed with dilution/erosion operations and leftover spots are used to calculate centroid x,y on the original image. Also pixels within these spots are used for Integrated Intensity (IntegratedInt) and NArea values calculation.

Using ROI/cropping images/importance of background

If you selected an ROI before detection, the plugin just discards all detected spots outside of this ROI. But it still uses the whole image to estimate background intensity/SD. If you crop the image with this ROI and then run ComDet on it, results will be different, since a smaller area is now used to find background characteristics.

In general, the plugin 'likes' to have some backgound pixels around spots, since in this case its parameters can be estimated more precisely.

How is Integrated Intensity (IntegratedInt) calculated?

Integrated intensity is measured in the following way. First, average intensity over perimeter of bounding rectangle is calculated, it is background intensity, Ibg. Then I calculate sum of intensities of all N pixels inside the thresholded spot area Sin. To get the final value,

IntegratedInt = SinIbgN

So from each pixel intensity I subtract average background value.

Make a notice that in case of colocalization of particle 1 from channel 1 and particle 2 from channel 2, their integrated intensities would be calculated using new ROI, encompassing ROIs of both particles.