Skip to main content

Advertisement

Log in

Quantum image edge detection using improved Sobel mask based on NEQR

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

Abstract

Recently, image edge detection using quantum image processing has focused due to having less circuit complexity and storage capacity. Edge extraction using the Sobel operator has the restriction in vertical and horizontal directions, which provides less edge information. In this paper, we introduce a quantum improved Sobel edge detection algorithm with non-maximum suppression and double threshold techniques for novel enhanced quantum representation method. We have analyzed the quantum circuit of realizing the edge detection algorithm, the number of edge pixels, simulation results, and circuit complexity. Thereafter, we have compared with the classical and some existing quantum edge detection algorithms. Our proposed algorithm can achieve a significant improvement in the case of edge information and circuit complexity.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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
Fig. 11

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Yan, F., Iliyasu, A.M., Le, P.Q.: Quantum image processing: a review of advances in its security technologies. Int. J. Quantum Inf. 15(03), 1730001 (2017)

    Article  MathSciNet  Google Scholar 

  2. Feynman, R.P.: Simulating physics with computers. Int. J. Theor. Phys. 21(6/7), 467–488 (1982)

    Article  MathSciNet  Google Scholar 

  3. Iliyasu, A.M.: Towards the realization of secure and efficient image and video processing applications on quantum computers. Entropy 15, 2874–2974 (2013)

    Article  ADS  MathSciNet  Google Scholar 

  4. Iliyasu, A.M.: Algorithmic frameworks to support the realization of secure and efficient image-video processing applications on quantum computers. Ph. D. (Dr Eng.) Thesis, Tokyo Institute of Technology, Tokyo, Japan. 25 Sept. 2012 (2012)

  5. Iliyasu, A.M., Le, P.Q., Yan, F., Bo, S., Garcia, J.A.S., Dong, F., Hirota, K.: A two-tier scheme for grayscale quantum image watermarking and recovery. Int. J. Innov. Comput. Appl. 5, 85–101 (2013)

    Article  Google Scholar 

  6. Tseng, C.C., Hwang, T.M.: Quantum digital image processing algorithms. In: Proceedings of the 16th IPPR Conference on Computer Vision, Graphics and Image Processing, pp. 827–834 (2003)

  7. Venegas-Andraca, S.E., Bose, S.: Storing, processing and retrieving an image using quantum mechanics. In: Proceeding of the SPIE Conference Quantum Information and Computation, vol. 5105, pp. 137–147 (2003)

  8. Le, P.Q., Dong, F., Hirota, K.: A flexible representation of quantum images for polynomial preparation, image compression, and processing operations. Quantum Inf. Process. 10(1), 63–84 (2011)

    Article  MathSciNet  Google Scholar 

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

    Article  ADS  MathSciNet  Google Scholar 

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

    Article  ADS  MathSciNet  Google Scholar 

  11. Li, H., Zhu, Q., Zhou, R., Song, L., Yang, X.: Multi-dimensional color image storage and retrieval for a normal arbitrary quantum superposition state. Quantum Inf. Process. 13, 991–1011 (2014)

    Article  ADS  MathSciNet  Google Scholar 

  12. Jiang, N., Wang, J., Mu, Y.: Quantum image scaling up based on nearest-neighbor interpolation with integer scaling ratio. Quantum Inf. Process. 14(11), 4001–4026 (2015)

    Article  ADS  MathSciNet  Google Scholar 

  13. Jiang, N., Wu, W.Y., Wang, L., Zhao, N.: Quantum image pseudo color coding based on the density-stratified method. Quantum Inf. Process. 14(5), 1735–1755 (2015)

    Article  ADS  MathSciNet  Google Scholar 

  14. Jiang, N., Wu, W.Y., Wang, L.: The quantum realization of Arnold and Fibonacci image scrambling. Quantum Inf. Process. 13, 1223–1236 (2014)

    Article  ADS  MathSciNet  Google Scholar 

  15. Jiang, N., Wang, L., Wu, W.Y.: Quantum Hilbert image scrambling. Int. J. Theor. Phys. 53, 2463–2484 (2014)

    Article  Google Scholar 

  16. Zhou, R.G., Sun, Y.J., Fan, P.: Quantum image Gray-code and bit-plane scrambling. Quantum Inf. Process. 14, 1717–1734 (2015)

    Article  ADS  MathSciNet  Google Scholar 

  17. Arbelaez, P., Maire, M., Fowlkes, C., Malik, J.: Contour detection and hierarchical image segmentation. IEEE TPAMI 33(5), 898–916 (2011)

    Article  Google Scholar 

  18. Le, P.Q., Iliyasu, A.M., Dong, F., Hirota, K.: Fast geometric transformations on quantum images. IAENG Int. J. Appl. Math. 40(3), 113–123 (2010)

    MathSciNet  MATH  Google Scholar 

  19. Le, P.Q., Iliyasu, A.M., Dong, F., et al.: Strategies for designing geometric transformations on quantum images. Theor. Comput. Sci. 412, 1406–1418 (2011)

    Article  MathSciNet  Google Scholar 

  20. Zhou, R.-G., Hu, W., Fan, P., Ian, H.: Quantum realization of the bilinear interpolation method for NEQR. Sci. Rep. 7(1), 2511 (2017)

    Article  ADS  Google Scholar 

  21. Zhou, R.G., Wu, Q., Zhang, M.Q., et al.: 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 

  22. Jiang, N., Zhao, N., Wang, L.: LSB based quantum image steganography algorithm. Int. J. Theor. Phys. 55(1), 107–123 (2016)

    Article  Google Scholar 

  23. Iliyasu, A.M., Le, P.Q., Dong, F., et al.: Watermarking and authentication of quantum image based on restricted geometric transformations. Inf. Sci. 186(1), 126–149 (2012)

    Article  MathSciNet  Google Scholar 

  24. Yan, F., Iliyasu, A.M., Sun, B., et al.: A duple watermarking strategy for multi-channel quantum images. Quantum Inf. Process. 14(5), 1675–1692 (2015)

    Article  ADS  MathSciNet  Google Scholar 

  25. Yan, F., Iliyasu, A.M., Guo, Y.M., Yang, H.M.: Flexible representation and manipulation of audio signals on quantum computers. Theor. Comput. Sci. 752, 71–85 (2018)

    Article  MathSciNet  Google Scholar 

  26. Abdullah, M., Iliyasu, P.C., Le, Q., Dong, F.Y., et al.: A framework for representing and producing movies on quantum computers. Int. J. Quantum Inf. 9(6), 1459–1497 (2011)

    Article  Google Scholar 

  27. Simona, C., Vasile, I.M.: Image segmentation on a quantum computer. Quantum Inf. Process. 14(5), 1693–1715 (2015)

    Article  MathSciNet  Google Scholar 

  28. Jiang, N., Dang, Y., Wang, J.: Quantum image matching. Quantum Inf. Process. 15(9), 3543–3572 (2016)

    Article  ADS  MathSciNet  Google Scholar 

  29. Zhang, Y., Lu, K., Gao, Y.: Q Sobel: a novel quantum image edge extraction algorithm. Sci. China Inf. Sci. 58(1), 1–13 (2014). https://doi.org/10.1007/s11432-014-5158-9

    Article  Google Scholar 

  30. Zhou, R.G., Liu, D.Q.: Quantum image edge extraction based on improved Sobel operator. Int. J. Theor. Phys. 58(9), 2969–2985 (2019)

    Article  MathSciNet  Google Scholar 

  31. Fan, P., Zhou, R.G., Hu, W., Jing, N.: Quantum image edge extraction based on classical Sobel operator for NEQR. Quantum Inf. Process. 18(1), 24 (2019)

    Article  ADS  Google Scholar 

  32. Fan, P., Zhou, R.G., Hu, W.W., Jing, N.: Quantum image edge extraction based on Laplacian operator and zero-cross method. Quantum Inf. Process. 18(1), 27 (2019)

    Article  ADS  Google Scholar 

  33. Chetia, R., Boruah, S.M.B., Roy, S., Sahu, P.P.: Quantum image edge detection based on four directional sobel operator. In: International Conference on Pattern Recognition and Machine Intelligence (PReMI 2019). Lecture Notes in Computer Science, vol 11941. Springer, Cham, pp 532–540(2019)

  34. Zhou, R.G., Yu, H., Cheng, Y., Li, F.X.: Quantum image edge extraction based on improved Prewitt operator. Quantum Inf. Process. 18(9), 261 (2019)

    Article  ADS  Google Scholar 

  35. Li, P., Shi, T., Lu, A., et al.: Quantum implementation of classical Marr–Hildreth edge detection. Quantum Inf. Process. 19, 64 (2020). https://doi.org/10.1007/s11128-019-2559-0

    Article  ADS  MathSciNet  Google Scholar 

  36. Rosenfeld, A.: Digital Picture Processing. Academic Press, New York (1976)

    MATH  Google Scholar 

  37. Robinson, G.S.: Edge detection by compass gradient masks. Comput. Graph. Image Process. 6, 492–501 (1977)

    Article  Google Scholar 

  38. Khosropour, A., Aghababa, H., Forouzandeh, B.: Quantum division circuit based on restoring division algorithm. In: 2011 Eighth International Conference on Information Technology: New Generations. IEEE, pp. 1037–1040 (2011)

  39. Wang, J., Jiang, N., Wang, L.: Quantum image translation. Quantum Inf. Process. 14, 1589–1604 (2015)

    Article  ADS  MathSciNet  Google Scholar 

  40. Cuccaro, S.A., Draper, T.G., Kutin, S.A., Moultol, D.P.: A new quantum ripple-carry addition circuit. arXiv:quant-ph/0410184 (2004)

  41. Thapliyal, H., Ranganathan, N.: Design of efficient reversible binary subtractors based on a new reversible gate. In: 2009 IEEE Computer Society Annual Symposium on VLSI, IEEE, pp. 229–234 (2009)

  42. Thapliyal, H., Ranganathan, N.: A new design of the reversible subtractor circuit. In: 2011 11th IEEE International Conference on Nanotechnology, IEEE, pp. 1430–1435 (2011)

  43. Wang, D., Liu, Z.H., Zhu, W.N., Li, S.Z.: Design of quantum comparator based on extended general Toffoli gates with multiple targets. Comput. Sci. 39(9), 302–306 (2012)

    Google Scholar 

  44. Tsai, H.M., Chang, L.W.: Secure reversible visible image watermarking with authentication. J. Signal Process. Image Commun. 25, 10–17 (2010)

    Article  Google Scholar 

  45. Yaghmaee, F., Jamzad, M.: Estimating watermarking capacity in Gray scale images based on image complexity. EURASIP J. Adv. Signal Process. (2010). https://doi.org/10.1155/2010/851920

    Article  Google Scholar 

  46. Zhang, F., Zhang, X., Zhang, H.: Digital image watermarking capacity and detection error rate. Pattern Recogn. Lett. 28, 1–10 (2008)

    Article  Google Scholar 

  47. Gunjal, B.L., Manthalkar, R.R.: An overview of transform domain robust digital image watermarking algorithm. J. Emerg. Trends Comput. Inf. Sci. 2(1), 37–42 (2010)

    Google Scholar 

  48. Liu, Q., Sung, A.H.: Image complexity and feature mining for stag analysis of least significant bit steganography. Inf. Sci. 178, 21–36 (2008)

    Article  Google Scholar 

  49. http://www.imageprocessingplace.com/root_files_V3/image_databases.htm

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to R. Chetia.

