Mosquito counting system based on optical sensing


Mosquitos, sometimes carrying deadly diseases such as malaria, zika, and dengue fever, cause much concern. To control mosquitos, it is important to effectively monitor their presence and behavioral trends. We have constructed two optical sensing systems for insects based on light attenuation and light backscattering, respectively. The systems, which were tested with the potentially dangerous Aedes albopictus and Culex pipiens, were able to extract the wing-beat frequency, when they passed impinging light, derived from light-emitting diodes. We could achieve distinction between the sexes of A. albopictus and C. pipiens based on the wing-beat frequency. Finally, we propose a statistical method suitable for the system to improve the accuracy of counting.


Mosquitoes are the most dangerous animals in the world. It is well known that about 200 million people will be infected with malaria every year and kill at least 500,000 people following bites from female Anopheles mosquitos [1,2,3]. These amazing numbers are increasingly catching world-wide attention. Pesticides are used as counter-measures and anti-malarial drugs are formulated. However, with the mosquitoes developing resistance to pesticides as well as to drugs, the situation becomes aggravated. In addition to malaria, mosquitoes carry about 100 other diseases, such as dengue fever [4, 5], zika, and yellow fever [6]. According to statistics, about 800,000 people are annually killed by mosquito-borne diseases. Therefore, effective monitoring of the type and distribution of mosquitoes is very important to reduce the harm caused by these dangerous disease vectors.

People are often interrupted by mosquito interference, at work and at rest, and can, with sufficient attention accurately, identify the number and type of mosquitoes through vision and hearing. The eye acquires the structural characteristics of the mosquito, while the ear recognizes the sound of the wing beats. In the same way, insects can be captured by cameras and microphones. Electronic recordings are inspired by human recognition, as employed in the following two approaches:

Image tracking

Images of insects are recorded at different angles by a camera followed by identification based on the characteristics features [7,8,9]. This method not only requires a high acquisition speed of the camera to quickly acquire insect images in flight, but also requires sufficient contrast of the background [10, 11]. Using infrared radiation in the recordings, the insects are thought to be less affected by the detection procedure [12, 13]. The image tracking method can achieve high accuracy by observing mosquito flight details. However, this method is not suitable for a wide range of monitoring, and also obtains a large number of useless images which increases the difficulty of analysis.

Acoustic tracking

When insects flap their wings, sound with a special frequency is produced, and the pitch of the sound is related to the type of insect [14]. Using a microphone to monitor insects provides a simple and less costly method than image tracking [11]. However, it is difficult to use the microphone efficiently due to environmental influences and because of the limited range of sound propagation [15].

Recently, new approaches based on optics have also emerged. Brydegaard et al. developed CW lidar techniques to monitor insects based on light scattering with fast read-out capability to ensure the capturing of wing beats [16,17,18,19,20,21]. Potamitis et al. used photoacoustic as well as optical sensors to monitor insects [22,23,24,25,26].

In the present paper, we propose a method of combining optical counting with mosquito trap techniques to increase the probability of insect encounters. Two optical counting systems, based of optical shadowing and light backscattering, respectively, were constructed and used to increase the accuracy of mosquito counting. Our method has a low cost (in the order of 50 EURO, excluding the optional commercial amplifier, the commercial trap, and the computer with its data acquisition card) and could be expected to be useful in a wide range of mosquito surveillance.

System descriptions

We use two optical methods (shading and scattering) to count and identify mosquitoes.

Scattering counting system

