Figure 6: Benchmark comparison between other operators
and the Color-gradient operator.
forward observation. However, we can see several
photos in the set have a color casting to blue (exam-
ple 1 ∼ 5.jpg), which made all of the operators pick
the example 2.jpg, which is the wrong one with the
color cast problem. Figure 6 is a line chart of all the
operators calculating this color cast case. Because of
the blue color casting, all lines suddenly peak when
the image index is number 2. Even if the process fi-
nally meets the actual clear image, number 52 in the
set, the peak can only be a local maximum instead of
a global maximum for all the other operators, leading
to a wrong answer. Once again, the colorful gradient
operator is still the only one that survives in this color
casting case.
The final simulation with python code files is all
open sources on the internet. Please refer to the
URL: https://github.com/Pockylee/Colorful-gradient
for a deeper understanding of the colorful-gradient
operator algorithm.
5 CONCLUSIONS
We proposed a new focus measurement operator con-
sidering three aspects: sharpness, colorfulness, and
color cast. Unlike most sharpness operators nowa-
days, colorful-gradient cannot only do the regular im-
age focus measurement job well, but it can also easily
deal with microscopy cases. According to the real-
life data collected from medical institutes, we found
the two main factors of making microscopy images
harder to do focus measurement. First, the impurity
on the lens is an undodgeable problem, especially in
medical institutions located in remote areas. Second,
the color cast problems are caused by the illuminator
of a conventional microscope. After all, we tested the
operators with real-life data and constructed a bench-
mark to show the difference between the colorful-
gradient operator and others. With the focus algo-
rithm we propose, we can perform excellently on the
microscope image focus detection cases. We had al-
ready implemented this algorithm onto the automated
microscope system. However, the current algorithm is
not fast enough to make a real-time adjustment with
the microscope stage adjust wheel. We can only take
one photo on every slight rotation (step) of the adjust-
ment wheel; after gathering all of the images of the
sample, we send them to the server to find the perfect
height for the microscope stage. As a result, we can
start from a higher height instead of taking the photo
from the bottom, which wastes much time.
REFERENCES
Baina, J. and Dublet, J. (1995). Automatic focus and
iris control for video cameras. In Fifth International
Conference on Image Processing and its Applications,
pages 232–235.
Blixt, L., Bogdanovic, G., Buggert, M., Gao, Y., Hober,
S., Healy, K., Johansson, H., Kjellander, C., Mravina-
cova, S., Muschiol, S., Nilsson, P., Palma, M., Pin, E.,
Smith, C. I. E., Stromberg, O., Chen, M. S., Zain, R.,
Hansson, L., and
¨
Osterbor, A. (2022). Covid-19 in
patients with chronic lymphocytic leukemia: clinical
outcome and b- and t-cell immunity during 13 months
in consecutive patients. Leukemia, 36(2):476–481.
Haslera, D. and S
¨
usstrunk, S. (2003). Measuring colour-
fulness in natural images. In SPIE - the International
Society for Optical Engineering, volume 5007, pages
87–95.
Lee, S.-Y., Yoo, J.-T., Kumar, Y., and Kim, S.-W. (2009).
Reduced energy-ratio measure for robust autofocus-
ing in digital camera. IEEE Signal Processing Letters,
16(2):133–136.
Nayar, S. K. and Nakagawa, Y. (1994). Shape from focus.
IEEE Transactions on Pattern Analysis and Machine
Intelligence, 16(8):824–831.
Pech-Pacheco, J. L., Cristobal, G., Chamorro-Martinez, J.,
and Fernandez-Valdivia, J. (2000). Diatom autofocus-
ing in brightfield microscope: a comparative study. In
the 15th International Conference on Pattern Recog-
nition (ICPR-2000), volume 3, pages 314–317.
Pertuz, S., Puig, D., and Garcia, M. A. (2013). Analysis of
focus measure operators for shape-from-focus. Pat-
tern Recognition, 46:1415–1432.
Shen, C.-H. and Chen, H. H. (2006). Robust focus measure
for low-contrast images. In 2006 Digest of Technical
Papers International Conference on Consumer Elec-
tronics, number 69-70.
Tong, X., Cheng, A., Yuan, X., Zhong, X., Wang, H., Xu,
W. Z. X., and Li, Y. (2021). Characteristics of periph-
eral white blood cells in covid-19 patients revealed.
BMC Infectious Diseases, 21(1):1236.
Yang, G. and Nelson, B. J. (2003). Wavelet-based autofo-
cusing and unsupervised segmentation of microscopic
images. In 2003 IEEE/RSJ International Conference
on Intelligent Robots and Systems (IROS 2003) (Cat.
No.03CH37453), pages 2143–2148.
ISAIC 2022 - International Symposium on Automation, Information and Computing
698