Additional information

Publisher's Note

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

Appendices

Appendix 1: Classical Sobel edge extraction algorithm

Sobel operator is an individually separate and distinct differential operator. Sobel operator has two sets of 3 × 3 masks and mainly used for edge detection of an image (Fig. 12).

Fig. 12
figure 12

a 3 × 3 pixel neighborhood templates, b and c two operators of Sobel algorithm

If GH and GV represent the image gradient values of the original image into the horizontal and vertical directions, then the calculation of GH & GV is defined as

$$ \begin{aligned} G^{\text{H}} & = - 1 \times S\left( {Y - 1,X - 1} \right) + 0 \times S\left( {Y - 1,X} \right) + 1 \times S\left( {Y - 1,X + 1} \right) + \left( { - 2} \right) \\ & \quad \times S\left( {Y,X - 1} \right) + 0 \times S\left( {Y,X} \right) + 2 \times S\left( {Y,X + 1} \right) + \left( { - 1} \right) \times S\left( {Y + 1,X - 1} \right) + 0 \times S\left( {Y + 1,X} \right) + 1 \\ & \quad \times S(Y + 1,X + 1) \\ & = S\left( {Y - 1,X + 1} \right) + 2S\left( {Y,X + 1} \right) + S\left( {Y + 1,X + 1} \right) - S\left( {Y - 1,X - 1} \right) \\ & \quad - 2S\left( {Y,X - 1} \right) - S(Y + 1,X - 1) \\ \end{aligned} $$
(13)
$$ \begin{aligned} G^{\text{V}} & = - 1 \times S\left( {Y - 1,X - 1} \right) + \left( { - 2} \right) \times S\left( {Y - 1,X} \right) + \left( { - 1} \right) \times S\left( {Y - 1,X + 1} \right) + 0 \\ & \quad \times S\left( {Y,X - 1} \right) + 0 \times S\left( {Y,X} \right) + 0 \times S\left( {Y,X + 1} \right) + 1 \times S\left( {Y + 1,X - 1} \right) + 2 \\ & \quad \times S\left( {Y + 1,X} \right) + 1 \times S\left( {Y + 1,X + 1} \right) \\ & = S\left( {Y + 1,X - 1} \right) + 2S\left( {Y + 1,X} \right) + S\left( {Y + 1,X + 1} \right){-}S\left( {Y - 1,X - 1} \right) \\ & \quad - 2S(Y - 1,X) - S\left( {Y - 1,X + 1} \right) \\ \end{aligned} $$
(14)

