Image splicing method for nuclear magnetic resonance positioning line setting

Through image stitching and feature detection technology, panoramic images are generated and positioning lines are added, which solves the problems of coil length limitation and slow feature selection of NMR equipment, and achieves fast and accurate positioning line settings and efficient memory usage.

CN119027309APending Publication Date: 2024-11-26安徽福晴医疗装备有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410973322.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The coil length limitation of the MRI device makes it impossible to obtain the complete image information of the patient. The existing feature selection technology is slow to process on resource-constrained devices, making it difficult to achieve fast and accurate positioning line settings.

Method used

Image prescanning and ORB algorithm are used for feature detection and matching, panoramic images are generated through image stitching, and image data is compressed to improve memory usage and processing speed. Feature extraction is performed using FAST corner detection, BRIEF descriptor and KNN methods. Match, generate Dicom files and add positioning lines.

Benefits of technology

It realizes the acquisition of complete patient anatomical information during the MRI prescanning phase, improves the accuracy and speed of positioning line settings, reduces memory usage, and solves the doctor's need to add positioning lines at specific locations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027309A_ABST
    Figure CN119027309A_ABST
Patent Text Reader

Abstract

The invention discloses an image splicing method for nuclear magnetic resonance positioning line setting, and relates to the technical field of medical image splicing processing. Comprising the steps of image pre-scanning, ORB feature selection, feature matching, projection transformation, image fusion, Dicom file generation, positioning line addition and the like. In order to solve the problem that complete image information of a patient cannot be obtained due to the fact that the length of a device coil is limited, and the problems that detection of feature points in an existing feature selection technology needs to be more complex and consumes more time, and the processing speed is often low on a resource-limited device, the invention provides a panoramic image splicing method. In order to improve the feature selection speed and reduce the memory utilization rate, the pixel information transmitted to the ORB algorithm is compressed in advance, and the final spliced image still uses the original image, so that the quality of the spliced image is not reduced, and through the panoramic image after image splicing, the complete patient anatomical information can be obtained, and the image quality is improved. And a doctor can accurately add the positioning line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of medical image splicing processing, in particular to an image splicing method for setting nuclear magnetic resonance positioning lines. Background Art

[0002] When using MRI equipment to examine patients and perform pre-scanning, due to the limitation of coil length, doctors can only see local anatomical structures and cannot get a panoramic image of the patient, which brings challenges to doctors' need to add positioning lines at specific locations. Figure 2 , Figure 3 They are moving position and fixed position images respectively. It is known that the cervical spine consists of 7 cervical vertebrae. Assuming that we need to add positioning lines to the thoracic spine, we cannot know the exact position by just looking at the fixed position image. If we splice the two sets of images to obtain the spliced ​​image (such as Figure 4 As shown in the figure), we can set and scan the positioning line for the lumbar spine based on the panoramic image.

[0003] In view of the above problems, the present invention provides an image stitching method for positioning line setting, and in order to improve memory usage and stitching speed, the ORB algorithm is used for feature detection, and the image data is compressed before being input into the ORB algorithm. Summary of the invention

[0004] The purpose of the present invention is to provide an image stitching method for setting nuclear magnetic resonance positioning lines, which fills the gap that there is currently no image stitching solution for the nuclear magnetic resonance pre-scanning stage, solves the pain point that doctors need to accurately add positioning lines, and provides a complete solution including image pre-scanning, image stitching, Dicom file generation and positioning line addition scanning.

[0005] The technical problems solved by the present invention are:

[0006] (1) During the MRI pre-scan stage, the equipment coil length is limited and the patient's complete imaging information cannot be obtained;

[0007] (2) Existing feature selection techniques are more complex and time-consuming for feature point detection, and often have slow processing speeds on resource-constrained devices.

[0008] The present invention can be implemented by the following technical solution: An image stitching method for setting a nuclear magnetic resonance positioning line comprises the following steps:

