Skip to main content
Log in

A quantum mechanics-based framework for image processing and its application to image segmentation

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

Abstract

Quantum mechanics provides the physical laws governing microscopic systems. A novel and generic framework based on quantum mechanics for image processing is proposed in this paper. The basic idea is to map each image element to a quantum system. This enables the utilization of the quantum mechanics powerful theory in solving image processing problems. The initial states of the image elements are evolved to the final states, controlled by an external force derived from the image features. The final states can be designed to correspond to the class of the element providing solutions to image segmentation, object recognition, and image classification problems. In this work, the formulation of the framework for a single-object segmentation problem is developed. The proposed algorithm based on this framework consists of four major steps. The first step is designing and estimating the operator that controls the evolution process from image features. The states associated with the pixels of the image are initialized in the second step. In the third step, the system is evolved. Finally, a measurement is performed to determine the output. The presented algorithm is tested on noiseless and noisy synthetic images as well as natural images. The average of the obtained results is 98.5 % for sensitivity and 99.7 % for specificity. A comparison with other segmentation algorithms is performed showing the superior performance of the proposed method. The application of the introduced quantum-based framework to image segmentation demonstrates high efficiency in handling different types of images. Moreover, it can be extended to multi-object segmentation and utilized in other applications in the fields of signal and image processing.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Alpert, S., Galun, M., Basri, R., Brandt, A.: image segmentation by probabilistic bottom-up aggregation and cue integration. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (2007)

  2. Aytekin, C., Kiranyaz, S., Gabbouj, M.: Quantum mechanics in computer vision: automatic object extraction. In: 20th IEEE International Conference on Image Processing (ICIP), 2013, pp. 2489–2493 (2013)

  3. Butkovskiy, A., Samoilenko, Y.: Control of Quantum-Mechanical Processes and Systems. Mathematics and its Applications (Kluwer Academic Publishers).: Soviet series, Springer (1990)

  4. Canny, J.: A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell. 6, 679–698 (1986)

    Article  Google Scholar 

  5. Casper, E., Hung, C.C., Jung, E., Yang, M.: A quantum-modeled k-means clustering algorithm for multi-band image segmentation. In: Proceedings of the 2012 ACM Research in Applied Computation Symposium, pp 158–163. ACM (2012)

  6. Chan, T.F., Vese, L.A.: Active contours without edges. IEEE Trans. Image Process. 10(2), 266–277 (2001)

    Article  ADS  MATH  Google Scholar 

  7. Cour, T., Yu, S., Shi, J.: MATLAB Normalized Cuts Segmentation Code (2004). http://www.cis.upenn.edu/~jshi/software/

  8. Eldar, Y.C., Oppenheim, A.V.: Quantum signal processing. IEEE Signal Process. Mag. 19(6), 12–32 (2002)

    Article  ADS  Google Scholar 

  9. Fu, X., Ding, M., Sun, Y., Chen, S.: A new quantum edge detection algorithm for medical images. In: Sixth International Symposium on Multispectral Image Processing and Pattern Recognition, International Society for Optics and Photonics, p. 749724 (2009)

  10. Gonzalez, R., Woods, R.: Digital Image Processing. Pearson/Prentice Hall, Upper Saddle River (2008)

    Google Scholar 

  11. Iliyasu, A.M., Le, P.Q., Dong, F., Hirota, K.: Watermarking and authentication of quantum images based on restricted geometric transformations. Inf. Sci. 186(1), 126–149 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  12. Lan, T., Sun, Y., Ding, M.: A fast quantum mechanics based contour extraction algorithm. In: SPIE Medical Imaging, International Society for Optics and Photonics, p. 72594C (2009)

  13. Latorre, J.I.: Image compression and entanglement. arXiv:quant-ph/0510031 (2005)

  14. Lou, L., Lu, L., Li, L., Gao, W., Li, L., Fu, Z.: Automatic contour extraction for multiple objects based on Schroedinger transform of image. In: Sixth International Symposium on Multispectral Image Processing and Pattern Recognition, International Society for Optics and Photonics, p. 749545 (2009)

  15. Luccheseyz, L., Mitray, S.: Color image segmentation: a state-of-the-art survey. Proc. Indian Natl. Sci. Acad. 67(2), 207–221 (2001)

    Google Scholar 

  16. Mechkouri, S.E., Zennouhi, R., El Joumani, S., Masmoudi, L., Gonzalez Jiminez, J.: Quantum segmentation approach for very high spatial resolution satellite image: application to quickbird image. J. Theor. Appl. Inf. Technol. 62(2), 539–545 (2014)

  17. Nasios, N., Bors, A.G.: Kernel-based classification using quantum mechanics. Pattern Recognit. 40(3), 875–889 (2007)

    Article  MATH  Google Scholar 

  18. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2010)

    Book  MATH  Google Scholar 

  19. Shi, J., Malik, J.: Normalized cuts and image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 22(8), 888–905 (2000)

    Article  Google Scholar 

  20. Talbi, H., Batouche, M., Draa, A.: A quantum-inspired evolutionary algorithm for multiobjective image segmentation. Int. J. Math. Phys. Eng. Sci. 1(2), 109–114 (2007)

    Google Scholar 

  21. Tanaka, K., Tsuda, K.: A quantum-statistical-mechanical extension of gaussian mixture model. In: Journal of Physics: Conference Series, vol. 95, p. 012023, IOP Publishing (2008)

  22. Tseng, C.C., Tsung, M.: (2003) Quantum digital image processing algorithms. In: 16th IPPR Conference on Computer Vision, Graphics and Image Processing, pp. 827–834

  23. Xu, C., Pham, D.L., Prince, J.L.: Image segmentation using deformable models. Handb. Med. Imaging 2, 129–174 (2000)

    Google Scholar 

  24. Yang, Y.G., Jia, X., Xu, P., Tian, J.: Analysis and improvement of the watermark strategy for quantum images based on quantum Fourier transform. Quantum Inf. Process. 12(8), 2765–2769 (2013a)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  25. Yang, Y.G., Xia, J., Jia, X., Zhang, H.: Novel image encryption/decryption based on quantum Fourier transform and double phase encoding. Quantum Inf. Process. 12(11), 3477–3493 (2013b)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  26. Yang, Y.G., Jia, X., Sun, S.J., Pan, Q.X.: Quantum cryptographic algorithm for color images using quantum Fourier transform and double random-phase encoding. Inf. Sci. 277, 445–457 (2014)

    Article  Google Scholar 

  27. Zhang, W.W., Gao, F., Liu, B., Jia, H.Y., Wen, Q.Y., Chen, H.: A quantum watermark protocol. Int. J. Theor. Phys. 52(2), 504–513 (2013a)

    Article  MathSciNet  MATH  Google Scholar 

  28. Zhang, W.W., Gao, F., Liu, B., Wen, Q.Y., Chen, H.: A watermark strategy for quantum images based on quantum Fourier transform. Quantum Inf. Process. 12(2), 793–803 (2013b)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  29. Zhang, Y., Lu, K., Gao, Y., Wang, M.: NEQR: a novel enhanced quantum representation of digital images. Quantum Inf. Process. 12(8), 2833–2860 (2013c)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  30. Zhang, Y., Lu, K., Gao, Y., Xu, K.: A novel quantum representation for log-polar images. Quantum Inf. Process. 12(9), 3103–3126 (2013d)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  31. Zhou, R.G., Wu, Q., Zhang, M.Q., Shen, C.Y.: Quantum image encryption and decryption algorithms based on quantum image geometric transformations. Int. J. Theor. Phys. 52(6), 1802–1817 (2013)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Akram Youssry.