The total gradient for each pixel is as follows

$$ G \cong |G^{\text{V}} | + |G^{\text{H}} | $$
(15)

The pixel will be the part of edge if G ≥ TH (Threshold).

Appendix 2: Quantum image cyclic shift transformations

The cyclic shift (X shift and Y shift) transformation is used to shift the position of whole image so that every pixel of the image will get the information of its neighborhood simultaneously [18, 19, 39]. As an example, if we shift one unit upward, the pixel of the image will be transformed S(x, y) into S(x, y+ 1). The cyclic shift transformation (CT) of quantum image \( |I\rangle \) can be expressed as

$$ {\text{CT}}(X \pm )|I\rangle = \frac{1}{{2^{n} }}\mathop \sum \limits_{Y = 0}^{{2^{n} - 1}} \mathop \sum \limits_{X = 0}^{{2^{n} - 1}} |CT_{{YX^{\prime}}} \rangle |Y\rangle |X \pm 1 mod2^{n} \rangle $$
(16)
$$ CT(Y \pm )|I\rangle = \frac{1}{{2^{n} }}\mathop \sum \limits_{Y = 0}^{{2^{n} - 1}} \mathop \sum \limits_{X = 0}^{{2^{n} - 1}} |CT_{{Y^{\prime}X}} \rangle |Y \pm 1 mod2^{n} \rangle |X\rangle $$
(17)

