Morphological processing of binary images using quantum circuits: a qiskit implementation

Authors

DOI:

https://doi.org/10.71112/nankke17

Keywords:

quantum image processing, mathematical morphology, erosion, dilation, Qiskit, OpenCV

Abstract

Erosion and dilation are fundamental mathematical morphology operations used to modify the shape of objects in binary images. This study evaluated their implementation through a quantum circuit simulated in Qiskit, using classical processing in OpenCV as the reference. The Baboon image was analyzed at resolutions of 102×102, 128×128, and 256×256 pixels, with 16, 160, 1600, 16000, and 160000 circuit executions. The comparison included visual inspection, calculation of MSE, PSNR, and SSIM, and measurement of simulation times. The circuit reproduced the expected effect of both operations, although the reconstructed images did not fully match those obtained with OpenCV. Dilation showed more stable similarity than erosion. In addition, increasing the number of executions did not improve the metrics monotonically and substantially increased computation time.

Downloads

Download data is not yet available.

References

Caraiman, S., & Manta, V. I. (2014). Histogram-based segmentation of quantum images. Theoretical Computer Science, 529, 46–60. https://doi.org/10.1016/j.tcs.2013.08.005 DOI: https://doi.org/10.1016/j.tcs.2013.08.005

Deutsch, D. (1985). Quantum theory, the Church–Turing principle and the universal quantum computer. Proceedings of the Royal Society of London. A. Mathematical and Physical Sciences, 400(1818), 97–117. https://doi.org/10.1098/rspa.1985.0070 DOI: https://doi.org/10.1098/rspa.1985.0070

Feynman, R. P. (1982). Simulating physics with computers. International Journal of Theoretical Physics, 21(6–7), 467–488. https://doi.org/10.1007/BF02650179 DOI: https://doi.org/10.1007/BF02650179

Geng, A., Moghiseh, A., Redenbach, C., & Schladitz, K. (2022). A hybrid quantum image edge detector for the NISQ era. Quantum Machine Intelligence, 4, Article 15. https://doi.org/10.1007/s42484-022-00071-3 DOI: https://doi.org/10.1007/s42484-022-00071-3

Gonzalez, R. C., & Woods, R. E. (2018). Digital image processing (4th ed.). Pearson.

Grover, L. K. (1996). A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM symposium on theory of computing (pp. 212–219). ACM. https://doi.org/10.1145/237814.237866 DOI: https://doi.org/10.1145/237814.237866

Haque, M. E., Paul, M., Ulhaq, A., & Debnath, T. (2023). Advanced quantum image representation and compression using a DCT-EFRQI approach. Scientific Reports, 13, Article 4129. https://doi.org/10.1038/s41598-023-30575-2 DOI: https://doi.org/10.1038/s41598-023-30575-2

Haralick, R. M., Sternberg, S. R., & Zhuang, X. (1987). Image analysis using mathematical morphology. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-9(4), 532–550. https://doi.org/10.1109/TPAMI.1987.4767941 DOI: https://doi.org/10.1109/TPAMI.1987.4767941

Horé, A., & Ziou, D. (2010). Image quality metrics: PSNR vs. SSIM. In 2010 20th International Conference on Pattern Recognition (pp. 2366–2369). IEEE. https://doi.org/10.1109/ICPR.2010.579 DOI: https://doi.org/10.1109/ICPR.2010.579

Huynh-Thu, Q., & Ghanbari, M. (2008). Scope of validity of PSNR in image/video quality assessment. Electronics Letters, 44(13), 800–801. https://doi.org/10.1049/el:20080522 DOI: https://doi.org/10.1049/el:20080522

Jiang, N., & Wang, L. (2015). Quantum image scaling using nearest neighbor interpolation. Quantum Information Processing, 14(5), 1559–1571. https://doi.org/10.1007/s11128-014-0841-8 DOI: https://doi.org/10.1007/s11128-014-0841-8

Le, P. Q., Dong, F., & Hirota, K. (2011). A flexible representation of quantum images for polynomial preparation, image compression, and processing operations. Quantum Information Processing, 10(1), 63–84. https://doi.org/10.1007/s11128-010-0177-y DOI: https://doi.org/10.1007/s11128-010-0177-y

Leymann, F., & Barzen, J. (2020). The bitter truth about gate-based quantum algorithms in the NISQ era. Quantum Science and Technology, 5(4), Article 044007. https://doi.org/10.1088/2058-9565/abae7d DOI: https://doi.org/10.1088/2058-9565/abae7d

Li, P., Shi, T., Lu, A., & Wang, B. (2019). Quantum circuit design for several morphological image processing methods. Quantum Information Processing, 18(12), Article 364. https://doi.org/10.1007/s11128-019-2479-z DOI: https://doi.org/10.1007/s11128-019-2479-z

Liu, W., Wang, L., & Cui, M. (2022). Quantum image segmentation based on grayscale morphology. IEEE Transactions on Quantum Engineering, 3, Article 3103012, 1–12. https://doi.org/10.1109/TQE.2022.3223368 DOI: https://doi.org/10.1109/TQE.2022.3223368

Ma, S.-Y., Khalil, A., Hajjdiab, H., & Eleuch, H. (2020). Quantum dilation and erosion. Applied Sciences, 10(11), Article 4040. https://doi.org/10.3390/app10114040 DOI: https://doi.org/10.3390/app10114040

