[go: up one dir, main page]

CN115035312B - Similarity determination method, device, electronic device and storage medium - Google Patents

Similarity determination method, device, electronic device and storage medium Download PDF

Info

Publication number
CN115035312B
CN115035312B CN202210650612.XA CN202210650612A CN115035312B CN 115035312 B CN115035312 B CN 115035312B CN 202210650612 A CN202210650612 A CN 202210650612A CN 115035312 B CN115035312 B CN 115035312B
Authority
CN
China
Prior art keywords
contour
pixel
gaussian distribution
similarity
pixels
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
Application number
CN202210650612.XA
Other languages
Chinese (zh)
Other versions
CN115035312A (en
Inventor
李明
孔方琦
周迪斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Santan Medical Technology Co Ltd
Original Assignee
Hangzhou Santan Medical Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Santan Medical Technology Co Ltd filed Critical Hangzhou Santan Medical Technology Co Ltd
Priority to CN202210650612.XA priority Critical patent/CN115035312B/en
Publication of CN115035312A publication Critical patent/CN115035312A/en
Application granted granted Critical
Publication of CN115035312B publication Critical patent/CN115035312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Radiology & Medical Imaging (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a similarity determination method, a similarity determination device, electronic equipment and a storage medium. The method comprises the steps of extracting first contour pixels and second contour pixels according to the content of a reference image and a floating image main body, determining the corresponding second contour pixels in the floating image according to the first contour pixels as matching pixels, calculating Gaussian distribution similarity weights between the matching pixels and the first contour pixels, wherein the Gaussian distribution similarity weights are Gaussian distribution function values obtained based on similar distances, and determining the similarity of the two images based on the Gaussian distribution similarity weights and the number of the first contour pixels. Because the contour pixels are extracted aiming at the main body content, the main body information in the images can be reserved to the maximum extent, and according to the Gaussian distribution characteristics, the smaller the distance between the pixels is, the larger the Gaussian distribution function value is, the similarity of the two images is measured by using the Gaussian distribution similarity weight, the tiny change of the two images can be embodied, and the accuracy of determining the medical image similarity is improved.

Description

Similarity determination method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for determining similarity, an electronic device, and a storage medium.
Background
Calculating the similarity of images (i.e., similarity measurement of images) by comparing image features is a very important fundamental problem in the field of computer vision, and has wide application in pattern recognition, image classification, image retrieval, image registration, and the like.
In the prior art, similarity between images is usually measured by histogram matching, feature point extraction (such as SIFT), and the like. But in medical scenes, since medical images are mostly gray-scale images, the image variation is small. The distribution of the gray information in the gray domain may be similar for different images, but the distribution of the gray information in the space domain is not similar, and the similarity obtained based on the histogram reflects the distribution of the gray information in the gray domain only, and cannot reflect the distribution of the gray information in the space domain. In the method of extracting the feature (such as SIFT) with rotation non-deformation in the image and taking the feature matching degree as the similarity, the similarity calculation is independent of the image size and rotation, and the influence of the conversion of light, noise and visual angle on the calculation result is very small, so that the similarity determined by the feature point extraction method cannot reflect the difference of the image features in the space position.
It can be seen that the similarity determination method used in the prior art is difficult to accurately measure the similarity of the medical image.
Disclosure of Invention
The embodiment of the invention aims to provide a similarity determining method, a device, electronic equipment and a storage medium, so as to improve the accuracy of medical image similarity determination. The specific technical scheme is as follows:
In one aspect of the present invention, there is provided a similarity determination method, the method comprising:
Acquiring a reference image and a floating image;
Contour extraction is respectively carried out on the main body content in the reference image and the main body content in the floating image, so that first contour pixels of the reference image and second contour pixels of the floating image are obtained;
For each first contour pixel, determining each second contour pixel within a preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixel and the preset range as each matching pixel of the first contour pixel;
For each first contour pixel, each Gaussian distribution similarity weight between each matching pixel of the first contour pixel and the first contour pixel is calculated, wherein the Gaussian distribution similarity weight is a Gaussian distribution function value obtained based on a similar distance;
And determining the similarity between the reference image and the floating image based on each Gaussian distribution similarity weight between each first contour pixel and each matched pixel thereof and the number of the first contour pixels, wherein the similarity is positively correlated with the Gaussian distribution similarity weight and negatively correlated with the number of the first contour pixels.
In one embodiment of the present invention, the calculating, for each of the first contour pixels, each gaussian distribution similarity weight between each matching pixel of the first contour pixels and the first contour pixels includes:
For each first contour pixel, respectively calculating Euclidean distance between each matching pixel of the first contour pixel and the first contour pixel based on the coordinates of the first contour pixel and the coordinates of each matching pixel;
and calculating Gaussian distribution function values as Gaussian distribution similarity weights between the matched pixels and the first contour pixels by taking Euclidean distances between the matched pixels and the first contour pixels as independent variables for the first contour pixels.
In one embodiment of the present invention, before calculating the gaussian distribution function value as each gaussian distribution similarity weight between each matching pixel and the first contour pixel, the method further includes, for each first contour pixel, using a euclidean distance between each matching pixel and the first contour pixel as an argument:
For each first contour pixel, determining the minimum value in Euclidean distances between each matching pixel of the first contour pixel and the first contour pixel as the minimum Euclidean distance corresponding to the first contour pixel;
the calculating, for each first contour pixel, a gaussian distribution function value with a euclidean distance between each matching pixel and the first contour pixel as an argument, as each gaussian distribution similarity weight between each matching pixel and the first contour pixel, includes:
for each first contour pixel, calculating a Gaussian distribution function value by taking the minimum Euclidean distance corresponding to the first contour pixel as an independent variable, and taking the Gaussian distribution function value as the maximum Gaussian distribution similarity weight corresponding to the first contour pixel;
the determining the similarity between the reference image and the floating image based on the gaussian distribution similarity weights between the first contour pixels and the matching pixels thereof and the first contour pixel number comprises:
And calculating the sum of the maximum Gaussian distribution similarity weights corresponding to the first contour pixels and the quotient of the number of the first contour pixels as the similarity between the reference image and the floating image.
In one embodiment of the present invention, the extracting the contour of the subject content in the reference image and the subject content in the floating image to obtain each first contour pixel of the reference image and each second contour pixel of the floating image includes:
Carrying out Gaussian smoothing filtering on the reference image and the floating image to obtain a filtered reference image and a filtered floating image;
And respectively extracting the outline of the main body content in the filtered reference image and the main body content in the filtered floating image to obtain each first outline pixel of the reference image and each second outline pixel of the floating image.
In a second aspect of the present invention, there is provided a similarity determination apparatus comprising:
the image acquisition module is used for acquiring a reference image and a floating image;
The contour extraction module is used for respectively extracting the contour of the main body content in the reference image and the main body content in the floating image to obtain each first contour pixel of the reference image and each second contour pixel of the floating image;
a matching pixel determining module, configured to determine, for each of the first contour pixels, each second contour pixel located within a preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixel and the preset range, as each matching pixel of the first contour pixel;
The similarity weight calculation module is used for calculating the gaussian distribution similarity weights between each matching pixel of the first contour pixel and the first contour pixel according to each first contour pixel, wherein the gaussian distribution similarity weights are gaussian distribution function values obtained based on similar distances;
And the similarity determining module is used for determining the similarity between the reference image and the floating image based on each Gaussian distribution similarity weight between each first contour pixel and each matched pixel thereof and the number of the first contour pixels, wherein the similarity is positively correlated with the Gaussian distribution similarity weight and negatively correlated with the number of the first contour pixels.
In one embodiment of the present invention, the calculating, for each of the first contour pixels, each gaussian distribution similarity weight between each matching pixel of the first contour pixels and the first contour pixels includes:
For each first contour pixel, respectively calculating Euclidean distance between each matching pixel of the first contour pixel and the first contour pixel based on the coordinates of the first contour pixel and the coordinates of each matching pixel;
and calculating Gaussian distribution function values as Gaussian distribution similarity weights between the matched pixels and the first contour pixels by taking Euclidean distances between the matched pixels and the first contour pixels as independent variables for the first contour pixels.
In one embodiment of the invention, the apparatus further comprises:
The minimum Euclidean distance determining module is used for determining the minimum value of Euclidean distances between each matched pixel of the first contour pixel and the first contour pixel according to each first contour pixel, and the minimum Euclidean distance is the minimum Euclidean distance corresponding to the first contour pixel;
the calculating, for each first contour pixel, a gaussian distribution function value with a euclidean distance between each matching pixel and the first contour pixel as an argument, as each gaussian distribution similarity weight between each matching pixel and the first contour pixel, includes:
for each first contour pixel, calculating a Gaussian distribution function value by taking the minimum Euclidean distance corresponding to the first contour pixel as an independent variable, and taking the Gaussian distribution function value as the maximum Gaussian distribution similarity weight corresponding to the first contour pixel;
the determining the similarity between the reference image and the floating image based on the gaussian distribution similarity weights between the first contour pixels and the matching pixels thereof and the first contour pixel number comprises:
And calculating the sum of the maximum Gaussian distribution similarity weights corresponding to the first contour pixels and the quotient of the number of the first contour pixels as the similarity between the reference image and the floating image.
In one embodiment of the present invention, the extracting the contour of the subject content in the reference image and the subject content in the floating image to obtain each first contour pixel of the reference image and each second contour pixel of the floating image includes:
Carrying out Gaussian smoothing filtering on the reference image and the floating image to obtain a filtered reference image and a filtered floating image;
And respectively extracting the outline of the main body content in the filtered reference image and the main body content in the filtered floating image to obtain each first outline pixel of the reference image and each second outline pixel of the floating image.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any of the steps of the similarity determination method when executing the program stored in the memory.
In another aspect of the present invention, there is also provided a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above-mentioned similarity determining methods are implemented.
The embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the above-described similarity determination methods.
The embodiment of the invention has the beneficial effects that:
The similarity determination method provided by the embodiment of the invention comprises the steps of respectively carrying out contour extraction on the main body content in the reference image and the main body content in the floating image to obtain first contour pixels of the reference image and second contour pixels of the floating image, determining second contour pixels which are located in the preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixels and the preset range of the first contour pixels aiming at the first contour pixels, respectively calculating Gaussian distribution similarity weights between the matched pixels of the first contour pixels and the first contour pixels, wherein the Gaussian distribution similarity weights are Gaussian distribution function values obtained based on similarity distances, and determining the similarity between the reference image and the floating image based on the number of the first contour pixels and the number of the first contour pixels, wherein the similarity is positive and negative with respect to the Gaussian distribution. According to the embodiment of the invention, the similarity calculation is performed based on the contour pixels of the reference image and the floating image, and because the contour pixels are extracted aiming at the main body contents in the reference image and the floating image, the extracted contour pixels can furthest reserve main body information in the medical image and filter interference information, meanwhile, the similarity between images is measured by using Gaussian distribution similarity weights, and because the Gaussian distribution similarity weights are Gaussian distribution function values obtained by calculating based on similar distances, the smaller the distance between the two pixels is, the larger the Gaussian distribution function value is, and the larger the change rate of the Gaussian distribution curve is, the smaller the similarity between the two images is measured by using the Gaussian distribution similarity weights, so that the tiny change of the two images in the space position can be better reflected, the change relation of the medical images with single information and smaller image change can be more accurately reflected, and the medical image similarity determination accuracy is improved.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1 is a schematic flow chart of a similarity determining method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a second flow of a similarity determining method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a third flow chart of a similarity determining method according to an embodiment of the present invention;
FIG. 4 is a graph of a one-dimensional Gaussian distribution function;
FIG. 5 is a graph showing a Gaussian distribution function used in an embodiment of the invention;
fig. 6 is a fourth flowchart of a similarity determining method according to an embodiment of the present invention;
Fig. 7 is a flowchart of a specific example of a similarity determining method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a similarity determining device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
Image registration (Image registration) is a process of matching and overlapping two or more images acquired at different times, with different sensors (imaging devices) or under different conditions (weather, illuminance, imaging position and angle, etc.), and has very important applications in the medical field. Medical image registration refers to the search for a spatial transformation (or series) of one medical image (also called a floating image) to spatially agree with a corresponding point on another medical image (also called a reference image), which refers to the same anatomical point on the human body having the same spatial position on both matching images. After medical image registration is carried out, image analysis under the same spatial scale can be carried out on a plurality of images of the patient, and comprehensive information of multiple aspects of the patient can be obtained. And the similarity measure of the images is the basis for the registration of the medical images.
In order to improve accuracy of medical image similarity determination, the embodiment of the invention provides a similarity determination method, a device, electronic equipment and a storage medium. The similarity determination method provided by the embodiment of the invention is first described in the following.
The similarity determination method provided by the embodiment of the invention can be applied to electronic equipment, and the electronic equipment can comprise a computer, a server and the like. The present invention is not particularly limited thereto.
Referring to fig. 1, fig. 1 is a schematic flow chart of a similarity determining method according to an embodiment of the present invention, which specifically may include the following steps:
step S110, acquiring a reference image and a floating image;
Step S120, contour extraction is carried out on the main body content in the reference image and the main body content in the floating image respectively, so as to obtain first contour pixels of the reference image and second contour pixels of the floating image;
Step S130, for each of the first contour pixels, determining, in the floating image, each second contour pixel located within a preset range of the first contour pixel coordinates as each matching pixel of the first contour pixel, based on the coordinates of the first contour pixel and the preset range;
Step S140, for each first contour pixel, calculating each gaussian distribution similarity weight between each matching pixel of the first contour pixel and the first contour pixel;
The Gaussian distribution similarity weight is a Gaussian distribution function value obtained based on a similarity distance;
step S150, determining a similarity between the reference image and the floating image based on each gaussian distribution similarity weight between each first contour pixel and each matching pixel thereof, and the number of first contour pixels.
The similarity is positively correlated with the Gaussian distribution similarity weight and negatively correlated with the number of the first contour pixels.
The similarity determination method provided by the embodiment of the invention comprises the steps of respectively carrying out contour extraction on the main body content in the reference image and the main body content in the floating image to obtain first contour pixels of the reference image and second contour pixels of the floating image, determining second contour pixels which are located in the preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixels and the preset range of the first contour pixels aiming at the first contour pixels, respectively calculating Gaussian distribution similarity weights between the matched pixels of the first contour pixels and the first contour pixels, wherein the Gaussian distribution similarity weights are Gaussian distribution function values obtained based on similarity distances, and determining the similarity between the reference image and the floating image based on the number of the first contour pixels and the number of the first contour pixels, wherein the similarity is positive and negative with respect to the Gaussian distribution. According to the embodiment of the invention, the similarity calculation is performed based on the contour pixels of the reference image and the floating image, and because the contour pixels are extracted aiming at the main body contents in the reference image and the floating image, the extracted contour pixels can furthest reserve main body information in the medical image and filter interference information, meanwhile, the similarity between images is measured by using Gaussian distribution similarity weights, and because the Gaussian distribution similarity weights are Gaussian distribution function values obtained by calculating based on similar distances, the smaller the distance between the two pixels is, the larger the Gaussian distribution function value is, and the larger the change rate of the Gaussian distribution curve is, the smaller the similarity between the two images is measured by using the Gaussian distribution similarity weights, so that the tiny change of the two images in the space position can be better reflected, the change relation of the medical images with single information and smaller image change can be more accurately reflected, and the medical image similarity determination accuracy is improved.
In addition, since medical images exist in a variety of imaging modes, such as CT imaging, X-ray imaging, and the like. In the method for carrying out similarity measurement based on extracted feature points in the prior art, aiming at images generated in different imaging modes, the extracted feature information is different, the number of the feature points and the mode of selecting the feature points also have influence on calculation of similarity, and meanwhile, the similarity calculation based on the feature points is single in image information and small in information change, so that the feature points cannot be accurately extracted. By applying the embodiment of the invention, the influence of an image imaging mode, the number of the characteristic points and a mode of selecting the characteristic points on the similarity determination can be eliminated by carrying out the similarity calculation based on the contour pixels of the main body content in the reference image and the floating image instead of carrying out the similarity calculation based on the image characteristics extracted from the original image, so that the accuracy of the similarity calculation is improved.
The above steps S110 to S150 are exemplarily described as follows:
In the embodiment of the present invention, the reference image and the floating image may be images obtained by different imaging modes. The reference image may be also referred to as a template gray scale image, and may be an X-ray image of a patient photographed in a scene such as a physical examination process or a surgical process. For example, an X-ray image of a region such as the brain or chest of a patient may be obtained. The X-ray image is an image obtained by an X-ray imaging technique. Of course, the reference image may be a nuclear magnetic resonance image of the patient. For example, the image may be a nuclear magnetic resonance image of a cervical vertebra, lumbar vertebra, or the like of a patient. The nuclear magnetic resonance image is an image obtained by a nuclear magnetic resonance imaging technique.
The floating image may be an image obtained by mathematical modeling. In the medical field, the floating image is typically a CT image of a patient. CT images are images obtained by CT imaging techniques. CT imaging is a technique that combines X-ray scan projection data with reconstruction mathematics and computer techniques to obtain medical images based on slice information. For example, the floating image may be a DRR (Digital Reconstructed Radiograph, digitally reconstructed image) image obtained by CT scanning of a portion of a brain, chest, or the like of a patient. Of course, the floating image may be an image obtained by other imaging techniques, such as ultrasound imaging, and the invention is not limited thereto.
Of course, the reference image may be a CT image, the floating image may be an X-ray image, or the like, which is not particularly limited in the present invention.
In medical image registration, the reference image and the floating image are typically the same size and are images generated for the same region. For example, an X-ray image and a CT image generated for the brain, chest, and the like of the same patient may be used. Of course, the reference image and the floating image may be images generated for the same portion of different patients. For example, X-ray images and CT images generated for brains, chests, etc. of different patients may be used.
After the reference image and the floating image are acquired, contour extraction may be performed on the reference image and the floating image, respectively.
In the embodiment of the invention, contour extraction can be performed for main body contents in the reference image and the floating image. The extracted contour information is the contour information of the main body content in the reference image and the floating image. For example, the contour information extracted from the X-ray image of the brain of the patient is the contour information of the brain of the patient in the image, and the contour information extracted from the X-ray image captured by the chest of the patient is the contour information of the chest of the patient in the image.
In general, extracting image contour pixels may use a contour extraction canny operator, laplace (laplace) operator, or the like. In an embodiment of the present invention, a canny operator may be used to perform contour extraction on the reference image and the floating image, respectively, to obtain contour information of the reference image and the floating image. The contour information of the reference image and the floating image may include gray values of contour pixels of the subject contents in both images, coordinates of the contour pixels, and the like.
In order to distinguish the contour pixels of the two images, in the embodiment of the present invention, the contour pixel extracted for the reference image is referred to as a first contour pixel, and the contour pixel extracted for the floating image is referred to as a second contour pixel.
In general, medical images are relatively complex for objects, and have large data volumes and low signal-to-noise ratios. The signal-to-noise ratio is the ratio of signal to noise. The contour extraction may not be well achieved if it is directly based on the original image. Thus, in one embodiment of the present invention, noise filtering may be performed on the reference image and the floating image, and contour extraction may be performed on the filtered reference image and floating image, respectively.
Specifically, based on fig. 1, as shown in fig. 2, contour pixels of the reference image and the floating image can be extracted by:
And step S121, performing Gaussian smoothing filtering on the reference image and the floating image to obtain a filtered reference image and a filtered floating image.
The Gaussian smoothing filter is a linear smoothing filter, is suitable for eliminating Gaussian noise and is widely applied to a noise reduction process of image processing. By performing Gaussian smoothing filtering on the reference image and the floating image, most of noise which may interfere with contour extraction can be filtered out well, and image main information is retained.
And step 122, respectively extracting contours of the main body content in the filtered reference image and the main body content in the filtered floating image to obtain first contour pixels of the reference image and second contour pixels of the floating image.
In this step, the contour extraction canny operator may be used to extract contour information of the subject content in the filtered reference image and the filtered floating image. After the first contour pixels and the second contour pixels are extracted, contour pixel information corresponding to the first contour pixels and the second contour pixels is stored.
As a specific implementation manner of the embodiment of the present invention, the contour pixel information may be stored in an array form. For example, the information of each first contour pixel may be stored in one array, and the information of each second contour pixel may be stored in another array. The above array may store only the coordinates of each first or second contour pixel, or may store the coordinates and gray values of each first or second contour pixel.
Thereafter, the similarity of the reference image and the floating image may be calculated based on the first contour pixels and the second contour pixels.
As described above, medical image registration refers to seeking a spatial transformation (or series) for a floating image to spatially coincide with a corresponding point on a reference image. Therefore, the required similarity of the reference image and the floating image is actually the similarity of the reference image and the floating image in the spatial position. That is, in the embodiment of the present invention, the similarity of the reference image and the floating image in the spatial position is obtained by calculating the similarity of the first contour pixel and the second contour pixel in the spatial position.
In the embodiment of the invention, the similarity between the second contour pixel in the corresponding area of the floating image and the first contour pixel in the space position can be calculated for each first contour pixel. The above-described corresponding region may be referred to as a search region corresponding to the first contour pixel. The search area may be obtained based on coordinates of the first contour pixel.
As described above, the reference image and the floating image generally have the same size. Thus, for each first contour pixel, the same position as its coordinates can be found in the floating image. In the embodiment of the invention, the search area corresponding to each first contour pixel in the floating image can be determined based on the coordinates of each first contour pixel and the preset range.
The shape and the size of the preset range can be set manually based on actual needs and stored in advance. For example, the preset range may be set as a rectangular area with the first contour pixel coordinate as the center, and the distance from each side of the rectangular area to the center may be 15, 20 pixels, and the corresponding size of the rectangular area may be 31×31, 41×41, or the like. Of course, the shape of the above-mentioned preset range may be pentagonal, diamond, etc., which is not particularly limited in the present invention.
In one embodiment of the present invention, for each first contour pixel, a position in the floating image that is the same as the coordinates of the first contour pixel may be determined, and a search area corresponding to the first contour pixel within a preset range centered on the position may be determined. For example, for a first contour pixel, the first contour pixel coordinate is (x 0,y0), then a rectangular area with the coordinate (x 0,y0) as the center and the size of 31×31 in the floating image can be determined as the search area corresponding to the first contour pixel.
Of course, in other embodiments of the present invention, a search area may be determined for each first contour pixel based on the coordinates of the first contour pixel and a preset range in the reference image. And determining a search area corresponding to the first contour pixel in the floating image based on the end point coordinates of the search area. For example, if the coordinates of a certain first contour pixel are (x 0,y0), a rectangular area with the size of 31 x 31 and the coordinates (x 0,y0) as the center in the reference image can be determined, and based on the coordinates of four endpoints of the rectangular area, a search area corresponding to the first contour pixel is determined as an area surrounded by the coordinates of the same endpoint in the floating image.
Then, for each first contour pixel, a second contour pixel existing in the search area can be searched in the corresponding search area. The second contour pixel is the matching pixel of the first contour pixel.
As a specific implementation manner of the embodiment of the present invention, for each first contour pixel, each pixel coordinate in the search area corresponding to the first contour pixel may be matched with each second contour pixel coordinate, and the second contour pixel corresponding to the successfully matched coordinate is the matched pixel of the first contour pixel. If a matching pixel of a first contour pixel is not found for the first contour pixel, the first contour pixel may be marked as a non-matching point.
As described above, each contour pixel may be stored in an array form. For example, for each first contour pixel described above, the coordinates P of each first contour pixel may be stored using the array a. Array a= { P 1,P2,…,PN }. Wherein N is the number of the first contour pixels. As a specific embodiment, for any first contour pixel P i in the array a, the coordinates of the matching pixel of the first contour pixel may be extracted into the array B for storage. Then, the gaussian distribution similarity weight between the coordinates of each matching pixel in the array B and the first contour pixel coordinates P i can be calculated one by one.
In an embodiment of the present invention, it may further be determined whether data exists in the array a for storing the first contour pixel coordinates, so as to determine whether the reference image contour information is successfully extracted, and ensure reliability of similarity calculation. If the data does not exist in the array A, abnormal information can be output, and the similarity calculation is stopped. If so, the step S130 may be performed, for each of the first contour pixels, to determine, in the floating image, each second contour pixel located within the preset range of the first contour pixel coordinates as each matching pixel of the first contour pixel, based on the coordinates of the first contour pixel and the preset range.
The gaussian distribution similarity weight is a gaussian distribution function value obtained based on a similarity distance. In the embodiment of the present invention, when calculating the gaussian distribution similarity weight of each first contour pixel and each matching pixel for each first contour pixel, the similarity distance between the first contour pixel and each matching pixel may be calculated first. The similar distance may be euclidean distance, mahalanobis distance, cosine distance, or the like. In one embodiment of the present invention, the euclidean distance may be used to represent the similar distance between the first pixel and each matching pixel.
Specifically, based on fig. 1, as shown in fig. 3, the gaussian distribution similarity weight between the matched pixel and the first contour pixel can be calculated specifically by:
step S141, for each of the first contour pixels, calculating a euclidean distance between each of the matching pixels of the first contour pixel and the first contour pixel based on the coordinates of the first contour pixel and the coordinates of each of the matching pixels;
Step S142, for each of the first contour pixels, calculating a gaussian distribution function value by using the euclidean distance between each of the matching pixels and the first contour pixel as an argument, as each gaussian distribution similarity weight between each of the matching pixels and the first contour pixel.
The following is an exemplary explanation of the above steps S141-S142:
As described above, for each first contour pixel, an array may be employed to store the coordinates of the matching pixels for that first contour pixel. Therefore, when calculating the euclidean distance between the first contour pixel and each of its matching pixels, the euclidean distance between the element in the array for storing the matching pixels and the first contour pixel may be calculated one by one based on the array.
In the embodiment of the invention, in order to better reflect the tiny change between the two images, the similarity between the two images can be measured by adopting Gaussian distribution similarity weights. The gaussian distribution similarity weight may be a gaussian distribution function value calculated by using euclidean distance as an argument.
Typically, the one-dimensional expression of the gaussian distribution function is as follows:
Wherein, a controls the height of the peak of the curve, b controls the coordinate of the center of the peak, c is the standard deviation, and controls the convergence speed of the curve. Fig. 4 shows a variation of the one-dimensional gaussian distribution function. As shown in fig. 4, the closer to the curve peak, the greater the rate of change of the curve. That is, for each variable x that is numerically close to b, there is a large difference in the gaussian distribution function value even if the difference in each variable x is small. And the closer the variable x is to b in value, the larger the gaussian distribution function value is.
Therefore, for the reference image and the floating image with small change in the spatial position, the similarity between the first contour pixel and the matched pixel is measured by using the Gaussian distribution function value corresponding to the Euclidean distance, so that the similarity between the first contour pixel and the matched pixel in the spatial position can be better reflected, and the tiny change between the two images in the spatial position can be better reflected.
In one embodiment of the present invention, a one-dimensional gaussian distribution function of a=1, b=0, c=2 may be used to obtain gaussian distribution similarity weights. That is, the gaussian distribution function used in the embodiment of the present invention may be:
wherein a=1, which means that the maximum value of the weight is 1, b=0, which means that the maximum value is taken when the distance is 0, and the function on the right side of the peak is taken, and x is the euclidean distance. Of course, the above values of a, b, and c may be other values, which are not particularly limited in the present invention.
FIG. 5 is a graph illustrating a Gaussian function curve used in an embodiment of the invention. It can be seen that the closer the euclidean distance is to 0, the larger the corresponding gaussian function value (i.e., gaussian similarity weight) is. Therefore, the Gaussian distribution function value corresponding to the Euclidean distance is used as a similarity measurement index, so that the similarity of two images can be reflected more clearly.
After calculating the gaussian distribution similarity weights between all the first contour pixels and the matched pixels, the similarity between the first contour pixels and the second contour pixels can be calculated based on the gaussian distribution similarity weights between the first contour pixels and the matched pixels.
In one embodiment of the present invention, normalization calculation may be performed on each calculated gaussian distribution similarity weight, and the normalized result is used as the similarity between the reference image and the floating image. For example, a quotient of the sum of the gaussian distribution similarity weights and the number of first contour pixels may be calculated, and the quotient may be narrowed down to a range of 0 to 1 as the similarity between the reference image and the floating image. However, there may be more second contour pixels that are repeatedly calculated in this way, resulting in poor accuracy of the resulting similarity. Thus, in another embodiment of the present invention, the gaussian distribution similarity weights may be filtered and then calculated.
In one embodiment of the present invention, for each first contour pixel, a gaussian distribution similarity weight maximum value between the first contour pixel and each matching pixel thereof is reserved, and subsequent calculation is performed. In this way, the number of second contour pixels that are repeatedly calculated can be reduced. As a specific embodiment, based on fig. 3, as shown in fig. 6, before the step S142, the method may further include:
Step S640, for each first contour pixel, determining a minimum value of euclidean distances between each matching pixel of the first contour pixel and the first contour pixel, where the minimum value is the minimum euclidean distance corresponding to the first contour pixel.
Based on fig. 3, as shown in fig. 6, in the step S142, for each of the first contour pixels, the gaussian distribution function value is calculated by using the euclidean distance between each of the matching pixels and the first contour pixel as an argument, and as each gaussian distribution similarity weight between each of the matching pixels and the first contour pixel, the gaussian distribution similarity weight may be refined as:
Step S1421, for each first contour pixel, calculating a gaussian distribution function value by using a minimum euclidean distance corresponding to the first contour pixel as an argument, as a maximum gaussian distribution similarity weight corresponding to the first contour pixel.
As described above, the gaussian distribution similarity weight between the matching pixel of the first contour pixel and the first contour pixel is a gaussian distribution function value calculated by using the euclidean distance between the matching pixel of the first contour pixel and the first contour pixel as an argument. It can be seen from the gaussian distribution function that the gaussian distribution function value is inversely related to the value of the independent variable, that is, the gaussian distribution similarity weight is inversely related to the euclidean distance. Therefore, the minimum Euclidean distance between the first contour pixel and each matched pixel can be determined, and the maximum Gaussian distribution similarity weight corresponding to the first contour pixel can be obtained by calculating the Gaussian distribution function value by taking the minimum Euclidean distance corresponding to the first contour pixel as an independent variable for each first contour pixel.
In this way, for each first contour pixel, only the minimum euclidean distance of the first contour pixel is taken as an independent variable, and the maximum gaussian distribution similarity weight of the first contour pixel is calculated, namely, only the matching pixel which is most similar to the first contour pixel is calculated, and the gaussian distribution similarity weight between the matching pixel and the first contour pixel is not required to be calculated, so that the data processing amount can be reduced, and the resource consumption can be saved.
Based on fig. 3, as shown in fig. 6, the step S150 is based on the gaussian distribution similarity weights between each of the first contour pixels and each of the matching pixels, and the first number of contour pixels, determining the similarity between the reference image and the floating image may include:
And step 151, calculating the sum of the maximum Gaussian distribution similarity weights corresponding to the first contour pixels and the quotient of the number of the first contour pixels as the similarity between the reference image and the floating image.
As an embodiment, the field W may be preset to store the sum of the maximum gaussian distribution similarity weights corresponding to the above-mentioned first contour pixels. And after the maximum Gaussian distribution similar weight corresponding to the first contour pixel is obtained each time, accumulating the maximum Gaussian distribution similar weight into a weight total value W.
As one embodiment, the similarity of similarity between the reference image and the floating image may be calculated by the following formula:
wherein W represents the accumulated weight sum, and N represents the number of the first contour pixels.
Of course, in other embodiments of the present invention, the gaussian distribution function value may be calculated for each first contour pixel by using the euclidean distance between the first contour pixel and each of its matched pixels as an argument, as the gaussian distribution similarity weight between the first contour pixel and each of its matched pixels. And then determining the maximum value of the Gaussian distribution similarity weights between the first contour pixel and each matched pixel as the maximum Gaussian distribution similarity weight corresponding to the first contour pixel.
Based on the similarity of the reference image and the floating image, registration and other operations can be performed on the reference image and the floating image. From the above, the gaussian distribution function change curve is smoother, and the similarity of the first contour pixel and the second contour pixel is measured by using the gaussian distribution similarity weight, so that a smoother similarity change curve can be obtained. When medical image registration is performed, iterative optimization is performed based on the similarity change curve, so that a good effect can be obtained.
As shown in fig. 7, a flowchart of a specific example of the similarity determining method provided in the embodiment of the present invention may specifically include the following steps after the procedure starts:
① . And (5) image reading.
This step includes reference image reading and floating image reading.
② . And carrying out Gaussian filtering smoothing on the reference image and the floating image.
③ . And extracting contour information of the Gaussian filtered and smoothed image by adopting an edge detection algorithm.
In this step, in the embodiment of the present invention, contour extraction is performed on the main content in the reference image and the main content in the floating image, so as to obtain each first contour pixel of the reference image and each second contour pixel of the floating image.
④ . And storing profile information.
I.e. the reference image contour information as well as the floating image contour information is stored. The reference image contour information and the floating image contour information are extracted for the reference image main body content and the floating image main body content, respectively. The reference image contour information includes a gray value and coordinates of each reference image contour pixel, and the floating image contour information includes a gray value and coordinates of each floating image contour pixel, and the like.
⑤ And determining whether the reference image contour point exists, if not, outputting abnormal information to end the program, and if so, executing step ⑥.
The contour points are contour pixels in the embodiment of the present invention.
⑥ . For each reference image contour pixel, taking the contour pixel as a center to make a closed area.
The closed region may be a closed rectangular region with a size of 31×31 centered on the reference image contour pixel coordinates.
⑦ . And searching the outline points of the floating image in the same closed area of the floating image as the matching points of the outline pixels of the reference image.
⑧ . Judging whether a matching point is searched, if not, marking the reference contour pixel point as an unmatched point, if so, calculating the weight value of each matching point according to a Gaussian distribution function based on the Euclidean distance between the point and the reference contour pixel point, and accumulating the weight of the point to a weight total value.
The matching points are the matching pixels in the embodiment of the present invention.
In this embodiment, for a reference contour pixel, the euclidean distance between the reference contour pixel and each matching point in the closed region thereof may be calculated, the minimum euclidean distance is determined therefrom, the minimum euclidean distance is taken as an argument, a gaussian distribution function value is calculated as a gaussian distribution similarity weight, and the weights are accumulated to a total weight value.
⑨ . And judging whether all the contour points are calculated, if not, entering the next contour point, and returning to the step ⑥. If so, then the similarity between the reference image and the floating image = total weight value/total reference image contour point number may be determined.
In the prior art, similarity calculation is mostly based on gray information and feature points, but the two modes have limitations on medical images with more interference information, single image information and less information change, the interference information and noise can cause interference on the similarity calculation based on gray, and the single image information and the less information change can cause the similarity calculation based on the feature points to not accurately extract the feature points.
By applying the embodiment of the invention, the influence of image resolution, noise and uneven illumination on the contour extraction of the target area can be filtered, the contour information, namely the main body part information in the medical image, is extracted, the contour overlapping area of the two images is used as a similarity index, the matching degree of the two medical images can be accurately reflected, and a precondition is provided for the registration of the medical images.
In a second aspect of the implementation of the present invention, a similarity determining device is also provided. As shown in fig. 8, the apparatus may include:
an image acquisition module 810 for acquiring a reference image and a floating image;
The contour extraction module 820 is configured to perform contour extraction on the subject content in the reference image and the subject content in the floating image, so as to obtain each first contour pixel of the reference image and each second contour pixel of the floating image;
A matched pixel determining module 830, configured to determine, for each of the first contour pixels, each second contour pixel located within a preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixel and the preset range, as each matched pixel of the first contour pixel;
A similarity weight calculation module 840 for calculating, for each of the first contour pixels, each gaussian distribution similarity weight between each of the matching pixels of the first contour pixels and the first contour pixels, wherein the gaussian distribution similarity weights are gaussian distribution function values obtained based on similarity distances
A similarity determining module 850, configured to determine a similarity between the reference image and the floating image based on each gaussian distribution similarity weight between each first contour pixel and each matching pixel thereof, and the number of first contour pixels, where the similarity is positively correlated with the gaussian distribution similarity weight and negatively correlated with the number of first contour pixels.
The similarity determining device provided by the embodiment of the invention is used for respectively extracting contours of the main body content in the reference image and the main body content in the floating image to obtain first contour pixels of the reference image and second contour pixels of the floating image, determining second contour pixels which are located in the preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixels and the preset range of the first contour pixels aiming at the first contour pixels, and taking the second contour pixels as the matched pixels of the first contour pixels, and respectively calculating Gaussian distribution similarity weights between the matched pixels of the first contour pixels and the first contour pixels, wherein the Gaussian distribution similarity weights are Gaussian distribution function values obtained based on similarity distances, and the similarity between the reference image and the floating image is determined based on the Gaussian distribution similarity weights between the first contour pixels and the matched pixels and the number of the first contour pixels, wherein the similarity is positive and the Gaussian distribution similarity is negative. According to the embodiment of the invention, the similarity calculation is performed based on the contour pixels of the reference image and the floating image, and because the contour pixels are extracted aiming at the main body contents in the reference image and the floating image, the extracted contour pixels can furthest reserve main body information in the medical image and filter interference information, meanwhile, the similarity between images is measured by using Gaussian distribution similarity weights, and because the Gaussian distribution similarity weights are Gaussian distribution function values obtained by calculating based on similar distances, the smaller the distance between the two pixels is, the larger the Gaussian distribution function value is, and the larger the change rate of the Gaussian distribution curve is, the smaller the similarity between the two images is measured by using the Gaussian distribution similarity weights, so that the tiny change of the two images in the space position can be better reflected, the change relation of the medical images with single information and smaller image change can be more accurately reflected, and the medical image similarity determination accuracy is improved.
In one embodiment of the present invention, the calculating, for each of the first contour pixels, each gaussian distribution similarity weight between each matching pixel of the first contour pixels and the first contour pixels includes:
For each first contour pixel, respectively calculating Euclidean distance between each matching pixel of the first contour pixel and the first contour pixel based on the coordinates of the first contour pixel and the coordinates of each matching pixel;
and calculating Gaussian distribution function values as Gaussian distribution similarity weights between the matched pixels and the first contour pixels by taking Euclidean distances between the matched pixels and the first contour pixels as independent variables for the first contour pixels.
In one embodiment of the invention, the device further comprises a minimum Euclidean distance determination module (not shown in the figure);
the minimum euclidean distance determining module is configured to determine, for each first contour pixel, a minimum value in euclidean distances between each matching pixel of the first contour pixel and the first contour pixel, where the minimum value is a minimum euclidean distance corresponding to the first contour pixel;
the calculating, for each first contour pixel, a gaussian distribution function value with a euclidean distance between each matching pixel and the first contour pixel as an argument, as each gaussian distribution similarity weight between each matching pixel and the first contour pixel, includes:
for each first contour pixel, calculating a Gaussian distribution function value by taking the minimum Euclidean distance corresponding to the first contour pixel as an independent variable, and taking the Gaussian distribution function value as the maximum Gaussian distribution similarity weight corresponding to the first contour pixel;
the determining the similarity between the reference image and the floating image based on the gaussian distribution similarity weights between the first contour pixels and the matching pixels thereof and the first contour pixel number comprises:
And calculating the sum of the maximum Gaussian distribution similarity weights corresponding to the first contour pixels and the quotient of the number of the first contour pixels as the similarity between the reference image and the floating image.
In one embodiment of the present invention, the extracting the contour of the subject content in the reference image and the subject content in the floating image to obtain each first contour pixel of the reference image and each second contour pixel of the floating image includes:
Carrying out Gaussian smoothing filtering on the reference image and the floating image to obtain a filtered reference image and a filtered floating image;
And respectively extracting the outline of the main body content in the filtered reference image and the main body content in the filtered floating image to obtain each first outline pixel of the reference image and each second outline pixel of the floating image.
The embodiment of the present invention also provides an electronic device, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 perform communication with each other through the communication bus 904,
A memory 903 for storing a computer program;
the processor 901 is configured to execute a program stored in the memory 903, and implement the following steps:
Acquiring a reference image and a floating image;
Contour extraction is respectively carried out on the main body content in the reference image and the main body content in the floating image, so that first contour pixels of the reference image and second contour pixels of the floating image are obtained;
For each first contour pixel, determining each second contour pixel within a preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixel and the preset range as each matching pixel of the first contour pixel;
For each first contour pixel, each Gaussian distribution similarity weight between each matching pixel of the first contour pixel and the first contour pixel is calculated, wherein the Gaussian distribution similarity weight is a Gaussian distribution function value obtained based on a similar distance;
And determining the similarity between the reference image and the floating image based on each Gaussian distribution similarity weight between each first contour pixel and each matched pixel thereof and the number of the first contour pixels, wherein the similarity is positively correlated with the Gaussian distribution similarity weight and negatively correlated with the number of the first contour pixels.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor including a central processing unit (Central Processing Unit, CPU), a network Processor (Network Processor, NP), etc., or may be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the above-described similarity determination methods.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the similarity determination methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus, electronic device, storage medium, and program product embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the partial description of the method embodiments being relevant.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (8)

1. A method of similarity determination, the method comprising:
Acquiring a reference image and a floating image;
Contour extraction is respectively carried out on the main body content in the reference image and the main body content in the floating image, so that first contour pixels of the reference image and second contour pixels of the floating image are obtained;
For each first contour pixel, determining each second contour pixel within a preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixel and the preset range as each matching pixel of the first contour pixel;
For each first contour pixel, respectively calculating Euclidean distance between each matching pixel of the first contour pixel and the first contour pixel based on the coordinates of the first contour pixel and the coordinates of each matching pixel;
for each first contour pixel, calculating a Gaussian distribution function value by taking Euclidean distance between each matching pixel and the first contour pixel as an independent variable, and taking the Euclidean distance between each matching pixel and the first contour pixel as each Gaussian distribution similarity weight between each matching pixel and the first contour pixel, wherein the Gaussian distribution similarity weight is a Gaussian distribution function value obtained based on the similarity distance;
And determining the similarity between the reference image and the floating image based on each Gaussian distribution similarity weight between each first contour pixel and each matched pixel thereof and the number of the first contour pixels, wherein the similarity is positively correlated with the Gaussian distribution similarity weight and negatively correlated with the number of the first contour pixels.
2. The method according to claim 1, wherein for each of the first contour pixels, before calculating a gaussian distribution function value as each gaussian distribution similarity weight between each of the matching pixels and the first contour pixels, using a euclidean distance between each of the matching pixels and the first contour pixels as an argument, further comprising:
For each first contour pixel, determining the minimum value in Euclidean distances between each matching pixel of the first contour pixel and the first contour pixel as the minimum Euclidean distance corresponding to the first contour pixel;
the calculating, for each first contour pixel, a gaussian distribution function value with a euclidean distance between each matching pixel and the first contour pixel as an argument, as each gaussian distribution similarity weight between each matching pixel and the first contour pixel, includes:
for each first contour pixel, calculating a Gaussian distribution function value by taking the minimum Euclidean distance corresponding to the first contour pixel as an independent variable, and taking the Gaussian distribution function value as the maximum Gaussian distribution similarity weight corresponding to the first contour pixel;
the determining the similarity between the reference image and the floating image based on the gaussian distribution similarity weights between the first contour pixels and the matching pixels thereof and the first contour pixel number comprises:
And calculating the sum of the maximum Gaussian distribution similarity weights corresponding to the first contour pixels and the quotient of the number of the first contour pixels as the similarity between the reference image and the floating image.
3. The method according to claim 1, wherein the extracting the contours of the subject content in the reference image and the subject content in the floating image to obtain the first contour pixels of the reference image and the second contour pixels of the floating image, respectively, includes:
Carrying out Gaussian smoothing filtering on the reference image and the floating image to obtain a filtered reference image and a filtered floating image;
And respectively extracting the outline of the main body content in the filtered reference image and the main body content in the filtered floating image to obtain each first outline pixel of the reference image and each second outline pixel of the floating image.
4. A similarity determination device, the device comprising:
the image acquisition module is used for acquiring a reference image and a floating image;
The contour extraction module is used for respectively extracting the contour of the main body content in the reference image and the main body content in the floating image to obtain each first contour pixel of the reference image and each second contour pixel of the floating image;
a matching pixel determining module, configured to determine, for each of the first contour pixels, each second contour pixel located within a preset range of the first contour pixel coordinates in the floating image based on the coordinates of the first contour pixel and the preset range, as each matching pixel of the first contour pixel;
The similarity weight calculation module is used for calculating the gaussian distribution similarity weights between each matching pixel of the first contour pixel and the first contour pixel according to each first contour pixel, wherein the gaussian distribution similarity weights are gaussian distribution function values obtained based on similar distances;
the similarity weight calculation module is specifically configured to calculate, for each first contour pixel, a euclidean distance between each matching pixel of the first contour pixel and the first contour pixel based on coordinates of the first contour pixel and coordinates of each matching pixel; for each first contour pixel, calculating a Gaussian distribution function value by taking Euclidean distance between each matching pixel and the first contour pixel as an independent variable, and taking the Gaussian distribution function value as each Gaussian distribution similarity weight between each matching pixel and the first contour pixel;
And the similarity determining module is used for determining the similarity between the reference image and the floating image based on each Gaussian distribution similarity weight between each first contour pixel and each matched pixel thereof and the number of the first contour pixels, wherein the similarity is positively correlated with the Gaussian distribution similarity weight and negatively correlated with the number of the first contour pixels.
5. The apparatus of claim 4, wherein the apparatus further comprises:
The minimum Euclidean distance determining module is used for determining the minimum value of Euclidean distances between each matched pixel of the first contour pixel and the first contour pixel according to each first contour pixel, and the minimum Euclidean distance is the minimum Euclidean distance corresponding to the first contour pixel;
the calculating, for each first contour pixel, a gaussian distribution function value with a euclidean distance between each matching pixel and the first contour pixel as an argument, as each gaussian distribution similarity weight between each matching pixel and the first contour pixel, includes:
for each first contour pixel, calculating a Gaussian distribution function value by taking the minimum Euclidean distance corresponding to the first contour pixel as an independent variable, and taking the Gaussian distribution function value as the maximum Gaussian distribution similarity weight corresponding to the first contour pixel;
the determining the similarity between the reference image and the floating image based on the gaussian distribution similarity weights between the first contour pixels and the matching pixels thereof and the first contour pixel number comprises:
And calculating the sum of the maximum Gaussian distribution similarity weights corresponding to the first contour pixels and the quotient of the number of the first contour pixels as the similarity between the reference image and the floating image.
6. The apparatus of claim 4, wherein the contour extraction of the subject content in the reference image and the subject content in the floating image, respectively, results in each first contour pixel of the reference image and each second contour pixel of the floating image, comprising:
Carrying out Gaussian smoothing filtering on the reference image and the floating image to obtain a filtered reference image and a filtered floating image;
And respectively extracting the outline of the main body content in the filtered reference image and the main body content in the filtered floating image to obtain each first outline pixel of the reference image and each second outline pixel of the floating image.
7. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-3 when executing a program stored on a memory.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-3.
CN202210650612.XA 2022-06-09 2022-06-09 Similarity determination method, device, electronic device and storage medium Active CN115035312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210650612.XA CN115035312B (en) 2022-06-09 2022-06-09 Similarity determination method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210650612.XA CN115035312B (en) 2022-06-09 2022-06-09 Similarity determination method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN115035312A CN115035312A (en) 2022-09-09
CN115035312B true CN115035312B (en) 2025-05-13

Family

ID=83122386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210650612.XA Active CN115035312B (en) 2022-06-09 2022-06-09 Similarity determination method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115035312B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119477924B (en) * 2025-01-16 2025-06-13 新疆天维无损检测有限公司 Method, device, electronic equipment and storage medium for repeated X-ray weld film detection

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199834A (en) * 2014-08-04 2014-12-10 徐�明 Method and system for interactively obtaining and outputting remote resources on surface of information carrier
CN105956539A (en) * 2016-04-27 2016-09-21 武汉大学 Method for height measurement of human body based on background modeling and binocular vision

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763429B (en) * 2010-01-14 2012-01-25 中山大学 Image retrieval method based on color and shape features
US11074495B2 (en) * 2013-02-28 2021-07-27 Z Advanced Computing, Inc. (Zac) System and method for extremely efficient image and pattern recognition and artificial intelligence platform
US9916538B2 (en) * 2012-09-15 2018-03-13 Z Advanced Computing, Inc. Method and system for feature detection
US11914674B2 (en) * 2011-09-24 2024-02-27 Z Advanced Computing, Inc. System and method for extremely efficient image and pattern recognition and artificial intelligence platform
US8873813B2 (en) * 2012-09-17 2014-10-28 Z Advanced Computing, Inc. Application of Z-webs and Z-factors to analytics, search engine, learning, recognition, natural language, and other utilities
US11195057B2 (en) * 2014-03-18 2021-12-07 Z Advanced Computing, Inc. System and method for extremely efficient image and pattern recognition and artificial intelligence platform
CN107665350A (en) * 2016-07-29 2018-02-06 广州康昕瑞基因健康科技有限公司 Image-recognizing method and system and autofocus control method and system
CN107590818B (en) * 2017-09-06 2019-10-25 华中科技大学 An Interactive Video Segmentation Method
CN110276363A (en) * 2018-03-15 2019-09-24 北京大学深圳研究生院 A small bird target detection method based on density map estimation
CN111415376B (en) * 2020-02-27 2023-09-22 湖南大学 Automobile glass subpixel contour extraction method and automobile glass detection method
CN113822361B (en) * 2021-09-18 2024-02-02 重庆大学 SAR image similarity measurement method and system based on Hamming distance
CN113936037B (en) * 2021-10-13 2024-07-23 重庆邮电大学 Extended target tracking method, medium and system for introducing topological features among targets

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199834A (en) * 2014-08-04 2014-12-10 徐�明 Method and system for interactively obtaining and outputting remote resources on surface of information carrier
CN105956539A (en) * 2016-04-27 2016-09-21 武汉大学 Method for height measurement of human body based on background modeling and binocular vision

Also Published As

Publication number Publication date
CN115035312A (en) 2022-09-09

Similar Documents

Publication Publication Date Title
US7787683B2 (en) Tree structure based 2D to 3D registration
CN107480677B (en) Method and device for identifying interest region in three-dimensional CT image
WO2021129323A1 (en) Ultrasound image lesion describing method and apparatus, computer device, and storage medium
US8718363B2 (en) Systems and methods for analyzing image data using adaptive neighborhooding
EP1966760A2 (en) Automatic 3-d object detection
CN113706473B (en) Method for determining long and short axes of focus area in ultrasonic image and ultrasonic equipment
CA3111320A1 (en) Determination of a growth rate of an object in 3d data sets using deep learning
CN115984178B (en) Fake image detection method, electronic device, and computer-readable storage medium
CN112215878B (en) X-ray image registration method based on SURF feature points
CN115035312B (en) Similarity determination method, device, electronic device and storage medium
CN114782715B (en) Vein recognition method based on statistical information
CN114119952B (en) Image matching method and device based on edge information
CN119624978A (en) A method and system for processing medical image data
CN112183618B (en) Similarity determination method and similarity determination device
CN111652277B (en) False positive filtering method, electronic device and computer readable storage medium
CN118279303A (en) Medical image intelligent diagnosis method and system based on deep learning
CN117576408A (en) Optimization method of point cloud feature extraction method and point cloud registration method
CN111753723B (en) Fingerprint identification method and device based on density calibration
CN112634280B (en) MRI image brain tumor segmentation method based on energy functional
CN116012283A (en) A fully automatic ultrasonic image measurement method, device and storage medium
de Bruijne et al. Automated segmentation of abdominal aortic aneurysms in multi-spectral MR images
Malode New approach of statistical analysis for lung disease diagnosis using microscopy images
Le et al. PDM-ENLOR: Learning ensemble of local PDM-based regressions
Povoroznyuk et al. Formalisation of the problem of the matched morphological filtering of biomedical signals and images
Saalbach et al. Optimizing GHT-based heart localization in an automatic segmentation chain

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