where X′ = (\( X \mp 1 \)) mod2n,, Y′ = \( \left( {Y \mp 1} \right) mod2^{n} \), CT(X+) & CT(Y+) = \( \left[ {\begin{array}{*{20}c} 0 & 1 \\ {I_{2}^{n} - 1} & 0 \\ \end{array} } \right] \) and CT(X−) & CT(Y−) = \( \left[ {\begin{array}{*{20}c} 0 & {I_{2}^{n} - 1} \\ 1 & 0 \\ \end{array} } \right] \)

See Fig. 13 and Table 2.

Fig. 13
figure 13

a An example of original image of size \( 4 \times 4 \), b the image transformed after CT(X+) operation, c the image transformed after CT (X −) operation. d Quantum circuit realization of CT(X+) and CT(Y−) for n-qubit sequence

Table 2 Computation prepared algorithm for shifting the image

Appendix 3: Quantum arithmetic operations

3.1 3.1 Quantum absolute value (QAV) module

Quantum absolute value module is used to estimate the absolute value of two integer number in quantum circuit. Basically, it consists of reversible parallel subtractor (RPS) module and complement operation (CO) module [32, 41, 42]. Quantum absolute value module for qubits |Y〉 = \( |Y_{n - 1} Y_{n - 2} \ldots Y_{1} Y_{0} \rangle \) and |X〉 = \( |X_{n - 1} X_{n - 2} \ldots X_{1} X_{0} \rangle \) is shown in Fig. 14. For more information referred to [4, 5].

Fig. 14
figure 14

Quantum circuit of QAV module

3.2 3.2 Parallel-controlled NOT (CNOT) operation