[0009] Step 1: Image pre-scan: Pre-scan the fixed position where the positioning line is placed and the moving position that provides panoramic information respectively, move the bed by a set distance multiple times, so as to shoot multiple parts and obtain sagittal, coronal and transverse slice images;

[0010] Step 2: Image stitching: stitch the sagittal and coronal images separately, extract compressed images from the original images in the fixed and moving positions, use the ORB algorithm for feature extraction and matching, obtain the transformation matrix of each image projected onto the panoramic image, and perform projection transformation on the original image according to the transformation matrix, and fuse them to obtain the completed panoramic image;

[0011] Step 3: Save the fused panoramic image as a Dicom file;

[0012] Step 4: Display the Dicom file and add positioning lines. After completion, you can proceed with the formal scan.

[0013] A further technical improvement of the present invention is that the process of extracting the compressed image is: splicing the sagittal and coronal images of a certain part respectively, and compressing the original image with a pixel depth exceeding 8 bits.

[0014] A further technical improvement of the present invention is that the feature extraction and matching steps of the compressed image specifically include:

[0015] ① Use the FAST corner detection algorithm to obtain feature corner points as feature points and vectorize the feature points;

[0016] ② Use the BRIEF algorithm to generate the descriptor of the feature point and rotate the sampling pattern of BRIEF according to the direction of the feature point vector;

[0017] ③ Use the KNN nearest neighbor method to find the best matching point for each feature point, build a mapping matrix, and use multiple groups of retained best matching points to solve.

[0018] A further technical improvement of the present invention is that the direction of the feature point vector is θ=atan(m 01 ,m 10 ), where m 01 and m 10 are the moments in the y and x directions respectively; the moment is obtained by multiplying the pixel intensity and coordinates of the area around the feature point.

[0019] A further technical improvement of the present invention is that the descriptor generation form of the feature point is expressed as:

[0020]

[0021] Among them, p i and qi is the pixel pair in the neighborhood after the feature point is rotated by θ, n is the length of the descriptor, and 1 is the indicative function.

[0022] A further technical improvement of the present invention is that the process of obtaining the best matching point includes:

[0023] Calculate the Hamming distance of a feature descriptor to all descriptors in another image;

[0024] Select the two closest matching points;

[0025] The feature points corresponding to the matching points whose first candidate distance is less than 75% of the second candidate distance are retained.

[0026] A further technical improvement of the present invention is to use an image pyramid to simulate the appearance of an image at different scales, so that the same features in images scanned under conditions of different sizes and distances can be extracted and matched.

[0027] A further technical improvement of the present invention is that in the stitched panoramic image, the world coordinates of the upper left corner of the panoramic image are calculated based on the world coordinates of the upper left corner of the fixed image and its position in the panoramic image, combined with the pixel spacing and the orientation information of the fixed image.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] The present invention aims at the problem that in the pre-scanning stage of MRI, complete imaging information of the patient cannot be obtained due to the limitation of the coil length of the equipment, and proposes a panoramic image stitching method; and in order to improve the feature selection speed and reduce the memory usage, the pixel information passed to the ORB algorithm is compressed in advance, and the final stitched image still uses the original image, so the quality of the stitched image will not be reduced. Through the panoramic image after image stitching, we can obtain complete anatomical information of the patient, thus solving the need of doctors to add positioning lines at specific and accurate positions. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0031] Figure 1 It is a schematic diagram of the overall method operation flow of the present invention;

[0032] Figure 2 A moving bit scanning image mentioned in the present invention;

[0033] Figure 3 It is a fixed position scanning image mentioned in the present invention;

[0034] Figure 4This is the image after the moving position and the fixed position are spliced ​​in the present invention. DETAILED DESCRIPTION

[0035] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0036] See also Figure 1 As shown, an image stitching method for setting a nuclear magnetic resonance positioning line comprises the following steps:

[0037] Step 1: Pre-scan two groups of different parts

[0038] Set up the shooting process of the pre-scan sequence and set the moving distance of the bed to complete the pre-scan shooting of the moving position and the pre-scan shooting of the fixed position respectively;

