## Autofocus Algorithm

2012. 6. 3. 08:50

1. Derivative Based Algorithms:

* f = ∑ | I(x+1, y) - I(x, y)|,    only for   | I(x+1, y) - I(x,y)| > threshold;

* f = ∑ ( I(x+1, y) - I(x, y))^2,  only for  ( I(x+1, y) - I(x, y))^2 > threshold;

* f = ∑ ( I(x+2, y) - I(x, y))^2,  only for  ( I(x+1, y) - I(x, y))^2 > threshold;

* f = ∑ ( SobelX(x, y)^2 + SobelY(x, y)^2);

* f = ∑ ((C * I)(x, y))^2,          where, C = [ -1 - 4 -1; -4 20 -4; -1 -4 -1];

* f = ∑(|LaplaceX(x, y)| + |LaplaceY(x, y)|)

* f = (1/MN)∑ (GaussianDerivativeX(x,y)^2 + GaussianDerivativeY(x,y)^2),

where scale = d/2sqrt(3), d = dimension of the smallest feature;

2. Statistical Algorithms:

* Variance Measure ;

* Normalized Variance Measure ;

* Auto-correlation Measure:  f = ∑ I(x,y).I(x+1,y) - ∑ I(x,y).I(x+2,y)

* Standard Deviation-based Correlation: ∑ I(x,y).I(x+1,y) - H.W.*Average(I)

3. Histogram-based Algorithms:

* Range Algorithm: f = max{i|histo(i) > 0} - min{i| histo(i) > 0};

* Entropy Algorithm: f = - ∑ p(i) log2 p(i),    where p(i) = histo(i) / H.W;

4. Other Algorithms:

* Threshold Contents: f = ∑ I(x, y),       only for I(x, y) >= threshold;

* Thresholded Pixel Count: f = ∑ Step(threshold - I(x,y));

* Image Power: f = ∑ I(x, y)^2,       only for I(x, y) >= threshold;

Ref: Dynamic evaluation of autofocusing for automated microscopic analysis of blood smear and pap smear, J. Microscopy,227, 15(2007).

#### 'Image Recognition' 카테고리의 다른 글

 Union Find Connected Component Labeling  (0) 2012.11.01 2012.10.07 2012.06.03 2012.03.25 2012.03.03 2012.02.28