CNOT operations are used to copy a quantum states. Parallel CNOT can be used to copy n-qubit quantum states into \( |0\rangle \)n ancillary qubits. The quantum circuit for parallel q-CNOT is shown in Fig. 15.

Fig. 15
figure 15

Quantum circuit for parallel CNOT operations

3.3 3.3 Quantum operation for multiplied by 2n

Quantum operation for the qubit of an integer binary bits (i.e., |A〉 = |an−1 an−2… a1a0〉) multiplied by 2n can be realized as follows.

2n|A〉 = |an−1 an−2a1a0 \( \underbrace {0 \ldots 0\rangle }_{n} \), where \( |0\rangle \)n ancillary qubits are added after the lowest qubit.

3.4 3.4. Quantum ripple-carry adder (QRCA)

QRCA module [40] can be used to estimate the sum of two n-bit numbers A and B, where A = an−1an−2…a0, B = bn−1bn−2…b0. It consists of two basic modules of MAJ (Majority) gate and UMA (Un Majority and Add) gate [40], which start from low-order bits of the input added with carry to next order bits. In QRCA module, some ancillary and garbage qubits are omitted for simplification. The simplified QRCA module is shown in Fig. 16.

Fig. 16
figure 16

Quantum circuit realization for a n-bit simple ripple-carry adder, b MAJ module, c UMA module and d simplified QRCA module

3.5 3.5 Quantum comparator (QC)

Quantum comparator [43] is used to compare the relations between two numbers. The output of QC module for two qubit sequence \( |A\rangle = |a_{n - 1} a_{n - 2} \ldots a_{1} a_{0} \rangle \) and \( |B\rangle = |b_{n - 1} b_{n - 2} \ldots b_{1} b_{0} \rangle \) can be represented as follows

  • If C1C0 = 10, then |A〉 > |B

  • If C1C0 = 01, then |A〉 < |B

  • If C1C0 = 00, then |A〉 = |B

See Fig. 17.

Fig. 17
figure 17

a Quantum circuit for quantum comparator. b Quantum module for quantum comparator

Appendix 4: Peak-signal-to-noise ratio (PSNR) and mean square error (MSE)

To compare the fidelity of a retrieval image with its original version, the peak-signal-to-noise ratio (PSNR) [44,45,46,47,48] is often used. The PSNR representing an evaluation metric for estimating fidelity of quantum is written as

$$ {\text{PSNR}} = 20\log_{10} \left( {\frac{{Q{\text{MAX}}_{I} }}{{\sqrt {\text{MSE}} }}} \right) $$
(18)

where \( Q{\text{MAX}}_{I} \) the maximum pixel value of quantum is mechanically represented image and MSE [44,45,46,47,48] is the mean square error of quantum mechanically represented image. For two m \( \times \) n images, MSE can be defined as follows

$$ {\text{MSE}} = \frac{1}{mn}\mathop \sum \limits_{X = 0}^{m - 1} \mathop \sum \limits_{Y = 0}^{n - 1} \left[ {\left( {Q\left( {X,Y} \right) - QR\left( {X,Y} \right)^{2} } \right)} \right] $$
(19)

We have considered m = n for simulation. Where Q(X, Y) = Quantum mechanically represented original image with XY position coordinates.

Figure 18a shows more PSNR obtained from all four images by using our algorithm than that obtained by the other two existing techniques. More improvement of PSNR value is noticed in walk bridge images than that in other images by using our algorithm, due to having more edge boundary and local changes of intensity in walk bridge image. So our algorithm is comparatively more effective in edge extraction of an image having more boundary and local changes than the other two algorithms. Figure 18b compares the MSE of extracted images between our algorithm and existing algorithms. The MSE of all extracted images obtained from our algorithm is less than that obtained using existing techniques due to less false edge information (Table 3).

Fig. 18
figure 18

a PSNR graph for classical Sobel, quantum Sobel and our edge detection algorithm. b MSE graph for classical Sobel, quantum Sobel and our edge detection algorithm

Table 3 PSNR and MSE values for Sobel-based edge extraction algorithms

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chetia, R., Boruah, S.M.B. & Sahu, P.P. Quantum image edge detection using improved Sobel mask based on NEQR. Quantum Inf Process 20, 21 (2021). https://doi.org/10.1007/s11128-020-02944-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-020-02944-7

Keywords

Navigation