We fixed four LEDs (CH-HQ-1W, Chenhui Optoelectronic Factory Outlet Store, China), each emitting 1 W at a center wavelength of 940 nm at the focus of a Fresnel lens group (MYlens-d55, focal length 25 mm, Shenzhen Meiying Technology Co., China), as shown in Fig. 1. A beam having a certain divergence angle is emitted from the LED array, and the Fresnel lenses collimates the light to form a uniform detection area. To avoid the influence of the external light and the stray light from the LEDs, we installed the detecting photodiode (BP104F, OSRAM Opto Semiconductors) centered in the collection channel and looking vertically downwards into the system dark interior, towards a suction fan. A 940 nm band-pass filter (ϕ8 × 0.7 mm, Shenzhen Infrared Laser Technology Co., China) is mounted in front of the photodiode to suppress daylight. When an insect passes the light beam, an oscillatory scattering light signal is received by the photodiode. The photocurrent generated is then boosted by an amplifier. We made some changes to a commercial amplifier (C7319, Hamamatsu Optoelectronics, Japan), to increase the multiplication factor of the original amplifier by five times, reaching 5 × 107.

Fig. 1

Counting system based on light scattering. a Photograph of the experimental arrangement of the scattering counting system. The inside of the system is covered with black, diffusing material to reduce stray light. b A cross-sectional view of the scattering counting system. The installed photodiode and band-pass filter are shown separately

Shading counting system

In the other geometry adapted, the shadow caused by the insect when passing the emitted light is instead utilized, and the signal from the detector is then transiently reduced. Our set-up is shown in Fig. 2. We placed four LEDs (L-34F3C, Kingbright Electronic Co, Ltd., China) and four photodiodes (BP 104F, OSRAM Opto Semiconductors) at the foci of the Fresnel lens groups, as shown in Fig. 2b). The LEDs emit a beam of light through the first Fresnel lenses (focal length 25 mm); the light passes with parallel beams through the detection area, and is then focused on the photodiodes by the second set of Fresnel lenses (focal length 25 mm). When compared with the previous system, the peak wavelength of the LEDs is still 940 nm, but the shading counting system uses a much lower LED power of 80 mW. When the mosquito passes through the collimated detection area, the photocurrent of the photodiode changes accordingly due to the shading of the light. The varying photocurrent is amplified by the circuit shown in Fig. 3. The photodiode receives the maximum photocurrent signal when no object passes through the detection area. Since the light intensity then remains the same, the photocurrent passing through the AC-coupled amplifier is zero. When a flying object passes through the detection volume, the intensity of the light received by the photodiode is modulated, resulting in an oscillating photocurrent, which is amplified.

Fig. 2

a Photo of the experimental arrangement of the shadowing counting system. b Detailed display of the four infrared LEDs ①, the four photodiodes ③, and the two Fresnel lens groups ②

Fig. 3

AC amplifier circuit for the shadowing counting system

Measurements and results

System testing

We used Aedes albopictus and Culex pipiens insects to test the two counting systems, first separately, then in a tandem arrangement. The first type of mosquito can, when infected, carry dengue and zika virus, while the second one can cause Japanese encephalitis. A signal of a passing mosquito, as recorded by the scattering counting system is shown in Fig. 4. Because of a substantial level of background light, as scattered from the system interior also in the absence of a passing mosquito, a steady-state signal level of about 2 V is generated, actually with a weak 50 Hz signal superimposed due to insufficient shielding of the power supply. A passing mosquito gives rise to a signal increase of about 0.1 V. Figure 4b shows an expanded part of the signal of interest caused by an A. albopictus. The oscillating signal from the beating wings is seen superimposed on the much slower increase in scattering caused by the passing insect body. The transformation from the time domain to the frequency domain of the wing-beat signal is shown in Fig. 4c featuring a fundamental wing-beat frequency of about 800 Hz and also several harmonics, reflecting the fact that the signal is far from a pure sinus wave.

Fig. 4

Data recorded by the scatter counting system. a Mosquito signal recorded with an oscilloscope. b The mosquito signal within 180–250 ms; the red curve is the signal of the mosquito body. c Amplitude spectrum of the frequency contents of the mosquito wing-beat signal

In a test of the shadowing counting system, we restricted the recording to the two middle photodiodes. The outputs of the photodiodes were directly connected to two channels of an oscilloscope after boosting with amplifiers, as shown in Fig. 3. The signals are shown in Fig. 5 . Both photodiodes monitored the wing-beat signal of the Aedes albopictus, with a time separation between the two signals. We performed a transformation to the frequency domain of the two signals, as shown in Fig. 5b, c. The signals have the same wing-beat frequency. It seems that the insect has chosen a trajectory which sequentially passes through the detection volumes of both photodiodes.

