CN115578357B - Medical image edge detection method and system based on quantum algorithm - Google Patents
Medical image edge detection method and system based on quantum algorithm Download PDFInfo
- Publication number
- CN115578357B CN115578357B CN202211293335.8A CN202211293335A CN115578357B CN 115578357 B CN115578357 B CN 115578357B CN 202211293335 A CN202211293335 A CN 202211293335A CN 115578357 B CN115578357 B CN 115578357B
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- quantum
- gradient
- boundary
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000003708 edge detection Methods 0.000 title claims abstract description 41
- 238000013528 artificial neural network Methods 0.000 claims abstract description 21
- 230000005283 ground state Effects 0.000 claims abstract description 8
- 238000000605 extraction Methods 0.000 claims description 20
- 238000013527 convolutional neural network Methods 0.000 claims description 11
- 230000002401 inhibitory effect Effects 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000003709 image segmentation Methods 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 2
- 230000000452 restraining effect Effects 0.000 claims 2
- 238000001514 detection method Methods 0.000 abstract description 6
- 230000006835 compression Effects 0.000 abstract description 5
- 238000007906 compression Methods 0.000 abstract description 5
- 238000012545 processing Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 5
- 230000011218 segmentation Effects 0.000 description 5
- 230000001629 suppression Effects 0.000 description 5
- 238000013135 deep learning Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 239000003814 drug Substances 0.000 description 2
- 230000005764 inhibitory process Effects 0.000 description 2
- 210000002569 neuron Anatomy 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 230000005610 quantum mechanics Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000005477 standard model Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N10/60—Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10072—Tomographic images
- G06T2207/10081—Computed x-ray tomography [CT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Abstract
The invention belongs to the technical field of medical image detection, and particularly relates to a medical image edge detection method and system based on a quantum algorithm, wherein a medical image is firstly divided into a plurality of image blocks with the size of N x N; then, traversing the image blocks in sequence, coding pixel values of each image block onto a quantum line by utilizing a quantum convolution neural network, and extracting regional medical image features through initialized quantum bits in a ground state; then, the extracted medical image features are combined to form a new similar image, the new similar image is segmented and pixel value coded again, the pixel point gradient of the image is obtained by utilizing a quantum circuit, and the image edge is detected through the pixel point gradient. The invention utilizes the quantum convolution neural network to extract the image characteristics, can fully play the quantum characteristics, achieves the purpose of image compression on the premise of keeping the medical image characteristics, can shorten the line depth of the whole quantum circuit, and is convenient for application in large-scale medical image detection.
Description
Technical Field
The invention belongs to the technical field of medical image detection, and particularly relates to a medical image edge detection method and system based on a quantum algorithm.
Background
In recent years, medical image analysis techniques based on deep learning methods have become a hotspot in the field of intelligent medical research. Classical convolutional neural networks are widely used to extract medical image features, but the algorithm has a set of neurons focusing on a feature, not every neuron focusing on a feature; and the fully connected mode is too redundant to be efficient; and meanwhile, the algorithm has no practical problem for understanding the extracted medical features. The mixed quantum classical medical image edge detection technology mainly adopts amplitude coding in the medical image information coding process, so that the depth of the whole quantum circuit is too deep, most quantum algorithms available at present are limited by quantum characteristics that quantum systems and external environments are subjected to quantum entanglement and gradually lose with time, the line depth of the quantum systems directly influences the realization of the quantum algorithms, and the edge detection of large-scale medical images takes longer time.
Disclosure of Invention
Therefore, the invention provides a medical image edge detection method and a medical image edge detection system based on a quantum algorithm, which fully exert quantum characteristics, utilize a quantum convolution neural network to extract image characteristics, achieve the aim of image compression on the premise of keeping medical image characteristics, can shorten the line depth of the whole quantum circuit, and are convenient for application in large-scale medical image detection.
According to the design scheme provided by the invention, the medical image edge detection method based on the quantum algorithm comprises the following steps:
dividing a medical image into a plurality of image blocks with the size of N x N;
sequentially traversing the image blocks, coding pixel values of each image block onto a quantum line by utilizing a quantum convolution neural network, and extracting regional medical image features through initialized quantum bits in a ground state;
and combining the extracted medical image features to form a new similar image, dividing and coding pixel values of the new similar image again, acquiring image pixel point gradients by utilizing a quantum circuit, and detecting image edges by the pixel point gradients.
As the medical image edge detection method based on the quantum algorithm, in the quantum convolution neural network, firstly, an image block is encoded into a Hilbert space through parameter rotation; then in the Hilbert space of the quantum state, unitary operation is performed on the quantum circuit, expected values are obtained by measuring the quantum circuit, and image features of corresponding extraction areas are obtained by mapping the expected values into pixel channels.
As the medical image edge detection method based on the quantum algorithm in the invention, further, the process of extracting the image features by using the quantum convolution neural network is expressed as follows:wherein (1)>Representing image data, U representing unitary operation of the quantum system, 0 n Indicating that n bits are initialized to zero, +.>Representing a unitary transformation, n representing the feature extraction of the image completed with n bits.
As the medical image edge detection method based on the quantum algorithm in the invention, further, the unitary operation of the quantum system in the image feature extraction includes but is not limited to: CNOT controllable NOT gate.
As the medical image edge detection method based on the quantum algorithm, the gradient of the Robert operator on the image is further obtained by moving the position of the quantum register in the process of obtaining the image pixel point gradient by utilizing the quantum circuit.
As the medical image edge detection method based on the quantum algorithm, the pixel point gradient is used for detecting the image edge, the gradient size is used for representing the edge strength, the gradient direction is used for representing the edge trend, the calculation of the gradient direction is consistent with the selection of the gradient operator, and the gradient amplitude of the difference between two adjacent pixels in the diagonal direction is used for detecting the image edge.
As the medical image edge detection method based on the quantum algorithm, the invention further comprises the steps of extracting the image edge through pixel point gradient, and utilizing non-maximum value to inhibit edge thinning of each pixel in the image, wherein the edge thinning inhibiting process comprises the following steps: and comparing the gradient value of the image pixel at the current position with the gradient values of the pixels at two positions along the positive and negative gradient directions, if the gradient value of the image pixel at the current position is larger, marking the current position as a boundary point, otherwise, inhibiting the value of the pixel point of the image at the current position as 0.
As the medical image edge detection method based on the quantum algorithm, the invention further sets a high threshold and a low threshold for inhibiting the image boundary after edge thinning, marks the image boundary pixels with the pixel gradient value higher than the high threshold as strong boundary pixels, marks the image boundary pixels with the pixel gradient value smaller than the high threshold and larger than the low threshold as weak boundary pixels, inhibits the image boundary pixels with the pixel gradient value smaller than the low threshold as 0, filters weak boundary pixel points, and keeps the points of the strong boundary pixels as image boundaries.
As the medical image edge detection method based on the quantum algorithm, further, aiming at the point marked as the weak boundary pixel, checking whether 8 neighborhood pixel points are marked as strong boundary pixels or not, if one neighborhood pixel point is marked as the strong boundary pixel, reserving the point marked as the weak boundary pixel currently, and taking the point as an image boundary.
Further, the invention also provides a medical image edge detection system based on the quantum algorithm, which comprises: an image segmentation module, a feature extraction module and an edge detection module, wherein,
the image segmentation module is used for segmenting the medical image into a plurality of image blocks with the size of N x N;
the characteristic extraction module is used for traversing the image blocks in sequence, coding the pixel value of each image block onto a quantum circuit by utilizing a quantum convolution neural network, and extracting the regional medical image characteristics through initialized quantum bits in a ground state;
and the edge detection module is used for combining the extracted medical image features to form a new similar image, carrying out segmentation and pixel value coding on the new similar image again, acquiring image pixel point gradients by utilizing a quantum circuit, and detecting the image edge through the pixel point gradients.
The invention has the beneficial effects that:
according to the invention, the characteristic extraction is carried out on the medical image by using the quantum convolution neural network, the purpose of image compression can be achieved at the same time, the advantage of quantum characteristic enhancement is fully utilized, the best solution of the parameters is sought in the Hilbert space, and the extracted characteristic meets the actual requirement; the image boundary detection is realized by utilizing the quantum circuit, the gradient is calculated by the Roberts operator, the calculation speed is faster, and the efficiency is higher. The edge detection is realized based on the quantum convolution neural network and the quantum circuit, the problems that the classical convolution neural network extracts the medical image characteristics to be redundant and low-efficiency in the full-connection mode are solved, meanwhile, the efficiency of the edge detection of the large-scale medical image is obviously improved through image compression, meanwhile, the depth of the quantum circuit is controlled, and the method has a good application prospect.
Description of the drawings:
FIG. 1 is a schematic diagram of a traditional Chinese medicine image edge detection flow in an embodiment;
FIG. 2 is a schematic diagram of the principle of the edge detection algorithm of the traditional Chinese medicine image in the embodiment;
FIG. 3 is a schematic diagram of the image feature extraction principle in the embodiment;
FIG. 4 is a schematic representation of the Roberts operator in an embodiment;
fig. 5 is a schematic circuit diagram of 16 pixels in the embodiment;
FIG. 6 is a schematic of a Roberts operator quantum circuit in an embodiment;
FIG. 7 is a schematic diagram showing the comparison of the edge detection effect of CT medical images before and after the detection effect of CT medical images in the embodiment;
fig. 8 is a schematic diagram of the comparison of the edge detection effect of the B-mode ultrasonic medical image in the embodiment.
The specific embodiment is as follows:
the present invention will be described in further detail with reference to the drawings and the technical scheme, in order to make the objects, technical schemes and advantages of the present invention more apparent.
Aiming at the situations that the characteristic of a classical convolutional neural network extracted medical image is too redundant and low-efficiency in a full-connection mode, the extracted medical characteristic is not understood, the edge detection process of a large-scale medical image takes longer time, the depth of the whole quantum circuit is too deep after the whole medical image information is encoded, and the like, the embodiment of the invention, as shown in fig. 1, provides a medical image edge detection method based on a quantum algorithm, which comprises the following steps:
s101, dividing a medical image into a plurality of image blocks with the size of N x N;
s102, traversing the image blocks in sequence, coding pixel values of each image block onto a quantum line by utilizing a quantum convolution neural network, and extracting regional medical image features through initialized quantum bits in a ground state;
s103, combining the extracted medical image features to form a new similar image, segmenting and coding pixel values of the new similar image again, acquiring image pixel point gradients by utilizing a quantum circuit, and detecting image edges by the pixel point gradients.
Referring to fig. 2, the whole medical image may be sequentially segmented into modules of 2 x 2 size; sequentially adopting rotary encoding to pixel values in a module with the size of 2 x 2 to a quantum circuit; the characteristics of the 2 x 2 module are obtained after the quantum roll neural network processing, so that the purposes of characteristic extraction and image compression are realized; composing a new image containing medical image features based on the generated features; and continuously dividing the new image containing the medical image characteristics into 2 x 2 modules, calculating the gradient of the image through a quantum circuit, and realizing the edge detection of the medical image by using the pixel point gradient.
The convolutional neural network (Convolutional Neural Networks, CNN) is one of representative algorithms of deep learning (deep learning), comprises a feedforward neural network (Feedforward Neural Networks) of convolutional calculation and has a deep structure, the quantum convolutional neural network (qnn) is a convolutional neural network model based on a quantum mechanics principle, and a classical convolutional neural network model is combined with quantum information, so as to fully play advantages of the quantum information and parallel computing performance, and particularly in feature extraction of large-scale medical images, quantum computing advantages such as quantum parallelism or interference and entanglement effect are used as resources to improve model processing efficiency. Convolutional Neural Networks (CNNs) are well known as standard models in classical machine learning, and are particularly well suited for processing images. In the embodiment, based on the idea of a convolution layer in a convolution neural network, in the convolution layer, in order to overcome the problem that the circuit depth is too deep after image amplitude encoding, a global function is not used for processing complete input image data, but local convolution is applied, and the image data is subjected to segmentation processing; for an input medical image, small local areas are sequentially processed by using the same method, the purpose of overall image feature extraction is achieved, the result obtained by each area is usually associated with different channels of a single output pixel, the combination of all output pixels generates a new image-like object, and the boundary of the medical image can be obtained through further boundary monitoring processing. In the quantum convolution neural network in the embodiment of the present application, firstly, an image block is encoded into a hilbert space through parameter rotation; then in the Hilbert space of the quantum state, unitary operation is performed on the quantum circuit, expected values are obtained by measuring the quantum circuit, and image features of corresponding extraction areas are obtained by mapping the expected values into pixel channels.
In the context of a quantum variational circuit, see fig. 3, a small region of an image is input, which is a 2 x 2 square, which is embedded in the quantum circuit. The 2 x 2 image region data is encoded into the hilbert space by parametric rotation, and then the extraction of the region image features is achieved by a series of unitary operations applied to the qubits initialized in the ground state. Wherein in the Hilbert space of the quantum state, all operations are unitary operations, in the quantum stateAll execution on the circuit is accomplished through unitary operations. The specific implementation algorithm can be expressed as:wherein->Representing image data, U represents a series of operations later. And finally measuring the quantum system to obtain a classical expected value. In the present embodiment, the classical expected values are not processed, but the original expected values are directly used. Like classical convolution layers, the expected values are mapped into channels of a single output pixel. The whole image is sequentially traversed, the same process is repeated on each 2×2 region, and the whole input image can be scanned to generate an output object, so that the functions of extracting and compressing the characteristics of the whole image are realized. The quantum convolution may be followed by further boundary monitoring of the medical image using the Roberts operator. The main difference from classical convolution is that quantum circuits can generate highly complex kernels whose computation is at least in principle classically difficult to handle. The main steps can be designed to include the following: initializing a quantum system, simulating a 4-quantum bit system; dividing the medical image into 2 x 2 squares, encoding four data of the region onto the quantum circuit by rotary encoding Ry (x) orRx (x) orRz (x); setting U operation, the invention selects CNOT or other random circuits to realize U operation; measuring the circuit to obtain an expected value; sequentially repeating quantum circuit processing on all the segmented blocks of the whole medical image; and integrating the expected values to obtain a preprocessed image, and inputting the preprocessed image into the boundary processing module.
In the embodiment of the scheme, the quantum convolution layer can be applied to the feature extraction of the medical image as a pretreatment layer without training, and the advantage of the quantum enhancement feature space is repeatedly exerted, so that the feature extraction method is more effective.
As a preferred embodiment, in the step of acquiring the gradient of the pixel point of the image by using the quantum circuit, the gradient of the Robert operator on the image is acquired by moving the position of the quantum register. The pixel point gradient can be used for detecting the image edge, the gradient size is used for representing the edge strength, the gradient direction is used for representing the edge trend, the calculation of the gradient direction is consistent with the selection of a gradient operator, and the gradient amplitude of the difference between two adjacent pixels in the diagonal direction is used for detecting the image edge.
The Roberts operator, also called the loberts operator, is an operator for searching edges by using a local difference operator, and the operator is a gradient calculation method of oblique bias difference, wherein the magnitude of the gradient represents the strength of the edges, and the direction of the gradient is perpendicular (orthogonal) to the trend of the edges. He uses the difference between two diagonally adjacent pixels to approximate the gradient magnitude to detect the edge. The effect of detecting the vertical edge is better than that of the inclined edge, the positioning accuracy is high, the vertical edge is sensitive to noise, and the influence of the noise cannot be restrained. As can be seen from fig. 4, the gradient operator is defined as:
to simplify the computation, the general gradient operator can be approximated as:
thus, the diagonal Roberts operator of image discretization (differential instead of partial derivatives) can be obtained:
in this embodiment, the solution principle of the operator is implemented by using a quantum circuit, and the pixel value of the image is { a } 1 ,a 2 ,...,a n The gradient of the Roberts operator over the image can be obtained by moving the position of the quantum register. The method can be concretely expressed as follows:
however, if the amplitude encoding is used to encode the whole image data, the circuit depth is too deep to meet the requirement of quantum decoherence characteristics, and the circuit depth is very deep as shown in fig. 5 by taking 16 pixels as an example. Therefore, in this embodiment, by adopting the method of segmentation, the picture can be segmented into 2×2 squares, and then the four image feature values are encoded sequentially, and the specific quantum circuit diagram is shown in fig. 6.
As a preferred embodiment, further, after extracting an image edge by using a pixel point gradient, and performing edge thinning inhibition on each pixel in the image by using a non-maximum value, the edge thinning inhibition process includes: and comparing the gradient value of the image pixel at the current position with the gradient values of the pixels at two positions along the positive and negative gradient directions, if the gradient value of the image pixel at the current position is larger, marking the current position as a boundary point, otherwise, inhibiting the value of the pixel point of the image at the current position as 0.
After gradient computation of the image by the quantum circuit, the edges extracted based on the gradient values alone remain blurred. Whereas non-maxima suppression, which is an edge thinning technique that works primarily on "thin" edges, can help suppress all gradient values outside of local maxima to 0. The algorithm content for performing non-maximum suppression on each pixel in the gradient image can be designed as follows:
1) Firstly, comparing the gradient value of the pixel at the current position with the pixels at two positions along the positive and negative gradient directions;
2) If the gradient value of the pixel at the current position is compared with the pixels at two positions along the positive and negative gradient directions, the position is marked as a boundary point, otherwise, the value of the pixel point is suppressed to 0. The pseudocode for non-maximum suppression is described as follows:
as a preferred embodiment, further, for the image boundary after edge thinning is suppressed, a high-low threshold is set, image boundary pixels with pixel gradient values higher than the high threshold are marked as strong boundary pixels, image boundary pixels with pixel gradient values smaller than the high threshold and larger than the low threshold are marked as weak boundary pixels, image boundary pixels with pixel gradient values smaller than the low threshold are suppressed as 0, weak boundary pixel points are filtered, and points of the strong boundary pixels are reserved as image boundaries.
It should be noted that the calculation of the gradient direction is consistent with the selection of the gradient operator. After non-maximum suppression is used in the medical image boundary monitoring process, the pixels represented by the boundary points can more accurately represent the actual boundaries of the image. Some border pixels due to noise and color variations still exist in the image border after non-maximum suppression. To address these spurious responses, boundary pixels must be filtered with weak gradient values, and boundary pixels with high gradient values remain, a function that can be filtered by selecting high and low thresholds. If the gradient value of the boundary pixel is higher than the high threshold value, marking the boundary pixel as a strong boundary pixel; if the gradient value of the boundary pixel is less than the high threshold and greater than the low threshold, it is marked as a weak boundary pixel; if the gradient value of the boundary pixel is less than the low threshold, it is suppressed to 0. The pseudo code for threshold filtering can be described as follows:
further, in this embodiment, for the point marked as the weak boundary pixel, by checking whether 8 neighboring pixel points thereof are marked as strong boundary pixels, if one neighboring pixel point is marked as strong boundary pixel, the point marked as the weak boundary pixel currently is reserved and is used as the image boundary.
Points that are divided into strong boundaries are determined as image boundaries because they are extracted from the true boundaries in the image. However, for weak boundary pixels, these boundary pixels may be extracted from the real edges and may be caused by noise or color variations. In order to obtain accurate results, weak boundary points caused by noise or color change should be suppressed. In general, weak boundary pixels caused by a real boundary will be connected to strong boundary pixels, while weak boundary pixels caused by noise or color change cannot be normally connected to strong boundary pixels. In order to track boundary connection, by looking at a weak boundary pixel point and 8 neighborhood pixel points thereof, as long as one of the weak boundary pixel points is on a strong boundary pixel point, the weak boundary point can be reserved as a real edge boundary. The pseudocode may be described as follows:
further, based on the above method, the embodiment of the present invention further provides a medical image edge detection system based on a quantum algorithm, including: an image segmentation module, a feature extraction module and an edge detection module, wherein,
the image segmentation module is used for segmenting the medical image into a plurality of image blocks with the size of N x N;
the characteristic extraction module is used for traversing the image blocks in sequence, coding the pixel value of each image block onto a quantum circuit by utilizing a quantum convolution neural network, and extracting the regional medical image characteristics through initialized quantum bits in a ground state;
and the edge detection module is used for combining the extracted medical image features to form a new similar image, carrying out segmentation and pixel value coding on the new similar image again, acquiring image pixel point gradients by utilizing a quantum circuit, and detecting the image edge through the pixel point gradients.
To verify the effectiveness of the present solution, tests were chosen for CT medical images and B-mode medical images, respectively, with the effects shown in fig. 7 and 8. Image features are extracted and compressed by means of a quantum convolution neural network, so that pixels of a medical image are smaller under the condition of controllable fidelity, and the aim of rapidly detecting edges of the medical image is fulfilled; and edge detection is performed by adopting a quantum segmentation processing mode, so that the image edge detection effect can be improved while the line depth of the whole quantum circuit is greatly shortened.
The relative steps, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The elements and method steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or a combination thereof, and the elements and steps of the examples have been generally described in terms of functionality in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Those of ordinary skill in the art may implement the described functionality using different methods for each particular application, but such implementation is not considered to be beyond the scope of the present invention.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the above methods may be performed by a program that instructs associated hardware, and that the program may be stored on a computer readable storage medium, such as: read-only memory, magnetic or optical disk, etc. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits, and accordingly, each module/unit in the above embodiments may be implemented in hardware or may be implemented in a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (5)
1. The medical image edge detection method based on the quantum algorithm is characterized by comprising the following steps of:
dividing a medical image into a plurality of image blocks with the size of N x N;
sequentially traversing the image blocks, coding pixel values of each image block onto a quantum line by utilizing a quantum convolution neural network, and extracting regional medical image features through initialized quantum bits in a ground state;
combining the extracted medical image features to form a new similar image, segmenting and coding pixel values again for the new similar image, acquiring image pixel gradients by utilizing a quantum circuit, and detecting image edges by the pixel gradients, wherein the gradient of the Robert operator on the image is acquired by moving the position of a quantum register in the image pixel gradients acquired by utilizing the quantum circuit; detecting the image edge by using pixel gradients, wherein the gradient size is used for representing the edge intensity, the gradient direction is used for representing the edge trend, the calculation of the gradient direction is consistent with the selection of a gradient operator, and the gradient amplitude of the difference between two adjacent pixels in the diagonal direction is used for detecting the image edge; after the image edge is extracted through the pixel point gradient, each pixel in the image is restrained from edge thinning by utilizing a non-maximum value, and the edge thinning restraining process comprises the following steps: comparing the gradient value of the image pixel at the current position with the gradient values of the pixels at two positions along the positive and negative gradient directions, if the gradient value of the image pixel at the current position is larger, marking the current position as a boundary point, otherwise, inhibiting the value of the pixel point of the image at the current position as 0; setting a high threshold value and a low threshold value for inhibiting an image boundary after edge thinning, marking an image boundary pixel with a pixel gradient value higher than the high threshold value as a strong boundary pixel, marking an image boundary pixel with a pixel gradient value smaller than the high threshold value and larger than the low threshold value as a weak boundary pixel, inhibiting the image boundary pixel with a pixel gradient value smaller than the low threshold value as 0, filtering weak boundary pixel points, and reserving the points of the strong boundary pixels as image boundaries; for the point marked as the weak boundary pixel, checking whether 8 neighborhood pixel points are marked as strong boundary pixels or not, if one neighborhood pixel point is marked as strong boundary pixel, reserving the point marked as the weak boundary pixel currently, and taking the point as an image boundary.
2. The medical image edge detection method based on the quantum algorithm according to claim 1, wherein in the quantum convolution neural network, an image block is firstly encoded into a hilbert space through parameter rotation; then in the Hilbert space of the quantum state, unitary operation is performed on the quantum circuit, expected values are obtained by measuring the quantum circuit, and image features of corresponding extraction areas are obtained by mapping the expected values into pixel channels.
3. The medical image edge detection method based on quantum algorithm according to claim 1 or 2, wherein the process of extracting image features by using quantum convolutional neural network is represented as:wherein (1)>Representing image data, U representing unitary operation of the quantum system, 0 n Indicating that n bits are initialized to zero, +.>Representing a unitary transformation, n representing the feature extraction of the image completed with n bits.
4. A medical image edge detection method based on quantum algorithm according to claim 3, wherein the unitary operation of the quantum system in extracting the image features includes but is not limited to: CNOT controllable NOT gate.
5. A medical image edge detection system based on a quantum algorithm, comprising: an image segmentation module, a feature extraction module and an edge detection module, wherein,
the image segmentation module is used for segmenting the medical image into a plurality of image blocks with the size of N x N;
the characteristic extraction module is used for traversing the image blocks in sequence, coding the pixel value of each image block onto a quantum circuit by utilizing a quantum convolution neural network, and extracting the regional medical image characteristics through initialized quantum bits in a ground state;
the edge detection module is used for combining the extracted medical image features to form a new similar image, segmenting and coding pixel values of the new similar image again, acquiring image pixel point gradients by utilizing a quantum circuit, and detecting the image edge by the pixel point gradients, wherein the gradient of the Robert operator on the image is acquired by moving the position of a quantum register in the image pixel point gradients acquired by utilizing the quantum circuit; detecting the image edge by using pixel gradients, wherein the gradient size is used for representing the edge intensity, the gradient direction is used for representing the edge trend, the calculation of the gradient direction is consistent with the selection of a gradient operator, and the gradient amplitude of the difference between two adjacent pixels in the diagonal direction is used for detecting the image edge; after the image edge is extracted through the pixel point gradient, each pixel in the image is restrained from edge thinning by utilizing a non-maximum value, and the edge thinning restraining process comprises the following steps: comparing the gradient value of the image pixel at the current position with the gradient values of the pixels at two positions along the positive and negative gradient directions, if the gradient value of the image pixel at the current position is larger, marking the current position as a boundary point, otherwise, inhibiting the value of the pixel point of the image at the current position as 0; setting a high threshold value and a low threshold value for inhibiting an image boundary after edge thinning, marking an image boundary pixel with a pixel gradient value higher than the high threshold value as a strong boundary pixel, marking an image boundary pixel with a pixel gradient value smaller than the high threshold value and larger than the low threshold value as a weak boundary pixel, inhibiting the image boundary pixel with a pixel gradient value smaller than the low threshold value as 0, filtering weak boundary pixel points, and reserving the points of the strong boundary pixels as image boundaries; for the point marked as the weak boundary pixel, checking whether 8 neighborhood pixel points are marked as strong boundary pixels or not, if one neighborhood pixel point is marked as strong boundary pixel, reserving the point marked as the weak boundary pixel currently, and taking the point as an image boundary.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211293335.8A CN115578357B (en) | 2022-10-21 | 2022-10-21 | Medical image edge detection method and system based on quantum algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211293335.8A CN115578357B (en) | 2022-10-21 | 2022-10-21 | Medical image edge detection method and system based on quantum algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115578357A CN115578357A (en) | 2023-01-06 |
CN115578357B true CN115578357B (en) | 2023-11-21 |
Family
ID=84587407
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211293335.8A Active CN115578357B (en) | 2022-10-21 | 2022-10-21 | Medical image edge detection method and system based on quantum algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115578357B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017067390A1 (en) * | 2015-10-20 | 2017-04-27 | 努比亚技术有限公司 | Method and terminal for obtaining depth information of low-texture regions in image |
CN107169982A (en) * | 2017-05-17 | 2017-09-15 | 重庆邮电大学 | A kind of quantum LoG edge detection methods |
CN108198196A (en) * | 2018-01-23 | 2018-06-22 | 华东交通大学 | The design and implementation methods of quantum Image Edge-Detection based on Sobel operators |
CN108416789A (en) * | 2018-06-04 | 2018-08-17 | 武汉斑马快跑科技有限公司 | Method for detecting image edge and system |
CN111199235A (en) * | 2020-01-03 | 2020-05-26 | 深圳市京湾量子遥感科技有限公司 | Image edge extraction method |
CN113870235A (en) * | 2021-10-08 | 2021-12-31 | 福州大学 | Method for detecting defects of circular stamping part based on quantum firework arc edge extraction |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003009579A2 (en) * | 2001-07-17 | 2003-01-30 | Amnis Corporation | Computational methods for the segmentation of images of objects from background in a flow imaging instrument |
-
2022
- 2022-10-21 CN CN202211293335.8A patent/CN115578357B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017067390A1 (en) * | 2015-10-20 | 2017-04-27 | 努比亚技术有限公司 | Method and terminal for obtaining depth information of low-texture regions in image |
CN107169982A (en) * | 2017-05-17 | 2017-09-15 | 重庆邮电大学 | A kind of quantum LoG edge detection methods |
CN108198196A (en) * | 2018-01-23 | 2018-06-22 | 华东交通大学 | The design and implementation methods of quantum Image Edge-Detection based on Sobel operators |
CN108416789A (en) * | 2018-06-04 | 2018-08-17 | 武汉斑马快跑科技有限公司 | Method for detecting image edge and system |
CN111199235A (en) * | 2020-01-03 | 2020-05-26 | 深圳市京湾量子遥感科技有限公司 | Image edge extraction method |
CN113870235A (en) * | 2021-10-08 | 2021-12-31 | 福州大学 | Method for detecting defects of circular stamping part based on quantum firework arc edge extraction |
Non-Patent Citations (1)
Title |
---|
《Quantum image processing and its application to edge detection theory and experiment》;Xi-Wei Yao等;《PHYSICAL REVIEW X》;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115578357A (en) | 2023-01-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lei et al. | Adaptive morphological reconstruction for seeded image segmentation | |
Hu et al. | Deep level sets for salient object detection | |
CN112232391B (en) | Dam crack detection method based on U-net network and SC-SAM attention mechanism | |
CN109886970B (en) | Detection segmentation method for target object in terahertz image and computer storage medium | |
CN108921877B (en) | Long-term target tracking method based on width learning | |
CN110334762B (en) | Feature matching method based on quad tree combined with ORB and SIFT | |
CN111833237B (en) | Image registration method based on convolutional neural network and local homography transformation | |
Xu et al. | Video salient object detection via robust seeds extraction and multi-graphs manifold propagation | |
CN111754453A (en) | Pulmonary tuberculosis detection method and system based on chest radiography image and storage medium | |
CN111191649A (en) | Method and equipment for identifying bent multi-line text image | |
CN113643365B (en) | Camera pose estimation method, device, equipment and readable storage medium | |
Farhangi et al. | Automatic lung nodule detection in thoracic CT scans using dilated slice‐wise convolutions | |
Jiang et al. | Msk-unet: A modified u-net architecture based on selective kernel with multi-scale input for pavement crack detection | |
CN111401209B (en) | Action recognition method based on deep learning | |
CN115578357B (en) | Medical image edge detection method and system based on quantum algorithm | |
Cao et al. | Accurate glass insulators defect detection in power transmission grids using aerial image augmentation | |
CN113139544A (en) | Saliency target detection method based on multi-scale feature dynamic fusion | |
CN112308087A (en) | Integrated imaging identification system and method based on dynamic vision sensor | |
CN107144572A (en) | Crack automatic recognition and detection method in gray level image | |
CN110910497A (en) | Method and system for realizing augmented reality map | |
Wang et al. | An Image Edge Detection Algorithm Based on Multi-Feature Fusion. | |
Barbu | Automatic edge detection solution using anisotropic diffusion-based multi-scale image analysis and fine-to-coarse tracking | |
CN114155174A (en) | Edge detection algorithm based on fusion histogram layering and nonlinear derivative | |
CN113159158A (en) | License plate correction and reconstruction method and system based on generation countermeasure network | |
Cai et al. | Unfeatured weld positioning technology based on neural network and machine vision |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |