CBCT image splicing method based on feature point matching, electronic device and computer readable storage medium
Patent Information
- Application Number
- CN202611128355.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-04-24
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]本发明的目的在于克服现有技术的不足,提供一种基于特征点匹配的CBCT图像拼接方法、电子设备及计算机可读存储介质,解决现有CBCT图像拼接技术抗运动干扰能力弱、配准精度低、拼接图像存在伪影且硬件成本高的问题,实现大型犬类等宠物的高精准、高画质CBCT大视野成像
(1)抗运动干扰能力强:本发明通过在扫描床上设置位置测量单元,将扫描床的空间位置变化数据作为先验信息引入配准流程,实现硬件辅助的运动补偿粗配准,弥补了纯软件配准对目标对象大幅度运动的敏感性,有效解决宠物扫描时无意识移动导致的配准误差问题,提升了算法的鲁棒性和实时性;
Smart Images

Figure CN122990136A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pet medical image processing technology, specifically relating to a CBCT image stitching method based on feature point matching, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Cone-beam computed tomography (CBCT), as an important medical imaging technique, has been widely used in the clinical diagnosis of veterinary medicine due to its advantage of three-dimensional imaging. CBCT equipment uses a cone beam of X-rays to rotate and scan around the imaging site, combined with a planar detector to acquire projection data, and then reconstructs three-dimensional volumetric data, providing accurate imaging evidence for the diagnosis of veterinary diseases.
[0003] However, due to the physical size of the detectors and the cone angle of the X-ray beam in CBCT equipment, the effective field of view (FOV) of a single scan is significantly limited. In veterinary clinical practice, for the examination of large areas such as the entire abdomen and limbs of large dogs, the limited field of view of a single scan cannot meet the requirements for complete imaging diagnosis.
[0004] In existing technologies, solutions for large field-of-view imaging in CBCT mainly fall into two categories: one is to increase the physical size of the detector and the X-ray source. Although this solution can directly expand the field of view in a single scan, it will significantly increase the manufacturing cost of the equipment and greatly increase the load and inertia of the equipment's mechanical operation, reducing the operational stability of the equipment; the other is to use image stitching technology, which involves performing multiple local scans of the target area at different locations to obtain multiple sets of 3D volume data with partially overlapping areas, and then using post-processing algorithms to stitch and fuse the multiple sets of data into a complete large field-of-view image. This solution does not require significant changes to the hardware structure and is a more cost-effective choice.
[0005] However, existing CBCT image stitching technology still has many technical shortcomings in practical applications in veterinary medicine: First, pets are prone to unconscious slight movements during multiple scans, leading to inconsistencies in the spatial positions of image data from different scan sequences, resulting in registration errors and affecting the stitching effect; Second, existing stitching technologies mostly rely on grayscale-based registration methods, which have poor robustness when faced with pet displacement or differences in image noise between different scan batches, and are prone to obvious artifacts or grayscale jumps at the stitching seams, reducing the diagnostic value of the images; Third, some stitching schemes rely on precise mechanical structure adjustments to achieve multi-position scanning, which not only increases hardware design and after-sales installation costs but also reduces the flexibility of scanning operations.
[0006] Therefore, there is an urgent need for a CBCT image stitching method based on feature point matching that is suitable for pet medical scenarios, especially for the large field-of-view imaging needs of large dogs, and has the advantages of anti-motion interference, high registration accuracy, good image stitching quality, and controllable cost. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a CBCT image stitching method, electronic device and computer-readable storage medium based on feature point matching. This invention solves the problems of weak anti-motion interference ability, low registration accuracy, artifacts in stitched images and high hardware cost of existing CBCT image stitching technology, and realizes high-precision, high-quality CBCT large-field-of-view imaging for large dogs and other pets.
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The CBCT image stitching method based on feature point matching, implemented using a CBCT imaging system, includes the following steps: S1. Set scanning parameters and get in position: The user sets the starting position of the target object and the number of scanning segments N through the interactive interface. After receiving the scanning parameters, the motion system automatically calculates the movement path and moves to the starting position of the scan to complete the scanning and wait for the scan to start. N is a positive integer greater than or equal to 2. S2. Multi-stage scanning and simultaneous acquisition of dual types of data: Based on the scanning parameters of S1, the scanning is started, and the CBCT imaging system is controlled to perform N local scans on the target object in sequence, and the 3D volume data corresponding to the first to Nth scans are acquired simultaneously. The 3D volume data of two adjacent scans form a preset overlapping area in space. At the same time, the spatial position change data of the scanning bed is recorded in real time through the position measurement unit set on the scanning bed, providing hardware data support for subsequent registration. S3. Perform coarse registration based on hardware data: Call the spatial position change data recorded in S2, calculate the rigid body transformation matrix between the 3D volume data of two adjacent scans as the initial registration parameter, transform the 3D volume data of the next scan to the coordinate system of the 3D volume data of the previous scan through the rigid body transformation matrix, complete the coarse registration based on hardware motion compensation, and obtain the adjacent 3D volume data after coarse registration. S4. Perform fine registration of feature points based on coarse registration results: For adjacent 3D volume data after coarse registration obtained in S3, extract image feature points near the registration positions of the two and perform feature point matching operations. Repeat the feature point matching operations multiple times and take the average of the results to obtain the optimized fine registration matrix. Update the overlapping area of adjacent 3D volume data after coarse registration through the fine registration matrix to complete the fine registration and obtain the 3D volume data of the first to Nth scans after fine registration. S5. Generate a large field-of-view image by fusing the results of precise registration: Based on all the 3D volume data obtained from S4 after precise registration, they are uniformly fused into the same blank 3D matrix. In the preset overlapping area of adjacent 3D volume data, a fusion algorithm based on distance weight is used to smooth the gray value of the image, eliminate the stitching seams, and finally generate a complete large field-of-view 3D image.
[0009] Preferably, the feature point matching operation in S4 adopts a coarse-to-fine pyramid sampling matching method, specifically including: S41. Using the overlapping region image of the 3D volume data from the previous scan after coarse registration in S3 as a template image, pyramid sampling is performed to obtain multi-layer template sampling images, and the contour information of each layer of template sampling images is extracted. S42. Using the overlapping region image of the 3D volume data from the next scan after coarse registration in S3 as the search image, perform the same pyramid sampling and contour extraction operations as in S41 to obtain a multi-layer search sampling image. S43. In the template sampling image and the search sampling image at the top layer of the pyramid, calculate the similarity score between them according to the similarity criterion. If the similarity score is greater than the set threshold, determine the matching position and angle of the layer, and use the matching position and angle as the initial search parameters for the next layer of the pyramid after magnifying them by 2 times. If the similarity score is less than or equal to the set threshold, the search is determined to have failed. S44. Repeat S43 until the bottom layer of the pyramid to obtain the precise matching position and angle. If the similarity score of the bottom layer is greater than the set threshold, the precise pose of the template image in the search image is determined; otherwise, the feature point matching is deemed to have failed. S45. Construct an affine transformation matrix based on the precise pose, and use it as the registration matrix obtained from the feature point matching operation.
[0010] Preferably, the similarity criterion in S43 is calculated by the average of the normalized gradient vector dot product, specifically using the following formula: .
[0011] Preferably, when calculating the similarity score in step S43, an improved termination condition is used, and the specific formula is as follows: .
[0012] Preferably, in step S5, the distance-weighted fusion algorithm dynamically adjusts the weight factor according to the distance from the pixel to the splicing seam, as shown in the following formula: .
[0013] Preferably, the spatial position change data in S2 includes the moving distance and rotation angle of the scanning bed, and the rigid body transformation matrix in S3 is constructed based on the moving distance and rotation angle of the scanning bed to achieve motion compensation for the macroscopic displacement of the target object.
[0014] The present invention also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described CBCT image stitching method based on feature point matching.
[0015] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described CBCT image stitching method based on feature point matching.
[0016] By adopting the above technical solution, the present invention has the following beneficial effects: (1) Strong resistance to motion interference: This invention sets up a position measurement unit on the scanning bed and introduces the spatial position change data of the scanning bed as prior information into the registration process to realize hardware-assisted motion compensation coarse registration, which makes up for the sensitivity of pure software registration to large-scale movement of the target object, effectively solves the registration error problem caused by unconscious movement during pet scanning, and improves the robustness and real-time performance of the algorithm. (2) High registration accuracy: Based on the hardware coarse registration, this invention adopts the feature point matching method of pyramid sampling to achieve fine registration. Combined with the normalized similarity criterion and the improved search termination condition, it can finely correct the rigid deformation of local areas, especially adapting to the small changes in the pet's abdominal tissue, so that the splicing accuracy reaches the voxel level. (3) Excellent image quality: The present invention adopts a distance-weighted fusion algorithm in the overlapping area, dynamically adjusts the weight according to the distance from the pixel to the splicing seam, realizes the smooth transition of gray value, effectively eliminates gray value abrupt change and artifact at the splicing seam, ensures the continuity and uniformity of the reconstructed image in HU value, and avoids the influence of ring artifacts and band artifacts on clinical diagnosis. (4) High cost-effectiveness: This invention does not require increasing the hardware size of the detector and radiation source, nor does it require designing a precise mechanical adjustment structure. It only increases the hardware cost of a small number of position measurement units and combines software algorithm optimization to achieve large field of view imaging, achieving an imaging effect comparable to spiral CT, which greatly reduces the production, design and after-sales costs of the equipment. (5) High operational flexibility: This invention supports user-defined settings for the scanning start position and the number of scanning segments N, enabling continuous scanning and stitching of any number of segments on different parts of large dogs, such as the whole body, abdomen, and limbs, to meet the diverse imaging needs of pet medical clinical practice. In summary, this invention has the advantages of strong anti-motion interference capability, high registration accuracy, excellent stitched image quality, low hardware cost, and the ability to achieve high-precision, high-quality CBCT large-field imaging for large dogs and other pets. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall process of the present invention; Figure 2 This is an example of the image to be stitched according to the present invention; Figure 3 This is an example of the image to be stitched in this invention; Figure 4 This is an example of a stitched 3D image from the present invention; Figure 5 This is an example of splicing and cutting the mosaic according to the present invention. Detailed Implementation
[0018] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0019] The components of the embodiments of the invention described and shown in the accompanying drawings can typically be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention.
[0020] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0022] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0023] Example 1 In this embodiment, a CBCT image stitching method, electronic device, and computer-readable storage medium based on feature point matching are proposed. This method can solve the problems of weak anti-motion interference capability, low registration accuracy, artifacts in stitched images, and high hardware cost of existing CBCT image stitching technology. It can achieve high-precision, high-quality CBCT large-field imaging of the whole body, abdomen, and limbs of large dogs and other pets.
[0024] like Figures 1-5 As shown, in one embodiment of the present invention, the CBCT image stitching method based on feature point matching is implemented using a CBCT imaging system and includes the following steps: S1. Set scanning parameters and get in position: The user sets the starting position of the target object and the number of scanning segments N through the interactive interface. After receiving the scanning parameters, the motion system automatically calculates the movement path and moves to the starting position of the scan to complete the scanning and wait for the scan to start. N is a positive integer greater than or equal to 2, that is, the user sets the starting segment and the number of shooting segments N through the interactive interface. S2. Multi-stage scanning and simultaneous acquisition of dual-type data: Based on the scanning parameters of S1, the scanning is started, and the CBCT imaging system is controlled to perform N local scans on the target object in sequence, simultaneously acquiring the 3D volume data corresponding to the 1st to Nth scans, and making the 3D volume data of two adjacent scans form a preset overlapping area in space. At the same time, through the position measurement unit set on the scanning bed, the spatial position change data of the scanning bed in each scanning stage is recorded in real time, providing hardware data support for subsequent registration. The spatial position change data mentioned in S2 includes the moving distance and rotation angle of the scanning bed. That is, the CBCT imaging system captures the corresponding original image according to the scanning parameters set by the user and reconstructs the three-dimensional data to be stitched R(i), and records the current shooting position T(i) and angle A(i) according to the sensor information. S3. Coarse registration based on hardware data: The spatial position change data recorded in S2 is called, and the rigid transformation matrix between the 3D volume data of two adjacent scans is calculated as the initial registration parameter. The 3D volume data of the later scan is transformed to the coordinate system of the 3D volume data of the previous scan using the rigid transformation matrix, completing the coarse registration based on hardware motion compensation, and obtaining the coarsely registered adjacent 3D volume data. The rigid transformation matrix in S3 is constructed based on the moving distance and rotation angle of the scanning bed to achieve motion compensation for the macroscopic displacement of the target object. That is, based on the sensor information of the CBCT imaging system gantry, an initial registration matrix Tan(i) is constructed, and R(i-1)*Tan(i) is calculated to obtain the initially transformed data R1(i). The above transformation operation is performed iteratively on each data to be stitched. , where T is the scanning bed movement distance collected by the sensor; S4. Perform fine registration based on coarse registration results: For the adjacent 3D volume data after coarse registration obtained in S3, extract image feature points near the registration positions of the two and perform feature point matching operations. Repeat the feature point matching operations multiple times and take the average of the results to obtain the optimized fine registration matrix. Update the overlapping area of the adjacent 3D volume data after coarse registration through the fine registration matrix to complete the fine registration and obtain the 3D volume data of the first to Nth scans after fine registration. That is, perform feature point matching operations on R1(i-1) and R1(i) to obtain the fine registration matrix Tan1(i), and perform matrix operations on R1(i)*Tan1(i) to obtain the final transformed R2(i). The feature point matching operation in S4 adopts a coarse-to-fine pyramid sampling matching method, specifically including: S41. Using the overlapping region image of the 3D volume data from the previous scan after coarse registration in S3 as a template image, pyramid sampling is performed to obtain multi-layer template sampling images, and the contour information of each layer of template sampling images is extracted. S42. Using the overlapping region image of the 3D volume data from the next scan after coarse registration in S3 as the search image, perform the same pyramid sampling and contour extraction operations as in S41 to obtain a multi-layer search sampling image. S43. In the template sampling image and the search sampling image at the top layer of the pyramid, calculate the similarity score between them according to the similarity criterion. If the similarity score is greater than the set threshold, determine the matching position and angle of the layer, and use the matching position and angle as the initial search parameters for the next layer of the pyramid after magnifying them by 2 times. If the similarity score is less than or equal to the set threshold, the search is determined to have failed. Specifically, after the template cropped from the above image is processed by the Canny edge detection operator, the resulting template edges are converted into a series of point sets. For each point i = 1, 2, 3, ..., n, there is a gradient direction vector. The image being searched can also be converted into a set of points and a corresponding direction vector. In S43, the similarity criterion is calculated using the average of the normalized gradient vector dot product. During template matching, the similarity metric is calculated between the template after affine transformation and the sub-image of the search image at a certain position to obtain the similarity. The rotation transformation expression for the gradient vector of the edge points in the template is: ,in, ,in, This represents the original gradient direction vector (or edge point direction vector) of the i-th edge feature point in the template image, representing the vector state before transformation. This represents the gradient direction vector of the i-th edge feature point in the template image after rotation transformation, and signifies the transformed vector state. Representing a two-dimensional rotation matrix, the parameter θ is the rotation angle calculated during feature point matching, used to perform a rotation transformation on the original vector di. i represents the index of the edge feature point, traversing all extracted edge feature points in the template (i=1,2,…,n, where n is the total number of feature points). This formula describes the rotation transformation process of the gradient direction vector of the template edge feature points, using the rotation matrix R(θ) to transform the original gradient vector. Perform a rotation transformation with an angle of θ to obtain a rotated vector aligned with the pose of the sub-image of the search image. This lays the foundation for subsequent similarity measurement calculations; Search a location in the image At the sub-image, the similarity metric function is: This function calculates the average of the dot product of the gradient vectors of corresponding edge points of the template and the sub-image. The dot product reaches its maximum value when the gradient directions of a pair of corresponding edge points are the same; it is zero when the gradient directions are orthogonal; and it reaches a negative maximum value when the gradient directions are opposite. This represents the original similarity metric between the template and the search sub-image (mean of the dot product of gradient vectors, unnormalized). This represents the total number of edge feature points participating in the matching within the template. This represents the index of the edge feature points, and the traversal range is i = 1, 2, ..., n. This indicates that the average of the summation results is used to obtain a similarity measure for a single location. Let q+p′ represent the gradient direction vector in the subimage of the search image corresponding to the i-th point of the template, and let q+p′ represent the position offset of the subimage in the search image. This represents the x-component of the gradient vector at the i-th feature point of the template. This represents the y-component of the gradient vector at the i-th feature point of the template. , This represents the x-component of the gradient vector at the corresponding point in the search sub-image, with coordinates... This indicates the actual position of the sub-image in the search graph. y represents the y-component of the gradient vector of the corresponding point in the search sub-image, where x and y represent the center coordinates of the sub-image to be matched in the search image. and This represents the local coordinate offset of the i-th feature point in the template relative to the template center. This formula quantifies the directional consistency between the template and the search sub-image by calculating the average of the dot product of their corresponding gradient vectors. A larger dot product indicates a more consistent gradient direction and higher similarity. It is the unnormalized original similarity measure, which provides the basis for the normalization process of the subsequent formula (1-3); The calculated similarity metric is inconvenient for determining whether a sub-image meets the requirements; that is, it is difficult to determine a threshold to filter the desired results. Therefore, the above similarity metric function is normalized to obtain the normalized similarity metric formula: This formula normalizes the sum of the dot products of the direction vectors of all corresponding points in the sub-image at point (x,y) of the transformed template and the search image. Because the direction vectors are normalized, the similarity measure is invariant to any change in illumination. Regardless of whether there is noise in the template or the search image, the direction vectors caused by noise are random and, on average, do not contribute to the above summation formula, thus exhibiting good anti-interference properties. Furthermore, the value range of this formula is […]. [1,1], a return value of 1 indicates a perfect match between the template and the search sub-image; a return value of -1 indicates opposite image polarity. This similarity measure is also effective in handling partial occlusion and cluttered situations. The return value is approximately proportional to the visible portion. This represents the normalized similarity score between the template and the search sub-image. This represents the gradient vector of the i-th feature point of the template. gradient vector corresponding to the search sub-image The inner product, This represents the gradient vector of the i-th feature point of the template. The length of the mold, This represents the gradient vector corresponding to the search sub-image. The modulus length; In S43, an improved termination condition is used when calculating the similarity score. The termination condition for calculating the similarity measure first uses the partial sum formula of the similarity measure, specifically: ,in, This represents the normalized dot product sum of the first j feature points, used to measure the total contribution of the calculated feature points to the overall similarity. It is the gradient direction vector of the i-th feature point in the template after rotation transformation. It is the gradient direction vector corresponding to the i-th point of the template in the search sub-image, with the subscript... This indicates the offset of the sub-image's position in the search graph; This is the coefficient used to average the dot product results of the first j feature points. The core function of this formula is to periodically summarize and average the calculated gradient vector dot product results of the first j feature points, providing basic data support for subsequent termination condition judgments. This avoids the inefficiency caused by calculating all feature points at once. It uses a step-by-step accumulation method to provide real-time feedback on the similarity trend of the current matching position. As can be seen from the normalized similarity metric formula, the sum of the remaining nj terms is less than (n... j) / n=1 Therefore, the similarity metric calculation can be terminated early when the partial sum satisfies the following formula, where... The specific formula for the set threshold is as follows: The formula sets an early termination threshold for similarity calculation, where the partial sum of the current j feature points... When the value is below this threshold, the current search position is directly determined not to meet the matching requirements, and there is no need to continue calculating the remaining feature points, thereby reducing invalid calculations and improving the overall efficiency of feature point matching. Considering that the target image may have partial occlusion and hiding in actual matching, an improved termination condition is proposed. The first part uses a lenient threshold judgment, and the remaining part uses a stricter threshold judgment. This is achieved by setting a preset coefficient g, resulting in the improved termination condition formula, which is as follows: In this formula, when g=1, all points are subject to a strict termination condition; when g=0, all points are subject to a lenient termination condition. Generally, to avoid false positives, the parameter g is usually set to 0.9. This improved similarity measurement termination condition formula is designed to adapt to scenarios where the target image may have partial occlusion or hidden feature points. By balancing the lenient and strict termination logic through the weight coefficient g, it ensures matching accuracy, avoids misjudging valid matching positions due to partial occlusion, and maintains high computational efficiency, achieving a precise matching process of "lenient screening in the first half and strict verification in the second half." S44. Repeat S43 until the bottom layer of the pyramid to obtain the precise matching position and angle. If the similarity score of the bottom layer is greater than the set threshold, the precise pose of the template image in the search image is determined; otherwise, the feature point matching is deemed to have failed. S45. Construct an affine transformation matrix based on the precise pose, and use it as the registration matrix obtained from the feature point matching operation.
[0025] S5. Generate a large field-of-view image by fusing the results of precise registration: Based on all the 3D volume data obtained from S4 after precise registration, they are uniformly fused into the same blank 3D matrix. In the preset overlapping area of adjacent 3D volume data, a distance-weighted fusion algorithm is used to smooth the gray values of the image to eliminate the stitching seams and finally generate a complete large field-of-view 3D image. That is, gradient domain fusion is performed on R2(i-1) and R2(i) to obtain the final stitched image. Finally, the stitched large field-of-view 3D image data is output.
[0026] The distance-weighted fusion algorithm in S5 dynamically adjusts the weight factor according to the distance from the pixel to the splicing seam. The specific fusion formula is as follows: ,in, The fused image in coordinates The final grayscale value (HU value) at that location. These are the two-dimensional spatial coordinates of pixels within the overlapping region of the image; It is a distance weighting factor, dynamically determined by the distance from each pixel to the seam. The closer the pixel is to the seam, the greater the weighting factor. The smaller the size, the farther the distance. The larger, It is the complementary weight factor of the second image to be stitched together, and The sum of them is always 1; The first 3D volume data to be stitched together is in coordinates The original grayscale value (HU value) at the location; The second 3D volume data to be stitched together is in coordinates The original grayscale value (HU value) at the location; this formula achieves a smooth transition of grayscale values in the overlapping area by dynamically adjusting the weight ratio of the two images, eliminating splicing seams and grayscale jumps.
[0027] This invention also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the aforementioned CBCT image stitching method based on feature point matching.
[0028] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described CBCT image stitching method based on feature point matching.
[0029] In this invention, taking large-field CBCT imaging of the abdomen of large dogs as an example, the number of scanning segments N is set to 2, the scanning bed movement distance is collected by a laser position sensor, the feature point matching operation is repeated 5 times and the average value is taken, the similarity threshold is set to 0.7, the improved termination condition coefficient g is set to 0.9, and the scanning, registration and fusion operations are performed according to the steps of Example 1. Finally, a large-field 3D image of the abdomen with no stitching artifacts and continuous gray values can be obtained. The stitching accuracy reaches the voxel level, which meets the imaging requirements of clinical diagnosis in pet medicine.
[0030] This embodiment does not impose any limitation on the shape, material, structure, etc. of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the technical solution of the present invention.
Claims
1. A CBCT image stitching method based on feature point matching, implemented using a CBCT imaging system, characterized in that, Includes the following steps: S1. Set scanning parameters and get in position: The user sets the starting position of the target object and the number of scanning segments N through the interactive interface. After receiving the scanning parameters, the motion system automatically calculates the movement path and moves to the starting position of the scan to complete the scanning and wait for the scan to start. N is a positive integer greater than or equal to 2. S2. Multi-stage scanning and simultaneous acquisition of dual types of data: Based on the scanning parameters of S1, the scanning is started, and the CBCT imaging system is controlled to perform N local scans on the target object in sequence, and the 3D volume data corresponding to the first to Nth scans are acquired simultaneously. The 3D volume data of two adjacent scans form a preset overlapping area in space. At the same time, the spatial position change data of the scanning bed is recorded in real time through the position measurement unit set on the scanning bed, providing hardware data support for subsequent registration. S3. Perform coarse registration based on hardware data: Call the spatial position change data recorded in S2, calculate the rigid body transformation matrix between the 3D volume data of two adjacent scans as the initial registration parameter, transform the 3D volume data of the next scan to the coordinate system of the 3D volume data of the previous scan through the rigid body transformation matrix, complete the coarse registration based on hardware motion compensation, and obtain the adjacent 3D volume data after coarse registration. S4. Perform fine registration of feature points based on coarse registration results: For adjacent 3D volume data after coarse registration obtained in S3, extract image feature points near the registration positions of the two and perform feature point matching operations. Repeat the feature point matching operations multiple times and take the average of the results to obtain the optimized fine registration matrix. Update the overlapping area of adjacent 3D volume data after coarse registration through the fine registration matrix to complete the fine registration and obtain the 3D volume data of the first to Nth scans after fine registration. S5. Generate a large field-of-view image by fusing the results of precise registration: Based on all the 3D volume data obtained in S4 after precise registration, they are uniformly fused into the same blank 3D matrix. In the preset overlapping area of adjacent 3D volume data, a fusion algorithm based on distance weight is used to smooth the gray value of the image, eliminate the stitching seams, and finally generate a complete large field-of-view 3D image.
2. The CBCT image stitching method based on feature point matching according to claim 1, characterized in that: The feature point matching operation in S4 adopts a coarse-to-fine pyramid sampling matching method, specifically including: S41. Using the overlapping region image of the 3D volume data from the previous scan after coarse registration in S3 as a template image, pyramid sampling is performed to obtain multi-layer template sampling images, and the contour information of each layer of template sampling images is extracted. S42. Using the overlapping region image of the 3D volume data from the next scan after coarse registration in S3 as the search image, perform the same pyramid sampling and contour extraction operations as in S41 to obtain a multi-layer search sampling image. S43. In the template sampling image and the search sampling image at the top layer of the pyramid, calculate the similarity score between them according to the similarity criterion. If the similarity score is greater than the set threshold, determine the matching position and angle of the layer, and use the matching position and angle as the initial search parameters for the next layer of the pyramid after magnifying them by 2 times. If the similarity score is less than or equal to the set threshold, the search is determined to have failed. S44. Repeat S43 until the bottom layer of the pyramid to obtain the precise matching position and angle. If the similarity score of the bottom layer is greater than the set threshold, the precise pose of the template image in the search image is determined; otherwise, the feature point matching is deemed to have failed. S45. Construct an affine transformation matrix based on the precise pose, and use it as the registration matrix obtained from the feature point matching operation.
3. The CBCT image stitching method based on feature point matching according to claim 2, characterized in that: The similarity criterion in S43 is calculated by averaging the normalized gradient vector dot product, and the specific formula is as follows: 。 4. The CBCT image stitching method based on feature point matching according to claim 2, characterized in that: In step S43, when calculating the similarity score, an improved termination condition is used, and the specific formula is as follows: 。 5. The CBCT image stitching method based on feature point matching according to claim 1, characterized in that: The distance-weighted fusion algorithm in S5 dynamically adjusts the weight factor according to the distance from the pixel to the splicing seam. The specific formula is as follows: 。 6. The CBCT image stitching method based on feature point matching according to claim 1, characterized in that: The spatial position change data mentioned in S2 includes the moving distance and rotation angle of the scanning bed. The rigid body transformation matrix mentioned in S3 is constructed based on the moving distance and rotation angle of the scanning bed to achieve motion compensation for the macroscopic displacement of the target object.
7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the CBCT image stitching method based on feature point matching as described in any one of claims 1 to 6.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the steps of the CBCT image stitching method based on feature point matching as described in any one of claims 1 to 6.