Color quantum image edge extraction method based on morphology
By employing a morphology-based color quantum image edge extraction method that combines the parallelism and superposition properties of quantum computing, the problems of high resource consumption and insufficient accuracy in existing technologies are solved. This method achieves efficient and accurate color image edge extraction, which is suitable for tasks such as object recognition, scene reconstruction, and image compression in computer vision systems.
Patent Information
- Application Number
- CN202510932043.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-11-18
AI Technical Summary
Existing quantum image edge extraction algorithms are mainly designed for grayscale or binary images, and are difficult to process color images effectively. They consume a lot of resources and have insufficient information extraction accuracy, which limits their promotion in practical applications.
A morphology-based edge extraction method for color quantum images is adopted, which combines the parallelism and superposition of quantum computing. Through cyclic shifting, comparison modules and maximum and minimum value modules, the color digital image is transformed into a quantum image using the NCQI model. Weighted distance calculation of color vectors and morphological operations are performed to extract the edge information of the color quantum image.
It completes large-scale color image edge extraction in polynomial time, improves the accuracy of edge extraction, reduces the consumption of qubit resources, and is suitable for tasks such as object recognition, scene reconstruction and image compression in computer vision systems.
Smart Images

Figure CN120976247A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum image processing technology, and in particular to a morphology-based method for edge extraction of color quantum images. Background Technology
[0002] Color image edge extraction, as one of the core tasks in image processing, plays a crucial role in applications such as object recognition, scene reconstruction, image segmentation, and image compression in computer vision systems. Traditional edge extraction algorithms, such as the Sobel operator and the Canny algorithm, are mainly designed for grayscale images and struggle to fully handle the rich edge information in color images. These methods typically achieve edge extraction by simply processing single or multi-channel color images, but this approach often ignores the complexity and multidimensionality of color vectors in color images, leading to inaccurate extraction results or loss of important information. With the development of quantum computing technology, quantum image processing has gradually become a research hotspot. Theoretically, it can significantly improve image processing efficiency by utilizing the parallelism and superposition properties of quantum computing. However, most existing quantum image edge extraction algorithms are limited to grayscale or binary images, and edge extraction methods for color images have not been fully studied. Furthermore, existing quantum image processing models generally face problems such as excessive qubit resource consumption and low image information extraction accuracy, which limit their widespread application in practice. Therefore, how to effectively extract edge information from color images on a quantum computing platform and overcome the problems of high resource consumption and insufficient accuracy in existing technologies has become an urgent technical challenge. This invention aims to solve the above problems by introducing a morphology-based edge extraction algorithm for color quantum images, combined with cyclic shift, comparison, and maximum / minimum value modules in quantum computing, thereby achieving efficient and accurate edge extraction for color quantum images. Summary of the Invention
[0003] This invention addresses the problems of high resource consumption and insufficient information extraction accuracy in existing color quantum image edge extraction technologies by proposing a morphology-based color quantum image edge extraction method and its quantum circuit design. The method significantly improves the efficiency and accuracy of color image edge extraction by combining the parallelism and superposition properties of quantum computing.
[0004] To achieve the above objectives, the present invention is implemented according to the following technical solution:
[0005] This invention includes the following steps:
[0006] S1: Convert color digital images into color quantum images, and use the NCQI model to quantize the color information and position of the image;
[0007] S2: Calculate the distance between each pixel and the white point, and use quantum circuits to compare the color vectors;
[0008] S3: Prepare a quantum image set of images through cyclic shift operations, and process the images using morphological operations;
[0009] S4: Based on the results of dilation and erosion operations, extract the edge information of the image and output a color quantum edge image.
[0010] The NCQI model used in step 1 is based on RGB color channels and uses 2n+3q qubits to store a 2D image. n ×2 n A digital image of size [0, 2], where each channel takes values in the range [0, 2]. q-1 It requires 2n qubits to store position information, 3q qubits to store color information, and an additional 10 qubits to store the distance information between each pixel in the image and the white point.
[0011] In step 2, the weighted color distance formula for calculating the distance between each pixel and the white point is defined as follows:
[0012] d(f,f 0 ) = round((w R ×f R -255) 2 +(w G ×f G -255) 2 +(w B ×f B -255) 2 )
[0013] And an approximate substitution formula d(f,f) is adopted. 0 ) = round(|w R ×f R -255|+|w G ×f G -255|+|w B ×f B The calculation is performed using -255|), where round() represents rounding to the nearest integer, and the weighting coefficient w R w G w B Each number is represented using a fixed-length binary number. Multiplication is implemented using a quantum multiplication module, and the result is right-shifted to retain the number of significant bits.
[0014] Step 3, which prepares the quantum image set of the image through cyclic shifting operation, specifically involves generating four quantum images identical to the original image through a cyclic shifting module, and then performing a cyclic left or right shifting operation on them to obtain the quantum image set |I〉, |I〉1, |I〉2, |I〉3, |I〉4. The cyclic shifting module is designed by controlling NOT gates and swapping gates.
[0015] Furthermore, the position qubits in the four quantum images are initialized to a balanced superposition state using a Hadamard gate, and pixel values are assigned using a copy module to ensure positional consistency across all image sets. A cyclic shift operation ensures that neighboring pixel information is available for subsequent morphological processing.
[0016] The morphological operations are dilation and erosion operations;
[0017] Dilation operation: Outputs the pixel corresponding to the maximum value of the color vector in the neighborhood;
[0018] Erosion operation: Outputs the pixel corresponding to the minimum color vector in the neighborhood;
[0019] The size of the color vector is determined by comparing the comparison module and the maximum / minimum value module.
[0020] The magnitude of the color vector is determined by combining the characteristics of binary strings. As the high-order bit of the binary string, followed by the R, G, and B values, these form a binary string used for direct comparison. In actual calculations, 2^3... 10 -1-d(f YX ,f 0 ) replace d(f YX ,f 0 This visually reflects the magnitude of the color vector.
[0021] When extracting edge information from an image, the R, G, and B values of the eroded image |E> are subtracted from the R, G, and B values of the dilated image |D> to obtain the final color edge image. The subtraction operation is implemented through a parallel subtraction module, and the result is processed through an absolute value module to ensure that the output is positive.
[0022] The complete quantum circuit of this invention consists of five stages: The first stage is NCQI quantum image preparation, including the quantization of position and color information, using a replication module and a parallel addition module to construct the initial state; the second stage calculates the distance between pixels and white points, realizing the quantization calculation of weighted color distances, and storing the output result in binary string form; the third stage obtains a quantum image set through cyclic shifting, using a cyclic shifting module to generate neighboring pixel information, ensuring that the positions of all image sets are consistent for subsequent operations; the fourth stage performs dilation and erosion operations, using a comparison module and a maximum / minimum value module to implement morphological operations, while simultaneously performing dilation and erosion operations to reduce computational complexity; the fifth stage calculates the edge image, using a parallel subtraction module and an absolute value module to calculate the difference between the dilated and eroded images, outputting a color quantum edge image conforming to the NCQI model. Furthermore, the technical solution of this invention achieves independent development and integration of each functional module through modular design, including a replication module, a parallel addition module, a cyclic shifting module, a comparison module, and a maximum / minimum value module. These modules are cascaded through quantum gates to ensure efficient data flow transmission and processing.
[0023] The beneficial effects of this invention are:
[0024] By leveraging the parallelism and superposition properties of quantum computing, edge extraction of large-scale color images can be completed in polynomial time, solving the computational complexity problem that traditional classical algorithms struggle with. The introduction of a weighted color distance formula and color vector ordering rules effectively improves the accuracy of edge extraction. Modular design facilitates integration and expansion, while approximate calculations and binary string optimization reduce the consumption of qubit resources. This invention can be widely applied to tasks such as object recognition, scene reconstruction, image segmentation, and image compression in computer vision systems, and is particularly suitable for scenarios requiring rapid processing of large-scale color images. Through the above technical solutions, this invention provides important technical support for the field of quantum image processing. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating the workflow of the color quantum image edge extraction algorithm proposed in this invention.
[0026] Figure 2 This is a schematic diagram of a quantum circuit for calculating morphological gradient edges in the quantum circuit of the present invention;
[0027] Figure 3 A quantum circuit diagram for a replication module used to replicate a known n-bit quantum state;
[0028] Figure 4 Quantum circuit diagram for a parallel addition module to achieve addition of two n qubits;
[0029] Figure 5 Quantum circuit diagram for a parallel subtraction module to realize subtraction of two n qubits;
[0030] Figure 6 Quantum circuit diagram for calculating the absolute value of the result of parallel subtraction;
[0031] Figure 7 A quantum circuit diagram for a multiplier module that realizes the product of two n-bit qubits;
[0032] Figure 8 A simplified diagram of a cyclic shift module quantum circuit for realizing cyclic left and right shift operations of n qubits;
[0033] Figure 9 A quantum circuit diagram for a comparison module to implement a comparison operation between two n-bit qubits;
[0034] Figure 10 A quantum circuit diagram for a swapping module to exchange the contents of two quantum registers;
[0035] Figure 11 This is a quantum circuit diagram based on the maximum and minimum value modules of the comparison and exchange modules;
[0036] Figure 12 A quantum circuit diagram for calculating the distance between each pixel and a white point in an image;
[0037] Figure 13 This is a schematic diagram of the structure element window used in this algorithm;
[0038] Figure 14 A quantum circuit diagram for preparing four quantum images identical to the original image and performing cyclic shifting;
[0039] Figure 15 for Figure 14 Simplified circuit diagram for preparing quantum image set;
[0040] Figure 16 A quantum circuit diagram to realize expansion and corrosion operations;
[0041] Figure 17 A combined quantum circuit diagram for simultaneous expansion and corrosion operations;
[0042] Figure 18 A quantum circuit diagram for calculating edge images;
[0043] Figure 19 Extract the complete quantum circuit diagram from the edges of a color quantum image, which includes five stages of operation. Detailed Implementation
[0044] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The illustrative embodiments and descriptions herein are used to explain the present invention, but are not intended to limit the present invention.
[0045] like Figure 1-3 As shown, the technical solution of the present invention realizes the conversion from color digital image to quantum image, the calculation of the distance between pixel and white point, the generation of quantum image set by cyclic shifting, morphological operation and the final edge information extraction through modular design. All steps are completed on the quantum computing platform.
[0046] The quantum circuit used in this embodiment consists of multiple functional modules, including a replication module, a parallel addition module, a cyclic shift module, a comparison module, and a maximum / minimum value module. These modules are cascaded through quantum gates to ensure efficient data transmission and processing. The specific implementation process of each stage is described in detail below with reference to the accompanying drawings.
[0047] Design a quantum circuit module:
[0048] Copy module: For a known n-bit quantum state, it can be stored in another initial state by using n controlled-NOT (CNOT) gates. In an n-bit quantum register. Quantum circuits such as Figure 3 As shown. It is worth noting that this operation does not violate the no-cloning theorem for quantum states, because the quantum state being copied here is completely known.
[0049] The parallel addition module can calculate the sum of two n-qubits A+B. The quantum module and quantum circuit are as follows: Figure 4 As shown in the diagram. RHA is a reversible half-adder; its outputs Q and R represent the sum and carry of A+B, respectively. RFA is a reversible full adder; its outputs R and S represent the sum and carry of A+B+C, respectively.
[0050] Parallel subtraction module: Similar to the parallel addition module, for two n-qubit qubits A and B, the parallel subtraction module can calculate the difference between A and B. The quantum module and quantum circuit are as follows: Figure 5 As shown in the diagram. RHS is a reversible half-subtractor, whose outputs Q and R represent the difference and borrow of A and B, respectively. RFS is a reversible full subtractor, whose outputs Q and S represent the difference and borrow of A, B, and C, respectively.
[0051] Absolute Value Module: The parallel subtraction module calculates a signed number in two's complement form. The absolute value module calculates the absolute value of this subtraction result and outputs the pure numerical part. Quantum circuits and quantum modules are as follows. Figure 6 As shown.
[0052] The multiplier module can implement the product of two n-bit qubits, which requires 2n auxiliary qubits to store the calculation result. The simplified quantum circuit diagram is as Figure 7 shown.
[0053] Circular shift module. For the n-qubit |Y> = |y n-1 y n-2 ...y1y0>, the circular shift module can implement the circular shift transformation. Figure 8 The quantum circuits for the circular left shift and circular right shift of |Y> are given, as well as their simplified diagrams.
[0054] Maximum and minimum value module. The quantum comparator can implement the comparison operation of two n-bit qubits. Its quantum circuit diagram and quantum module are as Figure 9 shown. Where x and y are the contents to be compared, and e1 and e0 are the outputs. When e1e0 = 10, then x > y; when e1e0 = 01, then x < y; when e1e0 = 00, then x = y.
[0055] For two quantum registers storing n-bit qubits, the swap module can be used to swap the contents of these two quantum registers. Its quantum circuit and quantum module are as Figure 10 .
[0056] Using the comparison module and swap module mentioned above, we can obtain the sorting module as shown in Figure 11 . The maximum value module outputs x and y, and x < y; the minimum value module outputs x and y, and x > y.
[0057] Convert a digital image into a NCQI quantum image.
[0058] The NCQI model is based on the RGB color channels and uses 2n + 3q qubits to store a digital image of size 2 n ×2 n , where the value range of each channel (R, G, B) is [0, 2 q-1 . The normalized quantum superposition state is described as:
[0059]
[0060] According to the NCQI model, 2n qubits are required to store the position information, and 3q qubits are required to store the color information. According to the color vector order, an additional 10 qubits are also required to store the d(f YX , f 0 ) information of each pixel in the image. The quantum state expression of the image is:
[0061]
[0062] Calculate the distance between each pixel in the image and the white point.
[0063] The core process in dilation / erosion operations on grayscale images is the comparison of grayscale values. However, color images are vector-valued functions, and vectors cannot be directly compared numerically. Therefore, grayscale image comparison methods cannot be directly applied to color images. (Reference) [i] A method for comparing color vectors is proposed, f = (f R ,f G ,f B () is a color image in the RGB color space, where the norm of any pixel f is denoted as ||f||, and the white point in the RGB color space is f. 0 = (255, 255, 255), the weighted color distance from any pixel x to the white pixel is defined as:
[0064] d(f,f 0 ) = round((w R ×f R -255) 2 +(w G ×f G -255) 2 +(w B ×f B -255) 2 )
[0065] Where `round()` represents rounding to the nearest integer, w R =0.299, w G =0.587, w B = 0.114. Generally, to improve efficiency, we use the following calculation method to approximate d(f). YX ,f 0 ).
[0066] d(f,f 0 ) = round(|w R ×f R -255|+|w G ×f G -255|+|w B ×f B -255|)
[0067] For pixels x1 and x2, if d(f 1 ,f 0 )>d(f 2 ,f 0 This indicates that x1 is farther from the white point than x2, and its corresponding color is darker. Therefore, the color vector f is defined. 1 <f 2 Conversely, if d(f)1 ,f 0 )<d(f 2 ,f 0 ), then f 1 >f 2 For d(f) 1 ,f 0 )=d(f 2 ,f 0 In this case, using lexicographical comparison, the color vector order is defined as follows: when the condition...
[0068] (1)d(f 1 ,f 0 )>d(f 2 ,f 0 );
[0069] (2)d(f 1 ,f 0 )=d(f 2 ,f 0 ),and
[0070] (3)d(f 1 ,f 0 )=d(f 2 ,f 0 ), and
[0071] There is a time when f is established 1 <f 2 Otherwise f 1 ≥f 2 Specifically, when d(f) 1 ,f 0 )=d(f 2 ,f 0 ), At that time, according to the above formula, we know Then f 1 =f 2 Classified as f 1 <f 2 Or f 1 >f 2 Either is fine.
[0072] To compare color vectors, we first need to calculate d(f) YX ,f 0 Since R≤255, G≤255, B≤255, w R <1, w G <1, w B Since <1, we can obtain:
[0073] |d(fYX ,f 0 )>=(255-0.299×|R YX >)+(255-0.587×|G YX >)+(255-0.114×|B YX >)
[0074] The operations involved are all based on binary. For multiplying an integer by a decimal, you can treat the last n digits of the decimal point as the integer part of the multiplication, then right-shift the result by n bits or directly take the highest-order bits to get the correct result. For example, to calculate 20 × 0.75, 20 in binary is 10100, and 0.75 in binary is 0.11. You can take the last two digits of the decimal point as the multiplier, i.e., 11. Performing binary multiplication 10100 × 11 results in 111100. Right-shifting the result by 2 bits or taking the highest four bits gives 1111, which is 15 in decimal, and the result is correct. Therefore, w R w G w B When used as a multiplier, it can be represented by 01001100, 10010110, and 00011101 respectively (taking eight decimal places).
[0075] d(f YX ,f 0 A maximum of 10 qubits are used for storage. Additionally, to facilitate subsequent comparison of color vectors, 2... 10 -1-d(f YX ,f 0 ) replace d(f YX ,f 0 (The reason will be explained later), denoted as Therefore, it is possible to design Figure 12 Calculation The quantum circuit diagram and simplified diagram are shown below. For simplicity, auxiliary inputs and garbage outputs have been omitted. At this point, the quantum state expression of the image is:
[0076]
[0077] Image set obtained by cyclic shifting
[0078] The algorithm in this embodiment uses a structure element window as follows: Figure 13 As shown. To obtain the pixel information of the neighborhood, four quantum images identical to the image |I〉 are first prepared, and these four quantum images are cyclically shifted to obtain the quantum image set |I〉, |I〉1, |I〉2, |I〉3, |I〉4, specifically described as follows:
[0079]
[0080] In subsequent operations, all pixels at the same location in the quantum image set can be processed simultaneously. Figure 14 The quantum circuit implementing this step is shown. To the left of the dashed line is the operation for creating identical images: the position qubits and pixel value qubits of the four images are initialized to "0," and then a Hadamard gate is used to convert the position qubits into a balanced superposition state, resulting in four empty images. A comparator and a copying module are used to assign the pixel values of the binary image |I〉 to the four empty images, making them identical to |I〉. To the right of the dashed line is the operation for cyclically shifting the images. Figure 15 for Figure 14 A simplified diagram.
[0081] The dilation and erosion images are obtained using the maximum and minimum value module.
[0082] The dilation operation selects the maximum value within the pixel neighborhood, while the erosion operation selects the minimum value within the pixel neighborhood. For a quantum image set, this means finding F. XY+1 F XY-1 F X+1Y F X-1Y F XY The maximum and minimum values in the range. For comparing color vectors, the characteristics of binary strings can be considered. As the high-order bit of the binary string, followed by the R, G, and B values, d(f YX ,f 0 C YX The binary strings formed can be directly compared to determine the size of the color vector. It should be noted that, according to the rules for comparing color vectors, d(f) YX ,f 0 The larger the value, the smaller the color vector becomes, so we used 2 previously. 10 -1-d(f YX ,f 0 ) replaced d(f YX ,f 0 ),then The size of the value directly reflects the size of the color vector.
[0083] Here's an example of determining the size of a color vector. We have two pixels, x1 and x2, and their RGB values, d(f...). YX ,f 0 ), The values are shown in the table below. Where, d(f YX ,f 0 )according to Figure 12 The process was calculated to obtain, First, let's compare We first compare the values of x1 and x2, finding them to be equal. Then, comparing the values of R, we see that the R value of x1 is larger than the R value of x2, therefore the color vector of x1 is greater than that of x2. This process involves conditional judgment, which we can simplify using mathematical properties: place the first value compared in the higher-order bits, and then place the remaining values in the lower-order bits according to the comparison order. In this example, the F of x1... YX The first ten digits are 011000011000111101100110111101010101. Then R, G, B in that order. Similarly, we can derive F for x². YX If the value is 0110000110100001111001001000111110, then we can compare the F values of these two pixels. YX The magnitude of the color vector is then used to determine its magnitude; this operation can be implemented using a quantum comparison module. Based on this, Figure 16 A quantum circuit for expansion / corrosion operation is presented.
[0084]
[0085] The expansion and erosion operations are performed simultaneously. First, the expansion operation is performed to obtain |D〉, and then the minimum value of the remaining four outputs is selected to obtain |E〉. The merged quantum circuit and quantum module are as follows: Figure 17 As shown.
[0086] Calculate the edge image:
[0087] After obtaining the dilated image |D〉 and the eroded image |E〉, the color edge image can be obtained by subtracting the R, G, and B values of the eroded image from the R, G, and B values of the dilated image. Figure 18 The quantum circuit implementation and corresponding quantum module for subtracting image |E> from image |D> are given. During the subtraction operation, d(f) YX ,f 0 Since this information is not needed, the input and output of the quantum circuit do not contain this information, and the final output is a color quantum image of the standard NCQI model.
[0088] Edge extraction algorithm complete quantum circuit
[0089] Combining the previously summarized concepts of quantum circuits and quantum modules, Figure 19A complete quantum circuit for edge extraction of color quantum images is demonstrated. The circuit consists of five stages: Stage 1 is NCQI quantum image preparation; Stage 2 is calculating the distance between each pixel in the NCQI quantum image and the white point; Stage 3 is cyclic shifting to obtain a quantum image set; Stage 4 is obtaining an dilation-erosion image, first using eight comparison modules to identify pixels at the same position in the five images, then performing dilation-erosion operation; Stage 5 is subtracting the eroded image from the dilated image to obtain the color edge image, where the Swap module is used to swap the pixel values of |I〉 and |I〉4, and these two operations also use comparison modules to determine pixels at the same position.
[0090] Through the above design, the morphology-based edge extraction method for color quantum images of the present invention achieves edge extraction of color quantum images. Compared with other algorithms, it can achieve edge extraction of color quantum images and extract more edge information.
[0091] The technical solutions of the present invention are not limited to the specific embodiments described above. Any technical modifications made in accordance with the technical solutions of the present invention fall within the protection scope of the present invention.
Claims
1. A morphology-based method for edge extraction in color quantum images, characterized in that, Includes the following steps: S1: Convert color digital images into color quantum images, and use the NCQI model to quantize the color information and position of the image; S2: Calculate the distance between each pixel and the white point, and use quantum circuits to compare the color vectors; S3: Prepare a quantum image set of images through cyclic shift operations, and process the images using morphological operations; S4: Based on the results of dilation and erosion operations, extract the edge information of the image and output a color quantum edge image.
2. The morphology-based color quantum image edge extraction method according to claim 1, characterized in that: The NCQI model used in step 1 is based on RGB color channels and uses 2n+3q qubits to store a 2D image. n ×2 n A digital image of size [0, 2], where each channel takes values in the range [0, 2]. q-1 It requires 2n qubits to store position information, 3q qubits to store color information, and an additional 10 qubits to store the distance information between each pixel in the image and the white point.
3. The morphology-based color quantum image edge extraction method according to claim 2, characterized in that: In step 2, the weighted color distance formula for calculating the distance between each pixel and the white point is defined as follows: d(f,f 0 )=round((w R ×f R -255) 2 +(w G ×f G -255) 2 +(w B ×f B -255) 2 ) And an approximate substitution formula d(f,f) is adopted. 0 ) = round(|w R ×f R -255|+|w G ×f G -255|+|w B ×f B The calculation is performed using -255|), where round() represents rounding to the nearest integer, and the weighting coefficient w R w G w B They are represented by binary numbers of fixed length.
4. The morphology-based color quantum image edge extraction method according to claim 1, characterized in that: Step 3, which prepares the quantum image set of the image through cyclic shifting operation, specifically involves generating four quantum images identical to the original image through a cyclic shifting module, and then performing a cyclic left or right shifting operation on them to obtain the quantum image set |I〉, |I〉1, |I〉2, |I〉3, |I〉4. The cyclic shifting module is designed by controlling NOT gates and swapping gates.
5. The morphology-based color quantum image edge extraction method according to claim 4, characterized in that: Furthermore, the position qubits in the four quantum images are initialized to a balanced superposition state through the Hadamard gate, and the pixel values are assigned using the replication module to ensure that the positions of all image sets are consistent.
6. The morphology-based color quantum image edge extraction method according to claim 1, characterized in that: The morphological operations are dilation and erosion operations; Dilation operation: Outputs the pixel corresponding to the maximum value of the color vector in the neighborhood; Erosion operation: Outputs the pixel corresponding to the minimum color vector in the neighborhood; The size of the color vector is determined by comparing the comparison module and the maximum / minimum value module.
7. The morphology-based color quantum image edge extraction method according to claim 6, characterized in that: The magnitude determination of the color vector is combined with the characteristics of binary strings. As the high-order bit of the binary string, followed by the R, G, and B values, these form a binary string used for direct comparison. In actual calculations, 2^3... 10 -1-d(f YX ,f 0 ) replace d(f YX ,f 0 This visually reflects the magnitude of the color vector.
8. The morphology-based color quantum image edge extraction method according to claim 1, characterized in that: When extracting edge information from an image, the R, G, and B values of the eroded image |E> are subtracted from the R, G, and B values of the dilated image |D> to obtain the final color edge image. The subtraction operation is implemented through a parallel subtraction module, and the result is processed through an absolute value module to ensure that the output is positive.