Fig. 5

Data recorded by the shadowing counting system. a The oscilloscope records the signals of the two-channel mosquito wing-beat. b Amplitude spectrum of the frequency contents of the Channel ① signal is shown in (b), and the corresponding data for the Channel ② signal are given in (c)

Species and sex distinction

To further improve the performance of the technique, also for allowing possible distinction between species and sexes, the two counting systems and a commercial mosquito trap (Biogents, Regensburg, Germany) are connected in series, as shown in Fig. 6. Such a combined system has advantages in the operation, since it does not only improve the accuracy in mosquito identification and counting, but it can also determine whether the mosquito is actually captured by the trap using time correlation. After a mosquito is recorded by the scattering system, if it continues to fly downwards, it will be recorded by the shadowing counting system, finally to arrive trapped at the lowest part, where a suction fan is installed. Being installed below the scattering counting system, the shading system has a time delay relative to the first system. However, there is a problem with the commercial trap in our application. High-speed fans can easily attract mosquitoes into the trap, but mosquitoes then pass the detection area quickly. If the wing-beat signal is obtained by lowering the wind speed, the frequency determination becomes more accurate, but the mosquito will easily escape from the trap and reduce the accuracy of counting. We installed a funnel-like device above the fan to reduce the wind speed in the detection area, as shown in Fig. 6a. This method not only results in good wing-beat signal from the mosquito but also prevents the mosquitoes from escaping once they enter the trap. However, this method still has a drawback, since mosquitoes entering the trap are fewer and mosquitoes may pass through the counting system more than once. Thus, a compromise must be found. The five amplified output signals of the two counting systems (the scattering system has one signal output, and the shading system has four signal outputs) are collected by a data acquisition card (N6211, National Instruments, USA).

Fig. 6

a Combined counting system structure diagram. b Photo of the composite mosquito counting system

In the upper container, shown in Fig. 6b, four mosquito samples of Aedes albopictus (male, female) and Culex pipiens (male, female), each with about 65, 40, 90, and 70 individuals were placed. Photographs of the four types of mosquitoes are given in Fig. 7. The outlet of the container is directly connected to the inlet of the counting system, and the mosquitoes inside the container go directly into the counting system. We studied possible differences between the two counting systems in the combined system to detect the wing-beat frequency of the same sample.

Fig. 7

Photographs of the four types of mosquitoes studied in the experiment

First, we recorded all mosquito signals for a specific specie and sex by the shading and scatter counting system and performed fast Fourier transformation to obtain the wing-beat frequency of the sub-sample. Then, the individuals with wing-beat frequencies in adjacent 50 Hz frequency intervals were counted to make histograms, as shown in Figs. 8 and 9. We fit the wing-beat frequencies to a normal distribution to further analyze the data, as shown in the curves included in Figs. 8 and 9.

Fig. 8

Scattering counting system frequency distributions

Fig. 9

Shading counting system frequency distributions

From Figs. 8 and 9, we can see that Aedes albopictus and Culex pipiens of different sex have a range of wing-beat frequency, but have only little overlap in the distributions. There is a quite good correlation between the fitted normal distribution curve and the distribution histogram. Therefore, the wing-beat frequency of A. albopictus and C. pipiens can be used as an important basis for male and female discrimination. The wing-beat frequency of males of A. albopictus and C. pipiens is significantly higher than that of females. The frequency of wing-beat of C. pipiens is lower than that of Aedes albopictus. This may be due to the fact that the body of C. pipiens is slightly larger than A. albopictus, as shown in Fig. 7. We also found that there is still considerable overlap in the range of wing-beat frequencies of A. albopictus and C. pipiens of the same sex, which makes it difficult to use the data as a basis for differentiation.

