Implementing a Hybrid Method for Shack–Hartmann Wavefront Spots Labeling on FPGA
Abstract
:1. Introduction
2. Image Processing
2.1. Threshold
2.2. Morphological Filters
2.3. Connected Component Labeling Algorithms
3. Hybrid Labeling Method
3.1. Forward Scan
3.2. Backward Scan
3.3. Centroid Calculation
4. Hardware Implementation
4.1. Image Memory
4.2. Grayscaling and Threshold Unit
4.3. Generic Spatial Filter Unit
4.4. Connected Components Labeling Unit
4.5. Generate Centroid Unit
5. Simulation
6. Implementation Results and Discussion
- NB_SPOTS: The maximum number of detected spots. This parameter is used to generate centroid and cursor units several times equal to NB_SPOTS.
- LABEL_WIDTH: The number of bits considered to present the labels. Therefore, the number of labels is between 2 and This parameter is used to define the labeling memories, such as the equivalence table. The case here is LABEL_WIDTH = 7, which means that the number of labels is between 2 and 128.
- AREA_WIDTH: The number of bits considered to present the area of a spot. The parameter is used in the centroid unit to define adder widths. AREA_WIDTH = 8, which means that a spot can contain 256 pixels.
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Tokunaga, A.T.; Jedicke, R. Chapter 39—New Generation Ground-Based Optical/Infrared Telescopes. In Encyclopedia of the Solar System, 2nd ed.; McFadden, L.A., Weissman, P.R., Johnson, T.V., Eds.; Academic Press: San Diego, CA, USA, 2007; pp. 719–734. [Google Scholar] [CrossRef]
- Rigaut, F.; Van Dam, M. Simulating astronomical adaptive optics systems using yao. In Proceedings of the 3rd O4ELT Conference Adaptive Optics for Extremely Large Telescopes, Florence, Italy, 26–31 May 2013. [Google Scholar]
- Liu, M.; Dong, B. Efficient wavefront sensorless adaptive optics based on large dynamic crosstalk-free holographic modal wavefront sensing. Opt. Express 2022, 30, 9088–9102. [Google Scholar] [CrossRef] [PubMed]
- Zepp, A.; Gladysz, S.; Stein, K.; Osten, W. Simulation-based design optimization of the holographic wavefront sensor in closed-loop adaptive optics. Light Adv. Manuf. 2022, 3, 384–399. [Google Scholar] [CrossRef]
- Mauch, S.; Reger, J.; Reinlein, C.; Appelfelder, M.; Goy, M.; Beckert, E.; Tünnermann, A. FPGA-accelerated adaptive optics wavefront control. In Proceedings of the MEMS Adaptive Optics VIII, San Francisco, CA, USA, 1–6 February 2014; Volume 8978, p. 897802. [Google Scholar]
- Leonhard, N.; Berlich, R.; Minardi, S.; Barth, A.; Mauch, S.; Mocci, J.; Goy, M.; Appelfelder, M.; Beckert, E.; Reinlein, C. Real-time adaptive optics testbed to investigate point-ahead angle in pre-compensation of Earth-to-GEO optical communication. Opt. Express 2016, 24, 13157–13172. [Google Scholar] [CrossRef] [PubMed]
- Brady, A.; Berlich, R.; Leonhard, N.; Kopf, T.; Böttner, P.; Eberhardt, R.; Reinlein, C. Experimental validation of phase-only pre-compensation over 494 m free-space propagation. Opt. Lett. 2017, 42, 2679–2682. [Google Scholar] [CrossRef] [PubMed]
- Brady, A.; Rössler, C.; Leonhard, N.; Gier, M.; Böttner, P.; Eberhardt, R.; Tünnermann, A.; Reinlein, C. Validation of pre-compensation under point-ahead-angle in a 1 km free-space propagation experiment. Opt. Express 2019, 27, 17840–17850. [Google Scholar] [CrossRef]
- Goy, M.; Berlich, R.; Kržič, A.; Rieländer, D.; Kopf, T.; Sharma, S.; Steinlechner, F.O. High performance optical free-space links for quantum communications. In Proceedings of the International Conference on Space Optics—ICSO, Online, 30 March–2 April 2021; Volume 11852, pp. 213–221. [Google Scholar]
- Kržič, A.; Sharma, S.; Spiess, C.; Chandrashekara, U.; Töpfer, S.; Sauer, G.; del Campo, L.; Kopf, T.; Petscharnig, S.; Grafenauer, T.; et al. Metropolitan free-space quantum networks. arXiv 2022, arXiv:2205.12862. [Google Scholar] [CrossRef]
- Mauch, S.; Barth, A.; Reger, J.; Reinlein, C.; Appelfelder, M.; Beckert, E. FPGA-accelerated adaptive optics wavefront control part II. In Proceedings of the Laser Resonators, Microresonators, and Beam Control XVII, San Francisco, CA, USA, 7–12 February 2015; Volume 9343, p. 93430Y. [Google Scholar]
- Kong, F.; Cegarra Polo, M.; Lambert, A. FPGA Implementation of Shack–Hartmann Wavefront Sensing Using Stream-Based Center of Gravity Method for Centroid Estimation. Electronics 2023, 12, 1714. [Google Scholar] [CrossRef]
- Mocci, J.; Busato, F.; Bombieri, N.; Bonora, S.; Muradore, R. Efficient implementation of the Shack–Hartmann centroid extraction for edge computing. JOSA A 2020, 37, 1548–1556. [Google Scholar] [CrossRef] [PubMed]
- Mompeán, J.; Aragón, J.L.; Prieto, P.M.; Artal, P. GPU-based processing of Hartmann–Shack images for accurate and high-speed ocular wavefront sensing. Future Gener. Comput. Syst. 2019, 91, 177–190. [Google Scholar] [CrossRef]
- Mocci, J.; Quintavalla, M.; Trestino, C.; Bonora, S.; Muradore, R. A multiplatform CPU-based architecture for cost-effective adaptive optics systems. IEEE Trans. Ind. Inform. 2018, 14, 4431–4439. [Google Scholar] [CrossRef]
- Li, Z.; Li, X. Centroid computation for Shack-Hartmann wavefront sensor in extreme situations based on artificial neural networks. Opt. Express 2018, 26, 31675–31692. [Google Scholar] [CrossRef]
- Hu, L.; Hu, S.; Gong, W.; Si, K. Learning-based Shack-Hartmann wavefront sensor for high-order aberration detection. Opt. Express 2019, 27, 33504–33517. [Google Scholar] [CrossRef]
- Bovik, A.C. Handbook of Image and Video Processing; Academic Press: Cambridge, MA, USA, 2010. [Google Scholar]
- Johnston, C.T.; Bailey, D.G. FPGA implementation of a single pass connected components algorithm. In Proceedings of the 4th IEEE International Symposium on Electronic Design, Test and Applications (delta 2008), Hong Kong, China, 23–25 January 2008; IEEE: Piscataway, NJ, USA, 2008; pp. 228–231. [Google Scholar]
- Manohar, M.; Ramapriyan, H.K. Connected component labeling of binary images on a mesh connected massively parallel processor. Comput. Vis. Graph. Image Process. 1989, 45, 133–149. [Google Scholar] [CrossRef]
- Rosenfeld, A.; Pfaltz, J.L. Sequential operations in digital picture processing. J. ACM 1966, 13, 471–494. [Google Scholar] [CrossRef]
- Lacassagne, L.; Zavidovique, B. Light speed labeling: Efficient connected component labeling on RISC architectures. J. Real-Time Image Process. 2011, 6, 117–135. [Google Scholar] [CrossRef]
- Jablonski, M.; Gorgon, M. Handel-C implementation of classical component labelling algorithm. In Proceedings of the Euromicro Symposium on Digital System Design, Rennes, France, 31 August–3 September 2004; IEEE: Piscataway, NJ, USA, 2004; pp. 387–393. [Google Scholar]
- Alnuweiri, H.M.; Prasanna, V.K. Parallel architectures and algorithms for image component labeling. IEEE Comput. Archit. Lett. 1992, 14, 1014–1034. [Google Scholar]
- Crookes, D.; Benkrid, K. FPGA implementation of image component labeling. In Proceedings of the Reconfigurable Technology: FPGAs for Computing and Applications, International Society for Optics and Photonics, Boston, MA, USA, 19–22 September 1999; Volume 3844, pp. 17–23. [Google Scholar]
- Crookes, K.; Benkrid, A. An FPGA-Based Image Connected Component Labeller. In Proceedings of the 2003 International Conference on Field Programmable Logic and Applications, Lisbon, Portugal, 1–3 September 2003; Volume 2778, pp. 1012–1015. [Google Scholar]
- Otsu, N. A Threshold Selection Method from Gray-Level Histograms. IEEE Trans. Syst. Man, Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef]
- Woods, R.; González, R. Algoritmos de Procesamiento de Imagen Satelitales con Transformada Hough. Rev. Vis. Electron. 2009, 5, 26–41. [Google Scholar]
- Birchfield, S.T. Pixel-Based Image Processing Chapter 2. 2011. Available online: https://cecas.clemson.edu/~stb/ece847/internal/cvbook/ch02_pixproc.pdf (accessed on 15 January 2024).
- Vincent, L.; Soille, P. Watersheds in digital spaces: An efficient algorithm based on immersion simulations. IEEE Trans. Pattern Anal. Mach. Intell. 1991, 13, 583–598. [Google Scholar] [CrossRef]
- Comaniciu, D.; Meer, P. Mean shift: A robust approach toward feature space analysis. IEEE Trans. Pattern Anal. Mach. Intell. 2002, 24, 603–619. [Google Scholar] [CrossRef]
- Achanta, R.; Shaji, A.; Smith, K.; Lucchi, A.; Fua, P.; Süsstrunk, S. SLIC superpixels compared to state-of-the-art superpixel methods. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 2274–2282. [Google Scholar] [CrossRef]
- Rother, C.; Kolmogorov, V.; Blake, A. “GrabCut” interactive foreground extraction using iterated graph cuts. ACM Trans. Graph. 2004, 23, 309–314. [Google Scholar] [CrossRef]
- AbuBaker, A.; Qahwaji, R.; Ipson, S.; Saleh, M. One scan connected component labeling technique. In Proceedings of the 2007 IEEE International Conference on Signal Processing and Communications, Dubai, United Arab Emirates, 24–27 November 2007; IEEE: Piscataway, NJ, USA, 2007; pp. 1283–1286. [Google Scholar]
- Schwenk, K.; Huber, F. Connected Component Labeling algorithm for very complex and high-resolution images on an FPGA platform. In Proceedings of the High-Performance Computing in Remote Sensing V and International Society for Optics and Photonics, Toulouse, France, 21–24 September 2015; Volume 9646, p. 964603. [Google Scholar]
- Wu, K.; Otoo, E.; Suzuki, K. Optimizing two-pass connected-component labeling algorithms. Pattern Anal. Appl. 2009, 12, 117–135. [Google Scholar] [CrossRef]
- Döge, K.P. Videodetektion im Straßenverkehr: Signalmodelle und Analyseverfahren; Walter de Gruyter: Berlin, Germany, 2013. [Google Scholar]
- Mauch, S.; Reger, J. Real-time spot detection and ordering for a Shack–Hartmann wavefront sensor with a low-cost FPGA. IEEE Trans. Instrum. Meas. 2014, 63, 2379–2386. [Google Scholar] [CrossRef]
- Mauch, S.; Reger, J. Real-time implementation of the spiral algorithm for Shack-Hartmann wavefront sensor pattern sorting on an FPGA. Measurement 2016, 92, 63–69. [Google Scholar] [CrossRef]
- Tyson, R.K.; Frazier, B.W. Principles of Adaptive Optics; CRC Press: Boca Raton, FL, USA, 2022. [Google Scholar]
- Du, X.; Zhang, H.; Feng, J.; Xie, Q. A method of converting cameralink into hdmi based on fpga. In Proceedings of the 6th International Conference on Optical, Photonic Engineering (icOPEN 2018) and International Society for Optics and Photonics, Shanghai, China, 8–11 May 2018; Volume 10827, p. 1082716. [Google Scholar]
- Manufacturer, H. HDMI (High-Definition Multimedia Interface). Available online: https://www.immagic.com/eLibrary/ARCHIVES/GENERAL/WIKIPEDI/W120621H.pdf (accessed on 20 September 2023).
- Thier, M.; Paris, R.; Thurner, T.; Schitter, G. Low-latency Shack–Hartmann wavefront sensor based on an industrial smart camera. IEEE Trans. Instrum. Meas. 2012, 62, 1241–1249. [Google Scholar] [CrossRef]
FPGA Zybo | LUT | FF | BRAM |
---|---|---|---|
NB_SPOTS = 100 | 41,908 | 8925 | 114 |
NB_SPOTS = 50 | 22,806 | 6034 | 114 |
FPGA Zybo | LUT | FF | BRAM |
---|---|---|---|
NB_SPOTS = 100 | 48,909 | 9261 | 1 |
Sequence | Cycles | clk (MHz) |
---|---|---|
read image | 512 × 512 = 262,144 | 40 |
CCL | 262,144 | 40 |
x and y for centroid of label i | 512 | 40 |
division of centroid of label i | 1 | 40 |
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. |
© 2024 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
Abdullah, A.; Brady, A.; Heinig, D.; Krause, P.; Goy, M.; Döge, K.-P.; Tünnermann, A. Implementing a Hybrid Method for Shack–Hartmann Wavefront Spots Labeling on FPGA. Electronics 2024, 13, 1221. https://doi.org/10.3390/electronics13071221
Abdullah A, Brady A, Heinig D, Krause P, Goy M, Döge K-P, Tünnermann A. Implementing a Hybrid Method for Shack–Hartmann Wavefront Spots Labeling on FPGA. Electronics. 2024; 13(7):1221. https://doi.org/10.3390/electronics13071221
Chicago/Turabian StyleAbdullah, Ammar, Aoife Brady, Daniel Heinig, Peter Krause, Matthias Goy, Klaus-Peter Döge, and Andreas Tünnermann. 2024. "Implementing a Hybrid Method for Shack–Hartmann Wavefront Spots Labeling on FPGA" Electronics 13, no. 7: 1221. https://doi.org/10.3390/electronics13071221
APA StyleAbdullah, A., Brady, A., Heinig, D., Krause, P., Goy, M., Döge, K. -P., & Tünnermann, A. (2024). Implementing a Hybrid Method for Shack–Hartmann Wavefront Spots Labeling on FPGA. Electronics, 13(7), 1221. https://doi.org/10.3390/electronics13071221