Nasr, N., Younes, A., & Elsayed, A. (2021). Efficient representations of digital images on quantum computers. Multimedia Tools and Applications, 80(25), 34019–34034. https://doi.org/10.1007/s11042-021-11355-4 DOI: https://doi.org/10.1007/s11042-021-11355-4

Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1), 62–66. https://doi.org/10.1109/TSMC.1979.4310076 DOI: https://doi.org/10.1109/TSMC.1979.4310076

Preskill, J. (2018). Quantum computing in the NISQ era and beyond. Quantum, 2, Article 79. https://doi.org/10.22331/q-2018-08-06-79 DOI: https://doi.org/10.22331/q-2018-08-06-79

Pulli, K., Baksheev, A., Kornyakov, K., & Eruhimov, V. (2012). Real-time computer vision with OpenCV. Communications of the ACM, 55(6), 61–69. https://doi.org/10.1145/2184319.2184337 DOI: https://doi.org/10.1145/2184319.2184337

Qiskit Community (2019). Qiskit: An open-source framework for quantum computing [Software de computadora]. Zenodo. https://doi.org/10.5281/zenodo.2562111

Shor, P. W. (1994). Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science (pp. 124–134). IEEE. https://doi.org/10.1109/SFCS.1994.365700 DOI: https://doi.org/10.1109/SFCS.1994.365700

Vincent, L. (1993). Morphological grayscale reconstruction in image analysis: Applications and efficient algorithms. IEEE Transactions on Image Processing, 2(2), 176–201. https://doi.org/10.1109/83.217222 DOI: https://doi.org/10.1109/83.217222

Wang, Z., & Bovik, A. C. (2002). A universal image quality index. IEEE Signal Processing Letters, 9(3), 81–84. https://doi.org/10.1109/97.995823 DOI: https://doi.org/10.1109/97.995823

Wang, Z., Bovik, A. C., Sheikh, H. R., & Simoncelli, E. P. (2004). Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4), 600–612. https://doi.org/10.1109/TIP.2003.819861 DOI: https://doi.org/10.1109/TIP.2003.819861

Wang, Z., Xu, M., & Zhang, Y. (2022). Review of quantum image processing. Archives of Computational Methods in Engineering, 29(2), 737–761. https://doi.org/10.1007/s11831-021-09599-2 DOI: https://doi.org/10.1007/s11831-021-09599-2

Yan, F., Iliyasu, A. M., & Jiang, Z. (2014). Quantum computation-based image representation, processing operations and their applications. Entropy, 16(10), 5290–5338. https://doi.org/10.3390/e16105290 DOI: https://doi.org/10.3390/e16105290

Yan, F., Iliyasu, A. M., & Venegas-Andraca, S. E. (2016). A survey of quantum image representations. Quantum Information Processing, 15(1), 1–35. https://doi.org/10.1007/s11128-015-1195-6 DOI: https://doi.org/10.1007/s11128-015-1195-6

Yan, F., & Venegas-Andraca, S. E. (2025). Lessons from twenty years of quantum image processing. ACM Transactions on Quantum Computing, 6(1), Article 5, 1–29. https://doi.org/10.1145/3663577 DOI: https://doi.org/10.1145/3663577

Yao, X.-W., Wang, H., Liao, Z., Chen, M.-C., Pan, J., Li, J., Zhang, K., Lin, X., Wang, Z., Luo, Z., Zheng, W., Li, J., Zhao, M., Peng, X., & Suter, D. (2017). Quantum image processing and its application to edge detection: Theory and experiment. Physical Review X, 7(3), Article 031041. https://doi.org/10.1103/PhysRevX.7.031041 DOI: https://doi.org/10.1103/PhysRevX.7.031041

Yuan, S., Mao, X., Li, T., Xue, Y., Chen, L., & Xiong, Q. (2015). Quantum morphology operations based on quantum representation model. Quantum Information Processing, 14(5), 1625–1645. https://doi.org/10.1007/s11128-014-0862-3 DOI: https://doi.org/10.1007/s11128-014-0862-3

Yuan, S., Mao, X., Chen, L., & Wang, X. (2016). Improved quantum dilation and erosion operations. International Journal of Quantum Information, 14(7), Article 1650036. https://doi.org/10.1142/S0219749916500362 DOI: https://doi.org/10.1142/S0219749916500362

Zhang, Y., Lu, K., Gao, Y., & Wang, M. (2013). NEQR: A novel enhanced quantum representation of digital images. Quantum Information Processing, 12(8), 2833–2860. https://doi.org/10.1007/s11128-013-0567-z DOI: https://doi.org/10.1007/s11128-013-0567-z

Barenco, A., Bennett, C. H., Cleve, R., DiVincenzo, D. P., Margolus, N., Shor, P., Sleator, T., Smolin, J. A., & Weinfurter, H. (1995). Elementary gates for quantum computation. Physical Review A, 52(5), 3457–3467. https://doi.org/10.1103/PhysRevA.52.3457 DOI: https://doi.org/10.1103/PhysRevA.52.3457

Nielsen, M. A., & Chuang, I. L. (2010). Quantum computation and quantum information (10th anniversary ed.). Cambridge University Press.

Published

2026-08-28

Issue

Section

Exact Sciences

How to Cite

Hernández Sánchez, L., Franco Escudero, E. A., & Arceo Reyes, R. (2026). Morphological processing of binary images using quantum circuits: a qiskit implementation. Multidisciplinary Journal Epistemology of the Sciences, 3(3), 1917-1941. https://doi.org/10.71112/nankke17

Most read articles by the same author(s)