[0039] Among them, the pre-scan shooting of the fixed position is used for the subsequent placement of the positioning line, and the pre-scan shooting of the moving position is used to provide the panoramic information that is lacking in the fixed position. In addition, three images of the sagittal, coronal and transverse planes are taken for each part, among which the transverse plane image does not participate in the subsequent stitching process.

[0040] Step 2: Stitch the sagittal and coronal images

[0041] S21, stitching the images of the corresponding slice positions including the sagittal and coronal slices one by one, and compressing the original images with a pixel depth exceeding 8 bits to convert them into 8-bit compressed images to be used;

[0042] S22, passing the 8-bit compressed image to be used obtained in the above step to the ORB algorithm for feature detection. The ORB algorithm uses the FAST corner detection algorithm to detect corners, that is, for each pixel point p in the image, a circular neighborhood (usually 16 pixels) around it is considered. If there are n consecutive pixel points in the circle whose grayscale values ​​are higher than the grayscale value of p by a threshold t or lower than the grayscale value of p minus t, then p is considered to be a feature corner point, that is, a feature point;

[0043] To enhance the invariance to rotation, ORB assigns a direction to each feature point, which is achieved by calculating the intensity-weighted centroid of the pixels around the feature point. The direction θ of the feature point is the angle of the vector from the feature point to the centroid.

[0044] Specifically, the direction of the feature point θ = atan(m 01 ,m 10 ), where m 01 and m 10are the moments in the y and x directions respectively; the moment is obtained by multiplying the pixel intensity and coordinates of the area around the feature point, expressed in m 01 For example: m 01 =Σx, yI(x, y), where x and y are the horizontal and vertical coordinates of the pixel. Take m01 as an example: m01 = Σx, yI(x, y) is the pixel value;

[0045] S23. In order to deal with the feature detection problem that may be caused by scale invariance, ORB achieves a certain degree of scale invariance by using an image pyramid. A series of images of different scales are obtained through the image pyramid, and each layer is a downsampled version of the previous layer of images. This method is used to simulate the appearance of images at different scales. Then, through step S22, the same features taken at different sizes and distances can be detected and matched;

[0046] S24, using the BRIEF descriptor as a basis to generate a descriptor of the feature point, and rotating the sampling pattern of BRIEF for each feature point using the direction calculated in step S22;

[0047] The BRIEF descriptor is a binary string constructed by comparing the intensities of pairs of pixels in the neighborhood of a feature point. If the intensity of the first pixel is less than the intensity of the second pixel, the relevant bit is set to 1, otherwise it is set to 0.

[0048] The descriptor generation of feature points can be expressed in the following form:

[0049]

[0050] Here pi and q i is the pixel pair in the neighborhood after the direction of the feature point in step S21 is rotated by θ, n is the length of the descriptor (255), and 1 is the indicative function;

[0051] S25, using the feature point descriptors detected in step S24 to perform feature matching and calculate and obtain a projection transformation matrix;

[0052] Specifically, we first use the KNN nearest neighbor method to find potential matches for each feature point: usually this involves calculating the Hamming distance of a feature descriptor to all descriptors in another image, selecting the two closest matches, and then only accepting those feature points whose first candidate distance (the best match with the shortest distance) is less than 75% of the second candidate distance;

[0053] Then, the 3x3 single-image matrix H is obtained according to the coordinate positions of the matching feature points in the two images. Assuming that the homogeneous coordinates p of a point in the moving image are (u, v, 1), and the coordinates p' of a point in the fixed image are (u', v', 1), then Hp = p'. Only 4 sets of matching points are needed to complete the calculation of the single-image matrix H.

[0054] S26. Map the moving bit image to the fixed bit image according to the single projection matrix obtained in step S25 to obtain a spliced ​​panoramic image.

[0055] S27, calculating the world coordinates of the upper left corner of the panoramic image according to the world coordinates of the upper left corner of the fixed image and its position in the panoramic image, in combination with the pixel spacing and the orientation information of the fixed image.