Appendix: Additional proofs

Appendix: Additional proofs

1.1 Measurement operator

Let the general state vector of a two-state quantum system is

$$\begin{aligned} |\psi \rangle =\alpha |0\rangle +\beta |1\rangle \end{aligned}$$
(25)

Working in computational basis where

$$\begin{aligned} |0\rangle =\begin{pmatrix}1 \\ 0\end{pmatrix} , |1\rangle =\begin{pmatrix}0 \\ 1\end{pmatrix} \end{aligned}$$
(26)

Then

$$\begin{aligned} |\psi \rangle =\begin{pmatrix}\alpha \\ \beta \end{pmatrix} \end{aligned}$$
(27)

The Hermitian conjugate (complex conjugate transpose) of the state vector is

$$\begin{aligned} \langle \psi |=\alpha ^{\dagger }\langle 0|+\beta ^{\dagger }\langle 1| \end{aligned}$$
(28)

Choosing the same basis, we get:

$$\begin{aligned} \langle \psi |=\begin{pmatrix}\alpha ^{\dagger }&\beta ^{\dagger }\end{pmatrix} \end{aligned}$$
(29)

The inner product of two states \(|\phi \rangle \), \(|\psi \rangle \) is calculated by multiplying \(\langle \psi |\) and \(|\phi \rangle \). The short-hand notation for this operation is \(\langle \psi |\phi \rangle \). Now, taking the inner product of the vectors \(|\psi \rangle \) and \(|1\rangle \):