Figure 10 shows the normal distributions of the wing-beat frequencies of the same species of mosquitoes recorded by the two systems. We suspect that the small differences caused are due to the distance of the two counting systems away from the fan. Although we have made some restrictions on wind speed, it may still have some impact on the flight of mosquitoes. This may also contribute to a broadening of the wing-beat frequency distributions. Furthermore, we note that the fit to the Aedes albopictus female data in Fig. 9a is worse than for the other cases, which might contribute to the resulting small shift in center frequency.

Fig. 10

The wing-beat frequency distributions recorded by the two counting systems

Counting analysis

We compared the number of mosquito signals detected by the two systems with the number of actually captured mosquitoes. The results are shown in Fig. 11. The number of mosquitoes caught is the number of mosquitoes that are captured after they enter the trap, which we can easily obtain and which is very accurate. Due to the low wind speed in the detection area, mosquitoes may pass through the detection area more than once, which increases the difficulty of counting. Here, we provide a counting method that combines the two systems, which we denote “METHOD”. If a mosquito is caught, it must be recorded by both counting systems and there will be some delay in time, which is a necessary condition for being caught by the trap. If it is only recorded by the scattering system and not recorded by the shading system, we do not think that it will be captured; even if the conditions for capture are fulfilled—whether we really observe the same individual is based on the detected frequency of the wing-beat. “METHOD” is a method of judging based on the two conditions of delay time and wing-beat frequency. This method can prevent mosquitoes from being repeatedly recorded by one of the counting systems.

Fig. 11

Statistical diagram of the number of mosquitoes

As shown in Fig. 12, we found that Culex pipiens results in more signals from both systems. This may be because the body of C. pipiens is slightly larger than that of Aedes albopictus. At the same wind speed, C. pipiens can be more active in the system, so the chance of being recorded by a detector more than once is higher. The number of mosquitoes recorded by “METHOD” is less than the number of mosquitoes actually caught, except for female C. pipiens. This may be because the density of mosquitoes in the container is relatively large and the next mosquito may have been recorded by the scattering system before the mosquito is recorded by the shading system.

Fig. 12

The distribution of the error rate of “METHOD”

The error rate for the system trap count which we define as:

$$ {\text{Error rate}} = \frac{{{\text{METHOD}} - {\text{Catch}}}}{\text{Catch}} \times 100\% . $$

Compared to the statistical number of mosquitoes in a single counting system, the method which we provide effectively improves the accuracy of the counting.

Conclusions and discussion

We have used an insect trapping system, with one or the other of two optical insect recording systems placed to monitor insects passing the trap inlet. The recording systems are based on light scattering or light shadowing, respectively, and exhibited similar performance in test experiments with Aedes albopictus. By placing the systems one after the other in tandem on the trap inlet channel, enhanced monitoring capability is obtained. We used this tandem system and obtained a very good distinction between male and female of A. albopictus and Culex pipiens according to the frequency of the wing-beat. However, the frequency of the wing-beat cannot be used as a basis for distinguishing A. albopictus and C. pipiens. We have proposed a statistical method, which improves the counting ability of the system.

In future field monitoring work, we can combine our techniques with standard attracting technology to improve the ability to capture mosquitoes. We can use ultraviolet light to achieve phototaxis (attraction to light) and chemicals that simulate the human-body odors to attract mosquitoes and improve the practical ability of the system. With the development of the Internet of Things technology, we can also achieve wireless transmission of monitoring data to achieve a wide range of monitoring.

We now plan to perform extensive testing of the equipment with a variety of classified insects in preparation for field experiments.

