BugTracker: Software for Tracking and Measuring Arthropod Activity
Abstract
:1. Introduction
2. Materials and Methods
2.1. Software
2.2. Defining the Testing Area
- initarea = cv2.selectROI(framename, image, fromCenter = False, showCrosshair = True)
- for i in range (0, area [2], step_ver):
- cv2.line(image, (area [0] + i, area [1]), (area [0] + i, area [3] + area [1]), (0, 255, 0), 1)
- for i in range (0, area [3], step_hor):
- cv2.line(image, (area [0], area [1] + i), (area [2] + area [0], area [1] + i), (0, 255, 0), 1)
- 1.
- Stop the video and evoke the mouse control for the user to select the area.
- 2.
- Draw the vertical lines of the squares.
- 3.
- Draw the horizontal lines of the squares.
- 4.
- The user can later adjust these lines with the W, A, S, and D keys on the keyboard at any time while the video is running.
- gray = cv2.cvtColor (image, cv2.COLOR_BGR2GRAY)
- blur_gray = cv2.GaussianBlur (gray, (5, 5), 0)
- edges = cv2.Canny (blur_gray, 50, 150)
- contours, hierarchy = cv2.findContours (edges, cv2.RETR_EXTERNAL, cv2.CHAIN_A-PROX_NONE)
- 1.
- Convert image to grayscale format.
- 2.
- Apply binary thresholding.
- 3.
- Find contours based on the border following algorithms.
2.3. Tracking the Defined Test Organism
- cv2.TrackerCSRT_create;
- cv2.TrackerKCF_create;
- cv2.TrackerMIL_create;
- cv2.legacy.TrackerBoosting_create;
- cv2.legacy.TrackerTLD_create;
- cv2.legacy.TrackerMedianFlow_create;
- cv2.legacy.TrackerMOSSE_create.
- initTracker = cv2.selectROI (showedframe, image, fromCenter = False, showCrosshair = True)
- tracker.init (sourceframe, initTracker)
- (success, box) = tracker.update (sourceframe)
- 1.
- Stop the video and evoke the mouse control for the user to select the outline of the object they intend to track.
- 2.
- Start the tracking based on these boundaries.
- 3.
- Each frame looks for the object, and it reports back whether it finds it and the outline where it was found.
2.4. Examples of the Software’s Applications
2.5. Software Output
2.6. Comparing the Properties of BugTracker with Other Similar Software
2.7. Video Quality
3. Results
4. Discussion
Future Software Developments
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Kerr, J.T.; Currie, D.J. Effects of human activity on global extinction risk. Conserv. Biol. 1995, 9, 1528–1538. [Google Scholar] [CrossRef]
- Wong, B.B.M.; Candolin, U. Behavioral responses to changing environments. Behav. Ecol. 2015, 26, 665–673. [Google Scholar] [CrossRef] [Green Version]
- Cote, J.; Clobert, J.; Fogarty, S.; Sih, A. Personality-dependent dispersal: Characterization, ontogeny and consequences for spatially structured populations. Philos. Trans. R. Soc. B 2010, 365, 4065–4076. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Sih, A. Understanding variation in behavioural responses to human-induced rapid environmental change: A conceptual overview. Anim. Behav. 2013, 85, 1077–1088. [Google Scholar] [CrossRef]
- Seehausen, O.; Alphen, J.J.M.; Witte, F. Cichlid fish diversity threatened by eutrophication that curbs sexual selection. Science 1997, 277, 1808–1811. [Google Scholar] [CrossRef]
- Dell, A.I.; Bender, J.A.; Branson, K.; Couzin, I.D.; de Polavieja, G.G.; Noldus, L.P.J.J.; Pérez-Escudero, A.; Perona, P.; Straw, A.D.; Wikelski, M.; et al. Automated image-based tracking and its application in ecology. Trends Ecol. Evol. 2014, 29, 417–428. [Google Scholar] [CrossRef] [PubMed]
- Zaller, J.G.; Kerschbaumer, G.; Rizzoli, R.; Tiefenbacher, A.; Gruber, E.; Schedl, H. Monitoring arthropods in protected grasslands: Comparing pitfall trapping, quadrat sampling and video monitoring. Web Ecol. 2015, 15, 15–23. [Google Scholar] [CrossRef]
- Richard, F.O.; Margaret, C.T. Monitoring animals’ movements using digitized video images. Behav. Res. Meth. Instr. 1988, 20, 485–490. [Google Scholar] [CrossRef]
- Martin, B.R.; Prescott, W.R.; Zhu, M. Quantitation of rodent catalepsy by a computer-imaging technique. Pharmacol. Biochem. Behav. 1992, 43, 381–386. [Google Scholar] [CrossRef]
- Sridhar, V.H.; Roche, D.G.; Gingins, S. Tracktor: Image-based automated tracking of animal movement and behaviour. Methods Ecol. Evol. 2019, 10, 810–820. [Google Scholar] [CrossRef]
- Rodriguez, A.; Zhang, H.; Klaminder, J.; Brodin, T.; Andersson, P.L.; Andersson, M. ToxTrac: A fast and robust software for tracking organisms. Methods Ecol. Evol. 2017, 9, 460–464. [Google Scholar] [CrossRef] [Green Version]
- Yamanaka, O.; Takeuchi, R. UMATracker: An intuitive image-based tracking platform. J. Exp. Biol. 2018, 221, jeb182469. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Harmer, A.M.T.; Thomas, D.B. pathtrackr: An r package for video tracking and analysing animal movement. Methods Ecol. Evol. 2019, 10, 1196–1202. [Google Scholar] [CrossRef] [Green Version]
- Vineesh, C.; Nehemiah, S. A review on using Python as a preferred programming language for beginners. Int. Res. J. Eng. Technol. 2021, 8, 4258–4263. Available online: https://www.irjet.net/archives/V8/i8/IRJET-V8I8505.pdf (accessed on 29 March 2023).
- Málik-Roffa, H. Ízeltlábúak Viselkedés Kutatását Támogató Szoftver Fejlesztése Python Nyelven (Development of Software Supporting the Research of Arthropod Behavior in Python). Master’s Thesis, GAMF Faculty of Engineering and Computer Science John von Neumann University,, Kecskemét, Hungary, 2021. [Google Scholar]
- Pulli, K.; Baksheev, A.; Kornyakov, K.; Eruhimov, V. Real-time computer vision with OpenCV. Commun. ACM 2012, 55, 61–69. [Google Scholar] [CrossRef]
- Piwowar, H.A.; Day, R.S.; Fridsma, D.B. Sharing detailed research data is associated with increased citation rate. PLoS ONE 2007, 2, e308. [Google Scholar] [CrossRef] [Green Version]
- Jones, Z.M. Git/GitHub, transparency, and legitimacy in quantitative research. Political Methodol. 2013, 21, 6–7. [Google Scholar]
- Suzuki, S.; Be, K. Topological structural analysis of digitized binary images by border following. Comput. Vision Graph. 1985, 30, 32–46. [Google Scholar] [CrossRef]
- Rosenfeld, A.; Kak, A.C. Digital Picture Processing, 2nd ed.; Academic Press: New York, NY, USA, 1982; Volume 2. [Google Scholar]
- Rosenfeld, A. Connectivity in digital pictures. J. Assoc. Cornput. Mach. 1970, 17, 146–160. [Google Scholar] [CrossRef]
- Yokoi, S.; Toriwaki, J.; Fukumura, T. An analysis of topological properties of digitized binary pictures using local features. Comput. Graph. Image Process 1975, 4, 63–73. [Google Scholar] [CrossRef]
- Li, Z.; Yokoi, S.; Toriwaki, J.; Fukumura, T. Border following and reconstruction of binary pictures using grid point representation. Trans. Inst. Electron. Commun. Eng. Jpn. 1982, J65, 1203–1210. [Google Scholar]
- Pavlidis, T. Algorithms for Graphics and Image Processing, 1st ed.; Computer Science Press, Inc.: Rockville, MY, USA, 1982. [Google Scholar]
- Morrin II, T.H. Chain-link compression of arbitrary black-white image. Comput. Graph. Image Process 1976, 5, 172–189. [Google Scholar] [CrossRef]
- Agui, T.; Iwata, I. Topological structure analysis of pictures by digital computer. Syst. Comput. Controls 1979, 10, 10–19. [Google Scholar]
- Pavlidis, T. Structural Pattern Recognition; Springer: Berlin/Heidelberg, Germany, 1977. [Google Scholar]
- Wu, Y.; Lim, J.; Yang, M.H. Online object tracking: A benchmark. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Portland, OR, USA, 23–28 June 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 2411–2418. [Google Scholar] [CrossRef] [Green Version]
- Kristan, M.; Pflugfelder, R.; Leonardis, A.; Matas, J.; Porikli, F.; Cehovin, L.; Nebehay, G.; Fernandez, G.; Vojir, T.; Gatt, A.; et al. The Visual Object Tracking VOT2013 Challenge Results. In Proceedings of the 2013 IEEE International Conference on Computer Vision Workshops, Washington, DC, USA, 2–8 December 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 98–111. [Google Scholar] [CrossRef] [Green Version]
- Kristan, M.; Pflugfelder, R.; Leonardis, A.; Matas, J.; Cehovin, L.; Nebehay, G.; Vojir, T.; Fernandez, G.; Lukežič, A.; Dimitriev, A.; et al. The Visual Object Tracking VOT2014 Challenge Results. In Proceedings of the Computer Vision—ECCV 2014 Workshops, Zurich, Switzerland, 6–7 September 2014; ECCV 2014, Lecture Notes in Computer Science. Agapito, L., Bronstein, M., Rother, C., Eds.; Springer: Cham, Switzerland, 2015. [Google Scholar] [CrossRef] [Green Version]
- Kristan, M.; Matas, J.; Leonardis, A.; Felsberg, M.; Cehovin, L.; Fernandez, G.; Vojir, T.; Hager, G.; Nebehay, G.; Pflugfelder, R. The Visual Object Tracking VOT2015 Challenge Results. In Proceedings of the 2015 IEEE International Conference on Computer Vision Workshop (ICCVW), Santiago, Chile, 7–13 December 2015; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar] [CrossRef] [Green Version]
- Liang, P.; Blasch, E.; Ling, H. Encoding color information for visual tracking: Algorithms and benchmark. IEEE Trans. Image Proc. 2015, 24, 5630–5644. [Google Scholar] [CrossRef] [PubMed]
- Smeulders, A.; Chu, D.; Cucchiara, R.; Calderara, S.; Dehghan, A.; Shah, M. Visual tracking: An experimental survey. IEEE Trans. Pattern Anal. Mach. Intell. 2014, 36, 1442–1468. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Mueller, M.; Smith, N.; Ghanem, B. A Benchmark and Simulator for UAV Tracking. In Computer Vision—ECCV 2016. ECCV 2016. Lecture Notes in Computer Science; Leibe, B., Matas, J., Sebe, N., Welling, M., Eds.; Springer: Cham, Switzerland, 2016. [Google Scholar] [CrossRef]
- Panadeiro, V.; Rodriguez, A.; Henry, J.; Wlodkowic, D.; Andersson, M. A review of 28 free animal-tracking software applications: Current features and limitations. Lab. Anim. 2021, 50, 246–254. [Google Scholar] [CrossRef]
- Lukezic, A.; Vojir, T.; Cehovin, L.; Matas, J.; Kristan, M. Discriminative Correlation Filter with Channel and Spatial Reliability. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 6309–6318. [Google Scholar] [CrossRef] [Green Version]
- Farkhodov, K.; Lee, S.H.; Kwon, K.R. Object Tracking using CSRT Tracker and RCNN. In Proceedings of the BIOIMAGING, Valletta, Malta, 24–26 February 2020; pp. 209–212. [Google Scholar]
- Magura, T.; Horváth, R.; Mizser, S.; Tóth, M.; Nagy, D.D.; Csicsek, R.; Balla, E. Urban individuals of three rove beetle species are not more exploratory or risk-taking than rural conspecifics. Insects 2022, 13, 757. [Google Scholar] [CrossRef]
- Réale, D.; Reader, S.M.; Sol, D.; McDougall, P.T.; Dingemanse, N.J. Integrating animal temperament within ecology and evolution. Biol. Rev. 2007, 82, 291–318. [Google Scholar] [CrossRef] [Green Version]
- Kortet, R.; Hedrick, A.N.N. A behavioural syndrome in the field cricket Gryllus integer: Intrasexual aggression is correlated with activity in a novel environment. Biol. J. Linn. Soc. 2007, 91, 475–482. [Google Scholar] [CrossRef] [Green Version]
- Schuett, W.; Delfs, B.; Haller, R.; Kruber, S.; Roolfs, S.; Timm, D.; Willmann, M.; Drees, C. Ground beetles in city forests: Does urbanization predict a personality trait? PeerJ 2018, 6, e4360. [Google Scholar] [CrossRef] [Green Version]
- Jones, K.A.; Godin, J.G.J. Are fast explorers slow reactors? Linking personality type and anti-predator behaviour. Proc. R. Soc. B Biol. Sci. 2010, 277, 625–632. [Google Scholar] [CrossRef] [PubMed]
- Labaude, S.; O’Donnell, N.; Griffin, C.T. Description of a personality syndrome in a common and invasive ground beetle (Coleoptera: Carabidae). Sci. Rep. 2018, 8, 17479. [Google Scholar] [CrossRef] [PubMed] [Green Version]
Software | Environment | Interface | Open Source | Method | Visualization Process | Object Crosses Handling |
---|---|---|---|---|---|---|
BugTracker | Python, OpenCV | Terminal-based/Command-based | Yes | CSRT | Yes | Yes, by tracker |
Tracktor [10] | Python, OpenCV | Command-based | Yes | Dynamic background subtraction | Yes | No |
ToxTrac [11] | C++, OpenCV | GUI | No | Dynamic background subtraction | No | Yes, by matching similarities of the trajectory |
Pathtrackr [13] | R | Command-based | Yes | Static background subtraction | Yes | No |
Software | Video with Ideal Lighting Conditions and a Fixed Camera Recording the Movements of Pardosa alacris (Lycosidae) | Video without an External Light Source and a Fixed Camera Recording the Movements of Armadillidium vulgare (Armadillidiidae) | Video without an External Light Source and a Nonfixed, Moving, Hand-Held Camera Recording the Movements of Pardosa alacris (Lycosidae) |
---|---|---|---|
Manual counting | 21 | 16 | 12 |
Tracktor [10] | 0 | 0 | 0 |
ToxTrac [11] | 21 | 17 | 7 |
Pathtrackr [13] | 21 | 14 | 0 |
BugTracker | 21 | 16 | 12 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Málik-Roffa, H.; Tőzsér, D.; Tóthmérész, B.; Magura, T. BugTracker: Software for Tracking and Measuring Arthropod Activity. Diversity 2023, 15, 846. https://doi.org/10.3390/d15070846
Málik-Roffa H, Tőzsér D, Tóthmérész B, Magura T. BugTracker: Software for Tracking and Measuring Arthropod Activity. Diversity. 2023; 15(7):846. https://doi.org/10.3390/d15070846
Chicago/Turabian StyleMálik-Roffa, Hajnalka, Dávid Tőzsér, Béla Tóthmérész, and Tibor Magura. 2023. "BugTracker: Software for Tracking and Measuring Arthropod Activity" Diversity 15, no. 7: 846. https://doi.org/10.3390/d15070846