$$\begin{aligned} \langle 1 | \psi \rangle =\langle 1|\left( \alpha |0\rangle +\beta |1\rangle \right) =\alpha \langle 1|0\rangle +\beta \langle 1|1\rangle \end{aligned}$$
(30)

Since the states \(|0\rangle \) and \(|1\rangle \) are orthonormal as they form the basis of the Hilbert space of the system, therefore: \(\langle 1|0\rangle =0\) and \(\langle 1|1\rangle =1\). Thus,

$$\begin{aligned} \langle 1 | \psi \rangle =\beta \end{aligned}$$
(31)

Taking the Hermitian conjugate of the last equation, we get

$$\begin{aligned} \langle \psi | 1\rangle =\beta ^{\dagger } \end{aligned}$$
(32)

From the postulates of quantum mechanics, the probability of finding the system in state \(|1\rangle \) after measurement is given by

$$\begin{aligned} p(1)=\langle \psi |M^{\dagger } M|\psi \rangle \end{aligned}$$
(33)

where M is the measurement operator for the state \(|1\rangle \), taken to be

$$\begin{aligned} M=|1\rangle \langle 1| \end{aligned}$$
(34)

We can prove that this is the correct form of the operator by substituting in the mentioned postulate and using the previous results:

$$\begin{aligned} p(1)=\langle \psi |(|1\rangle \langle 1|)(|1\rangle \langle 1|)|\psi \rangle =\langle \psi | 1\rangle \langle 1 | 1\rangle \langle 1 | \psi \rangle = \beta ^{\dagger } 1 \beta =|\beta |^2 \end{aligned}$$
(35)

Which agrees with the physical interpretation of \(\beta \). This proves that this is the correct form of the measurement operator. This operator will be needed in the next section.

1.2 Hamiltonian design

Assume now we apply the operator U on the state \(|\psi \rangle \) to evolve it, where

$$\begin{aligned} U=e^{-\frac{i}{\hbar } \int _0^t{H(\tau )\hbox {d}\tau }}\end{aligned}$$
(36)

The probability of being in state \(|1\rangle \) after measurement is:

$$\begin{aligned} p(1)=\langle \psi |U^{\dagger }M^{\dagger }M U |\psi \rangle \end{aligned}$$
(37)

but

$$\begin{aligned} M^{\dagger } M=|1\rangle \langle 1 | 1\rangle \langle 1|=|1\rangle \langle 1| \end{aligned}$$
(38)

So

$$\begin{aligned} p(1)=\langle \psi |U^{\dagger }|1\rangle \langle 1| U |\psi \rangle \end{aligned}$$
(39)

Now, in our design we took the Hamiltonian to be in the form of

$$\begin{aligned} H = i \hbar g(t) \begin{pmatrix} 0 &{} -1 \\ 1 &{} 0 \end{pmatrix} \end{aligned}$$
(40)

so as to make sure that we are in cases 1 or 2 where we can find a closed-form solution. This chosen form ensures the commutation of the operator at different time instants. We now begin calculating the matrix U. Given that the eigen decomposition of the matrix:

$$\begin{aligned} \mathbf {S}=\begin{pmatrix} 0 &{} -1 \\ 1 &{} 0 \end{pmatrix} \end{aligned}$$
(41)

is given by:

$$\begin{aligned} \mathbf {S}=\mathbf {Q} \mathbf {D} \mathbf {Q}^{\dagger }=\frac{1}{\sqrt{2}} \begin{pmatrix}1 &{} 1 \\ -i &{} i \end{pmatrix} \begin{pmatrix} i &{} 0\\ 0 &{}-i \end{pmatrix} \frac{1}{\sqrt{2}}\begin{pmatrix}1 &{} i \\ 1 &{} -i \end{pmatrix} \end{aligned}$$
(42)

Then, we can calculate the matrix:

$$\begin{aligned} U=f(\mathbf {S})=\mathbf {Q} f(\mathbf {D}) \mathbf {Q}^{\dagger } \end{aligned}$$
(43)

where

$$\begin{aligned} \begin{aligned}f(\mathbf {S})&=\exp \left( -\frac{i}{\hbar }\int _0^t{H(\tau )\hbox {d}\tau }\right) \\&=\exp \left( -\frac{i}{\hbar }i \hbar \mathbf {S} \int _0^t{g(\tau )\hbox {d}\tau }\right) \\&=\exp \left( \mathbf {S}\tilde{g}(t)\right) \end{aligned} \end{aligned}$$
(44)

So,

$$\begin{aligned} f(\mathbf {D})=\begin{pmatrix}e^{i\tilde{g}(t)} &{} 0\\ 0 &{} e^{-i\tilde{g}(t)}\end{pmatrix}\end{aligned}$$
(45)