We believe that our insect classification and counting system can be of considerable value in the management of disease-bearing insect vectors.


  1. 1.

    J.G. Beeson, L. Kurtovic, C. Dobaño, D.H. Opi, J.A. Chan, G. Feng, M.F. Good, L. Reiling, M.J. Boyle, Challenges and strategies for developing efficacious and long-lasting malaria vaccines. Sci. Transl. Med. 11(474), 1–17 (2019)

    Article  Google Scholar 

  2. 2.

    J. Friesen, O. Silvie, E.D. Putrianti, J.C.R. Hafalla, K. Matuschewski, S. Borrmann, Natural immunization against malaria: causal prophylaxis with antibiotics. Sci. Transl. Med. 2(40), 40–49 (2010)

    Article  Google Scholar 

  3. 3.

    S. Mharakurwa, P.E. Thuma, D.E. Norris, M. Mulenga, V. Chalwe, J. Chipeta, S. Munyati, S. Mutambu, P.R. Mason, Malaria epidemiology and control in Southern Africa. Acta Trop. 121(3), 202–206 (2012)

    Article  Google Scholar 

  4. 4.

    C.P. Simmons, J.J. Farrar, N. van Vinh Chau, B. Wills, Dengue. N. Engl. J. Med. 366(15), 1423–1432 (2012)

    Article  Google Scholar 

  5. 5.

    S. Bhatt, P.W. Gething, O.J. Brady, J.P. Messina, A.W. Farlow, C.L. Moyes, J.M. Drake, J.S. Brownstein, A.G. Hoen, O. Sankoh, The global distribution and burden of dengue. Nature 496(7446), 504–507 (2013)

    ADS  Article  Google Scholar 

  6. 6.

    M.A. Johansson, P.F. Vasconcelos, J.E. Staples, The whole iceberg: estimating the incidence of yellow fever virus infection from the number of severe cases. Trans. R. Soc. Trop. Med. Hyg. 108(8), 482–487 (2014)

    Article  Google Scholar 

  7. 7.

    S. G. Huang, M. Q. Zhou, G. H. Geng, X. L. Wang, Ontology-based insect recognition. In: International Conference on Image Analysis & Signal Processing (2009)

  8. 8.

    Y.W. Tian, Recognition method of insect damage and stem/calyx on apple based on hyperspectral imaging. Trans. Chin. Soc. Agric. Eng. 31(4), 325–331 (2015)

    Google Scholar 

  9. 9.

    H.T. Zhang, Y.X. Hu, H.Y. Zhang, Extraction and classifier design for image recognition of insect pests on field crops. Adv. Mater. Res. 756–759, 4063–4067 (2013)

    Article  Google Scholar 

  10. 10.

    G. E. Meyer, Effect of image size and contrast on the recognition of insects in radiograms. In: Proceedings of SPIE - The International Society for Optical Engineering 1379 (1991)

  11. 11.

    J. Spitzen, W. Takken, Keeping track of mosquitoes: a review of tools to track, record and analyse mosquito flight. Parasites Vectors 11(1), 1–11 (2018)

    Article  Google Scholar 

  12. 12.

    G. Gibson, A behavioural test of the sensitivity of a nocturnal mosquito, Anopheles gambiae, to dim white, red and infrared light. Physiol. Entomol. 20(3), 224–228 (2010)

    Article  Google Scholar 

  13. 13.

    F. Hawkes, G. Gibson, Seeing is believing: the nocturnal malarial mosquito Anopheles coluzzii responds to visual host-cues when odour indicates a host is nearby. Parasites & Vectors 9(1), 1–13 (2016)

    Article  Google Scholar 

  14. 14.

    D.A.A. Santos, J.J.P.C. Rodrigues, V. Furtado, K. Saleem, V. Korotaev, Automated electronic approaches for detecting disease vectors mosquitoes through the wing-beat frequency. J. Clean. Prod. 217, 767–775 (2019)

    Article  Google Scholar 

  15. 15.

    D. Raman, R.R. Gerhardt, J.B. Wilkerson, Detecting insect flight sounds in the field: implications for acoustical counting of mosquitoes. Trans. ASABE 50(4), 1481–1485 (2007)

    Article  Google Scholar 

  16. 16.

    M. Brydegaard, A. Gebru, S. Svanberg, Super resolution laser radar with blinking atmospheric particles—application to interacting flying insects. Progress Electromagn. Res. 147, 141–151 (2014)

    Article  Google Scholar 

  17. 17.

    M. Brydegaard, Towards quantitative optical cross sections in entomological laser radar–potential of temporal and spherical parameterizations for identifying atmospheric fauna. PLoS One 10(8), 1–15 (2015)

    Article  Google Scholar 

  18. 18.

    S.M. Zhu, E. Malmqvist, W.S. Li, S. Jansson, Y.Y. Li, Z. Duan, K. Svanberg, H.Q. Feng, Z.W. Song, G.Y. Zhao, M. Brydegaard, S. Svanberg, Insect abundance over Chinese rice fields in relation to environmental parameters, studied with a polarization-sensitive CW near-IR lidar system. Appl. Phys. B 123(7), 211–221 (2017)

    ADS  Article  Google Scholar 

  19. 19.

    E. Malmqvist, S. Jansson, S.M. Zhu, W.S. Li, K. Svanberg, S. Svanberg, J. Rydell, Z.W. Song, J. Bood, M. Brydegaard, S. Akesson, The bat-bird-bug battle: daily flight activity of insects and their predators over a rice field revealed by high-resolution Scheimpflug Lidar. R. Soc. Open Sci. 5(4), 1–12 (2018)

    Article  Google Scholar 

  20. 20.

    S. Jansson, P. Atkinson, R. Ignell, M. Brydegaard, First polarimetric investigation of malaria mosquitoes as lidar targets. IEEE J. Sel. Top. Quantum Electron. 25(1), 1–8 (2019)

    Article  Google Scholar 

  21. 21.

    Z. W. Song, B. X. Zhang, H. Q. Feng, S. M. Zhu, L. N. Hu, M. Brydegaard, Y. Y. Li, S. Jansson, K. Svanberg, G. Y. Zhao, J. Bood, S. Svanberg, and D.S. Li, Application of lidar remote sensing of insects in agricultural entomology on the Chinese scene. J. Appl. Entomology. (2019).

  22. 22.

    I. Potamitis, I. Rigakis, Measuring the fundamental frequency and the harmonic properties of the wingbeat of a large number of mosquitoes in flight using 2D optoacoustic sensors. Appl. Acoust. 109(C), 54–60 (2016)

    Article  Google Scholar 

  23. 23.

    I. Potamitis, I. Rigakis, Large aperture optoelectronic devices to record and time-stamp insects’ wingbeats. IEEE Sens. J. 16(15), 6053–6061 (2016)

    ADS  Article  Google Scholar 

  24. 24.

    I. Potamitis, I. Rigakis, N.A. Tatlas, Automated surveillance of fruit flies. Sensors (Basel) 17(1), 1–14 (2017)

    Google Scholar 

  25. 25.

    I. Potamitis, I. Rigakis, N. Vidakis, M. Petousis, M. Weber, Affordable bimodal optical sensors to spread the use of automated insect monitoring, J. Sens., (2018)

  26. 26.

    M. Weber, M. Geier, A. Rose, S. Sperling, and I. Potamitis, Automatic identification of the species and sex of captured mosquitoes in an advanced, remotely operated mosquito trapping system: technical background and results from the laboratory and field. In: Presented at the 85th ANCA Conference, Orlando (2019)

Download references


Open access funding provided by Lund University. The authors thank Professors Sailing He and Guofu Zhou for support. We are also grateful to Xinghua Su and Professor Xiaodong Chen of Southern Medical University for providing well-classified insects, and to Dr Mikkel Brydegaard for discussions on electronic circuitry. We would also like to thank Zheng Duan, Ying Li, and Lingna Hu for assistance. This work was supported by the Guangdong Province Innovation Research Team Program (2010001D0104799318), the National Science Foundation of China (61705069), and the Chinese Ministry of Science and Technology through the National Key Research and Development Program of China (2018YFC1407503).

Author information



Corresponding author

Correspondence to Sune Svanberg.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Wang, J., Zhu, S., Lin, Y. et al. Mosquito counting system based on optical sensing. Appl. Phys. B 126, 28 (2020).

Download citation