[0056] Assume that the coordinates of the fixed image in the world coordinate system are P f [3], in the panoramic image, the distance between the upper left corner of the fixed image and the upper left corner of the panoramic image on the horizontal and vertical axes is X, Y, and the pixel spacing on the horizontal and vertical axes is S x , S y , the horizontal and vertical axis direction vectors of the fixed image plane are D x [3], D y [3]. Then the P of the panoramic image m [3], and P m [i]=P f [i]-X·S x ·D x [i]-Y.S y ·D y [i], where i=0,1,2.

[0057] Step 3: Save the stitched panoramic image as a Dicom file

[0058] Specifically, the panorama, i.e. the complete image after stitching, is combined with the starting position P m , length, width and other Tag value information of fixed images are written and saved in the Dicom file. The Tag value is used to label the information and data contained in the Dicom file, such as image data, patient information, and scanning parameters.

[0059] Step 4: Display the Dicom file and add positioning lines for formal scanning

[0060] Specifically, the spliced ​​Dicom file is displayed as a new pre-scan sequence on the operating software, and then the positioning line is added on the operating software, and finally the formal scanning operation is performed.

[0061] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. An image stitching method for setting a nuclear magnetic resonance positioning line, characterized in that: The steps include: Step 1: Image pre-scan: Pre-scan the fixed position where the positioning line is placed and the moving position that provides panoramic information respectively, move the bed by a set distance multiple times, so as to shoot multiple parts and obtain sagittal, coronal and transverse slice images; Step 2: Image stitching: stitch the sagittal and coronal images separately, extract compressed images from the original images in the fixed and moving positions, use the ORB algorithm for feature extraction and matching, obtain the transformation matrix of each image projected onto the panoramic image, and perform projection transformation on the original image according to the transformation matrix, and fuse them to obtain the completed panoramic image; Step 3: Save the fused panoramic image as a Dicom file; Step 4: Display the Dicom file and add positioning lines. After completion, you can proceed with the formal scan.

2. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 1, characterized in that: The extraction process of the compressed image is: splicing the sagittal and coronal images of a certain part respectively, and compressing the original image with a pixel depth exceeding 8 bits.

3. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 1, characterized in that: The feature extraction and matching steps of the compressed image specifically include: ① Use the FAST corner detection algorithm to obtain feature corner points as feature points and vectorize the feature points; ② Use the BRIEF algorithm to generate the descriptor of the feature point and rotate the sampling pattern of BRIEF according to the direction of the feature point vector; ③ Use the KNN nearest neighbor method to find the best matching point for each feature point, build a mapping matrix, and use multiple groups of retained best matching points to solve.

4. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 3, characterized in that: The direction of the feature point vector is θ=atan(m 01 ,m 10 ), where m 01 and m 10 are the moments in the y and x directions respectively; the moment is obtained by multiplying the pixel intensity and coordinates of the area around the feature point.

5. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 4, characterized in that: The descriptor generation form of the feature point is expressed as: Among them, p i and q i is the pixel pair in the neighborhood after the feature point is rotated by θ, n is the length of the descriptor, and 1 is the indicative function.

6. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 3, characterized in that: The process of obtaining the best matching point includes: Calculate the Hamming distance of a feature descriptor to all descriptors in another image; Select the two closest matching points; The feature points corresponding to the matching points whose first candidate distance is less than 75% of the second candidate distance are retained.

7. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 3, characterized in that: An image pyramid is used to simulate the appearance of an image at different scales, so that the same features in images scanned at different sizes and distances can be extracted and matched.

8. The image stitching method for setting the nuclear magnetic resonance positioning line according to claim 1, characterized in that: In the stitched panoramic image, the world coordinates of the upper left corner of the panoramic image are calculated according to the world coordinates of the upper left corner of the fixed image and its position in the panoramic image, combined with the pixel spacing and the orientation information of the fixed image.