Therefore,

$$\begin{aligned} U=\frac{1}{2} \begin{pmatrix}1 &{} 1 \\ -i &{} i \end{pmatrix} \begin{pmatrix}e^{i\tilde{g}(t)} &{} 0\\ 0 &{} e^{-i\tilde{g}(t)}\end{pmatrix}\begin{pmatrix}1 &{} i \\ 1 &{} -i \end{pmatrix} \end{aligned}$$
(46)

In our work, we chose the initial state \(|\psi \rangle =|0\rangle \). Return back to calculate the probabilities.

$$\begin{aligned} \langle 1| U |\psi \rangle =\langle 1| U |0\rangle \end{aligned}$$
(47)

So,

$$\begin{aligned} \begin{aligned}\langle 1| U |0\rangle&=\begin{pmatrix}0&1\end{pmatrix}\frac{1}{2} \begin{pmatrix}1 &{} 1 \\ -i &{} i \end{pmatrix} \begin{pmatrix}e^{i\tilde{g}(t)} &{} 0\\ 0 &{} e^{-i\tilde{g}(t)}\end{pmatrix}\begin{pmatrix}1 &{} i \\ 1 &{} -i \end{pmatrix}\begin{pmatrix}1\\ 0\end{pmatrix} \\&=\frac{1}{2}\begin{pmatrix}-i&i\end{pmatrix} \begin{pmatrix}e^{i\tilde{g}(t)} &{} 0\\ 0 &{} e^{-i\tilde{g}(t)}\end{pmatrix} \begin{pmatrix}1\\ 1\end{pmatrix} \\&=\frac{1}{2}\begin{pmatrix}-i e^{i\tilde{g}(t)}&i e^{-i\tilde{g}(t)} \end{pmatrix}\begin{pmatrix}1\\ 1\end{pmatrix}\\ {}&=\sin (\tilde{g}(t)) \end{aligned} \end{aligned}$$
(48)

Finally,

$$\begin{aligned} \begin{aligned}p(1)&=\langle \psi |U^{\dagger }|1\rangle \langle 1| U |\psi \rangle \\&=\langle 0|U^{\dagger }|1\rangle \langle 1| U |0\rangle \\&={\sin (\tilde{g}(t))}^{\dagger }\sin (\tilde{g}(t))\\ {}&=\sin ^2(\tilde{g}(t))\end{aligned} \end{aligned}$$
(49)

Now we see that if

$$\begin{aligned} g(\tau )=c \end{aligned}$$
(50)

then

$$\begin{aligned} \tilde{g}(t)=\int _0^t{g(\tau )\hbox {d}\tau }=c t \end{aligned}$$
(51)

and we get

$$\begin{aligned} p(1)=\sin ^2(c t) \end{aligned}$$
(52)

which has an oscillatory behavior. This would require to choose a time instant to perform the measurement. On the other hand, if we choose

$$\begin{aligned} g(\tau )=c e^{-\tau } \end{aligned}$$
(53)

then

$$\begin{aligned} \tilde{g}(t)=\int _0^t{g(\tau )\hbox {d}\tau }=c -c e^{-t} \end{aligned}$$
(54)

and we get

$$\begin{aligned} p(1)=\sin ^2\left( c -c e^{-t}\right) \end{aligned}$$
(55)

Clearly, if we take the limit as \(t \rightarrow \infty \)

$$\begin{aligned} p(1)=\sin ^2(c) \end{aligned}$$
(56)

which is an exact value, that does not depend on time. If we choose \(c=2\pi \) then \(p(1)=0\) which means the final state is \(|0\rangle \) and if we choose \(c=\frac{\pi }{2}\) then \(p(1)=1\) which means the final state is \(|1\rangle \). This proves that the chosen form of the Hamiltonian can take the initial state \(|0\rangle \) to either of the two states \(|0\rangle \) or \(|1\rangle \) depending on the value of c. if we choose c carefully to depend on the feature vector, we can reach the final states that correspond to the classification of the pixel. The function g(t) can be any function such that the integral

$$\begin{aligned} \int _0^\infty {g(\tau )d\tau } \end{aligned}$$
(57)

exists. Satisfying this condition obviates us from choosing a time instant to measure, since we let the system evolve for sufficiently long time before measuring.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Youssry, A., El-Rafei, A. & Elramly, S. A quantum mechanics-based framework for image processing and its application to image segmentation. Quantum Inf Process 14, 3613–3638 (2015). https://doi.org/10.1007/s11128-015-1072-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11128-015-1072-3

Keywords

Navigation