Image alignment and registration method, controller and storage medium

Through the dual-stage processing of coarse registration and refined alignment of the image alignment registration method, the problem of limited image registration effect in the prior art is solved, and high-precision image alignment is achieved, which is suitable for images with low contrast or texture deficiency.

CN119515930APending Publication Date: 2025-02-25SHENZHEN GREENING ARTIFICIAL INTELLIGENCE & ROBOTICS RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411522377.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art has limited image registration effect when processing images with low contrast or texture deficiency, making it difficult to achieve high-precision alignment.

Method used

An image alignment registration method is proposed. By obtaining information of the first image and the second image to be aligned, coarse registration is performed to obtain the third image, and then outputting the fourth image through a refined alignment process, improving the alignment accuracy.

Benefits of technology

Through the dual-stage processing of coarse registration and refined alignment, high accuracy of image alignment is achieved, especially when processing images with low contrast or texture-deficient registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515930A_ABST
    Figure CN119515930A_ABST
Patent Text Reader

Abstract

The invention discloses an image alignment and registration method, a controller and a storage medium, and the method comprises the steps: firstly, obtaining a to-be-aligned first image and a to-be-aligned second image, the first image comprising first image information, and the second image comprising second image information; thirdly, performing coarse registration on the first image and the second image according to the first image information and the second image information to obtain a third image; and finally, performing fine alignment according to the third image to output a fourth image. Therefore, according to the embodiment of the invention, the third image is obtained by performing coarse registration on the first image and the second image which are to be aligned, and the fourth image is output by performing fine alignment on the third image, so that the accuracy of image alignment and registration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image alignment and registration method, a controller and a storage medium. Background Art

[0002] In the related technology, the traditional image registration technology in semiconductor chip and wafer inspection includes the method based on feature points. The method based on feature points realizes registration by detecting and matching key points such as corners and edges in the image. It is suitable for images with obvious features, but has limited effect when processing images with low contrast or lack of texture. Therefore, how to perform image registration has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes an image alignment and registration method, a controller and a storage medium, aiming to improve the accuracy of image alignment and registration.

[0004] In a first aspect, an embodiment of the present application provides an image alignment and registration method, comprising: Acquire a first image and a second image to be aligned, wherein the first image includes first image information and the second image includes second image information; performing coarse registration on the first image and the second image according to the first image information and the second image information to obtain a third image; Refined alignment is performed according to the third image to output a fourth image.

[0005] According to some embodiments of the present application, the first image information includes a first image contour line and a first image width, the second image information includes a second image contour line and a second image width, and the coarsely registering the first image and the second image according to the first image information and the second image information to obtain a third image includes: The position and size of the first image are adjusted according to the first image contour line, the second image contour line, the first image width, and the second image width, and the adjusted first image is used as the third image.

[0006] According to some embodiments of the present application, adjusting the position and size of the first image according to the first image contour line, the second image contour line, the first image width, and the second image width includes: Rotate the first image according to the contour line and the horizontal line of the first image so that the feature direction of the first image is consistent with the feature direction of the second image; performing translation processing on the first image after the rotation processing according to the first image contour line and the second image contour line, so that the contour of the first image after the rotation processing coincides with the contour of the second image; The first image after the translation processing is enlarged or reduced according to the first image width and the second image width, so that the size of the first image after the translation processing is consistent with the size of the second image.

[0007] According to some embodiments of the present application, the method further includes: Acquire key point features of the first image and the second image through a ResNet18 residual network; The key points at similar positions are determined according to the key point features, and the key points at similar positions are clustered to determine the key feature matrix.

[0008] According to some embodiments of the present application, the method further includes: Performing Gaussian filtering on the first image to obtain a smoothed image; Downsampling the smoothed image according to a preset number of image layers to obtain multiple image layers; Feature extraction is performed on each of the image layers, and weighted summation is performed on the extracted features to obtain a unified feature representation.

[0009] According to some embodiments of the present application, the method further includes: The BAM attention module adaptively adjusts channel and spatial feature responses and suppresses irrelevant features.

[0010] According to some embodiments of the present application, performing refined alignment according to the third image to output a fourth image includes: Performing feature segmentation on the third image to obtain a plurality of first feature regions; Performing feature segmentation on the second image to obtain a plurality of second feature regions; Matching alignment and matching degree calculation are performed according to the plurality of first feature regions and the plurality of second feature regions to output the fourth image.

[0011] According to some embodiments of the present application, performing matching alignment and matching degree calculation according to the plurality of the first feature regions and the plurality of the second feature regions to output the fourth image includes: Performing matching and alignment according to the features of the first feature area and the features of the second feature area; Calculating the image matching degree between the third image and the second image after matching and alignment; When the image matching degree is less than the preset matching degree, returning to the step of performing feature matching and alignment according to the features of the first feature area and the features of the second feature area until the image matching degree is greater than or equal to the preset matching degree; When the image matching degree is greater than or equal to the preset matching degree, it is determined to output the fourth image.

[0012] In a second aspect, an embodiment of the present application provides a controller comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes an image alignment and registration method according to the first aspect when executing the computer program.

[0013] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute an image alignment and registration method as described in the first aspect above.

[0014] According to some embodiments of the present application, according to the technical solution of the embodiment of the present application, at least the following beneficial effects are achieved: the present application discloses an image alignment method, a controller and a storage medium, the method comprising: first, obtaining a first image and a second image to be aligned, wherein the first image includes first image information and the second image includes second image information; then, coarsely aligning the first image and the second image according to the first image information and the second image information to obtain a third image; finally, performing fine alignment according to the third image to output a fourth image. Therefore, the embodiment of the present application can improve the accuracy of image alignment by coarsely aligning the first image and the second image to be aligned to obtain the third image, thereby performing fine alignment through the third image to output the fourth image.

[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0017] Figure 1 is a flow chart of an image alignment and registration method provided by an embodiment of the present application; Figure 2 is a flow chart of an image alignment and registration method provided by another embodiment of the present application; Figure 3 is a flow chart of an image alignment and registration method provided by another embodiment of the present application; Figure 4 is a flow chart of an image alignment and registration method provided by another embodiment of the present application; Figure 5 is a flow chart of an image alignment and registration method provided by another embodiment of the present application; Figure 6 is a flow chart of an image alignment and registration method provided by another embodiment of the present application; Figure 7 It is a structural schematic diagram of a controller for executing an image alignment and registration method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0018] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0019] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0020] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0021] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.

[0022] In some cases, traditional image registration technologies in semiconductor chip and wafer inspection include feature point-based methods, which achieve registration by detecting and matching key points such as corners and edges in images. They are suitable for images with obvious features, but have limited effects when processing images with low contrast or lack of texture. Therefore, how to perform image registration has become a technical problem that needs to be solved urgently.

[0023] Based on the above situation, the present application proposes an image alignment and registration method, a controller and a storage medium, aiming to improve the accuracy of image alignment and registration.

[0024] The following further describes various embodiments of the image alignment and registration method of the present application in conjunction with the accompanying drawings.

[0025] like Figure 1 As shown, Figure 1 It is a flow chart of an image alignment and registration method provided by an embodiment of the present application; the control method includes but is not limited to step S110, step S120 and step S130.

[0026] Step S110, acquiring a first image and a second image to be aligned, wherein the first image includes first image information, and the second image includes second image information; Step S120, coarsely registering the first image and the second image according to the first image information and the second image information to obtain a third image; Step S130: Perform refined alignment according to the third image to output a fourth image.

[0027] In one embodiment, first, the embodiment of the present application acquires a first image and a second image to be aligned, wherein the first image includes first image information and the second image includes second image information; then, the embodiment of the present application performs a coarse alignment on the first image and the second image based on the first image information and the second image information, thereby taking the first image roughly aligned with the second image as the third image; finally, the third image is finely aligned with the second image to output a fourth image.

[0028] It is worth noting that the embodiment of the present application performs coarse alignment on the first image and the second image to be aligned to obtain a third image, and then performs fine alignment on the third image to output a fourth image, thereby improving the accuracy of image alignment.

[0029] It can be understood that the embodiment of the present application can achieve pixel-level alignment and matching by performing fine alignment between the third image and the second image, thereby improving the accuracy of image alignment and matching.

[0030] It can be understood that the first image information of the embodiment of the present application includes a first image contour line and a first image width, and the second image information includes a second image contour line and a second image width.

[0031] It can be understood that the embodiment of the present application can adjust the position and size of the first image according to the first image contour line, the second image contour line, the first image width and the second image width, so as to use the adjusted first image as the third image to achieve approximate alignment of the first image and the second image.

[0032] Specifically, Figure 2 As shown, Figure 2 It is a flow chart of an image alignment and registration method provided by another embodiment of the present application; regarding the step of "adjusting the position and size of the first image according to the first image contour line, the second image contour line, the first image width and the second image width", it includes but is not limited to step S210, step S220 and step S230.

[0033] Step S210, rotating the first image according to the contour line and the horizontal line of the first image so that the characteristic direction of the first image is consistent with the characteristic direction of the second image; Step S220, performing translation processing on the rotated first image according to the first image contour line and the second image contour line, so that the contour of the rotated first image coincides with the contour of the second image; Step S230: enlarge or reduce the first image after the translation processing according to the first image width and the second image width, so that the size of the first image after the translation processing is consistent with the size of the second image.

[0034] In one embodiment, the embodiment of the present application rotates the first image through the first image contour and the horizontal line, so that the characteristic direction of the first image is consistent with the characteristic direction of the second image; then, the embodiment of the present application translates the rotated first image according to the first image contour and the second image contour, so that the contours of the rotated first image and the second image coincide; finally, the embodiment of the present application enlarges or reduces the translated first image according to the first image width and the second image width, so that the size of the translated first image is consistent with the size of the second image. Therefore, the embodiment of the present application can achieve the approximate alignment of the first image and the second image.

[0035] Specifically, Figure 3 As shown, Figure 3 It is a flowchart of an image alignment and registration method provided by another embodiment of the present application; the image alignment and registration method also includes but is not limited to step S310 and step S320.

[0036] Step S310, obtaining key point features of the first image and the second image through the ResNet18 residual network; Step S320: determine key points at similar positions according to key point features, cluster the key points at similar positions, and determine a key feature matrix.

[0037] In one embodiment, the embodiment of the present application mainly obtains the key point features of the first image and the second image through the ResNet18 residual network, thereby determining the key points at similar positions through the key point features, and then clustering the key points at similar positions to obtain a key feature matrix, and obtain a matrix correspondence between the key features in the first image and the second image.

[0038] Specifically, Figure 4 As shown, Figure 4 It is a flowchart of an image alignment and registration method provided by another embodiment of the present application; the image alignment and registration method also includes but is not limited to step S410, step S420 and step S430.

[0039] Step S410, performing Gaussian filtering on the first image to obtain a smoothed image; Step S420, down-sampling the smoothed image according to a preset number of image layers to obtain multiple image layers; Step S430: extract features from each image layer, and perform weighted summation on the extracted features to obtain a unified feature representation.

[0040] In one embodiment, the embodiment of the present application performs Gaussian filtering on the first image to obtain a smoothed image; then, the embodiment of the present application downsamples the smoothed image according to a preset number of image layers to obtain multiple image layers; finally, the embodiment of the present application extracts features of each image layer and performs weighted summation processing on the extracted features to obtain a unified feature representation, thereby achieving accurate extraction of structural features of different scales and constructing a pyramid multi-size structure with an estimated number of image layers.

[0041] It can be understood that the above-mentioned preset number of image layers can be 4 layers, which can be set according to actual needs. The embodiment of the present application does not specifically limit the size of the preset number of image layers.

[0042] It can be understood that by constructing a multi-scale pyramid structure, the accuracy of feature extraction can be improved.

[0043] Specifically, the embodiment of the present application can adaptively adjust the channel and spatial feature responses through the BAM attention module and suppress irrelevant features, thereby improving the network's ability to extract input image features and process the receptive field, thereby achieving better capture of important messages.

[0044] It can be understood that the BAM module is composed of a channel attention mechanism and a spatial attention mechanism, which allows the network to adaptively and selectively enhance or weaken the feature responses of different channels to improve sensitivity to important messages. The channel attention mechanism is used to adaptively adjust the feature response of each channel; the spatial attention mechanism is used to process features at different spatial locations. Finally, by multiplying the two weights, the BAM module output containing adaptive feature adjustments in both channel and space is obtained.

[0045] Specifically, Figure 5 As shown, Figure 5 It is a flowchart of an image alignment and registration method provided by another embodiment of the present application; regarding the above-mentioned step S130, it also includes but is not limited to step S510, step S520 and step S530.

[0046] Step S510, performing feature segmentation on the third image to obtain a plurality of first feature regions; Step S520, performing feature segmentation on the second image to obtain a plurality of second feature regions; Step S530: performing matching alignment and matching degree calculation according to the plurality of first feature regions and the plurality of second feature regions to output a fourth image.

[0047] In one embodiment, the embodiment of the present application can obtain multiple first feature regions by performing feature segmentation on the third image, and can obtain multiple second feature regions by performing feature segmentation on the second image; then, the obtained multiple first feature regions and multiple second feature regions are matched and aligned, and the matching degree is calculated based on the matched and aligned second image and third image to obtain a fourth image.

[0048] It can be understood that the embodiment of the present application can achieve pixel-level matching and alignment by matching and aligning multiple first feature areas of the third image and multiple second feature areas of the second image, and calculating the matching degree based on the matched and aligned second image and third image to obtain the fourth image, thereby improving the accuracy of image alignment.

[0049] Specifically, Figure 6 As shown, Figure 6 It is a flowchart of an image alignment and registration method provided by another embodiment of the present application; regarding the above-mentioned step S530, it also includes but is not limited to step S610, step S620, step S630 and step S640.

[0050] Step S610, matching and aligning according to the features of the first feature area and the features of the second feature area; Step S620, calculating the image matching degree between the third image and the second image after matching and alignment; Step S630: when the image matching degree is less than the preset matching degree, return to the step of performing feature matching and alignment according to the features of the first feature area and the features of the second feature area until the image matching degree is greater than or equal to the preset matching degree; Step S640: When the image matching degree is greater than or equal to the preset matching degree, determine to output the fourth image.

[0051] In one embodiment, the embodiment of the present application matches and aligns the features of the first feature area with the features of the second feature area, and calculates the image matching degree of the second image and the third image after the matching and alignment. If the image matching degree is less than the preset matching degree, it means that the matching effect is poor, and the step of matching and aligning the features according to the features of the first feature area and the features of the second feature area is returned. If the image matching degree is greater than or equal to the preset matching degree, it means that the matching effect is good, and the final alignment of the second image and the third image is achieved, thereby outputting the fourth image after fine alignment and registration.

[0052] It is understandable that the above-mentioned preset matching degree can be set according to actual needs, and the embodiment of the present application does not specifically limit the size of the preset matching degree.

[0053] Based on the image alignment and registration methods of the above-mentioned various embodiments, an overall embodiment of the image alignment and registration method of the present application is proposed below.

[0054] The image alignment and registration method of the embodiment of the present application first acquires the first image and the second image to be aligned, and then enters the coarse alignment stage and the fine alignment stage.

[0055] Rough registration stage 1. Contour extraction and rotation Extract the contour of the first image.

[0056] The angle between the contour line and the horizontal line is calculated, and the rotation is performed so that the feature directions of the first image and the second image are consistent.

[0057] 2. Contour translation Contours are extracted from the second image.

[0058] The first image is translated so that the outline of the first image coincides with the outline of the second image.

[0059] 3. Image Scaling Calculate the width of the first and second images.

[0060] The first image is scaled proportionally so that the first image and the second image have the same scale.

[0061] 4. Feature extraction network construction A feature extractor is built based on the ResNet18 residual network to extract key point features.

[0062] 5. Matrix correspondence construction Compute the coordinates of key points in two images.

[0063] Cluster key points at similar locations, construct a key feature matrix, and establish a coordinate mapping relationship.

[0064] 6. Pyramid multi-scale structure Construct a 4-layer pyramid multi-scale structure.

[0065] Apply a Gaussian filter to the first image to smooth the image.

[0066] Downsampling generates a new image layer, and the above steps are repeated to the predetermined number of layers.

[0067] 7. Generate the corresponding feature matrix Feature images at different scales are generated respectively, and then spliced ​​and integrated to improve the scale invariance of structural features.

[0068] 8. Introducing the BAM attention module Improve the network's ability to extract input image features.

[0069] Adaptively adjust channel and spatial feature responses, suppress irrelevant features, and capture important information.

[0070] It can be understood that the rough registration stage initially achieves fast rough alignment and processes the image as a whole from a macro perspective, mainly including large rotation, translation and scaling. By extracting the image contour, the angle between the contour line and the horizontal direction is calculated for rotation, so that the first image and the second image maintain the same feature direction; the second image is subjected to the same operation to extract the contour, and the first image is translated so that the contour of the first image coincides with the contour of the second image; and the width of the image is calculated, and the first image and the second image have the same scale by geometric expansion or reduction. Mainly based on the ResNet18 residual network, the feature extraction network is used to extract the key point features in the image to construct a feature extractor. The key point coordinates are calculated for the key points in the two extracted images, the coordinate mapping relationship is established for the clustered key points at similar positions in the two images, and the matrix correspondence relationship between the key features in the two images is constructed. In order to ensure the accuracy of the extracted features, combined with the characteristics of high precision and small features of the actual image, a 4-layer pyramid multi-scale structure is constructed, and Gaussian filtering is applied to the first image to smooth the image. The smoothed image is downsampled to generate a new image layer, and the above steps are repeated for the new image layer until the predetermined number of layers is reached, and feature images at different scales are generated. The feature matrix of a unified format is generated by splicing and integration to improve the scale invariance of structural features, achieve accurate extraction of structural features of different scales, and ensure the accuracy of feature extraction and construction matrix. The BAM attention module is introduced to improve the network's ability to extract input image features and process the receptive field, adaptively adjust channel and spatial feature responses, suppress irrelevant features, and better capture important information.

[0071] Fine registration stage Mainly, the coarse registration image is optimized and adjusted on the basis of the coarse registration in the first stage, and the alignment is calculated pixel by pixel to ensure that the aligned image outputted in the end has a high precision. The two images after coarse registration are inputted as new images into the second stage, which is specifically divided into two steps. First, the two input images are segmented with the help of the existing image segmentation technology, and the features in the image are divided. Then, according to the segmentation result, the second image is used as a reference, and each part of the features in the third image is searched, matched and aligned in the reference image, and the matching degree between the third image and the second image is calculated. If the matching degree is lower than the preset value, it means that the matching effect is poor, and then the above steps are returned to continue searching and matching until the matching degree reaches the set value, so as to realize the final alignment of the image, and finally output the fourth image after fine alignment and registration. Among them, the embodiment of the present application uses the first image after the coarse registration stage as the third image.

[0072] It is worth noting that the embodiments of the present application combine multi-scale structures and attention mechanisms. First, by introducing a pyramid multi-scale structure in the coarse registration stage, the embodiments of the present application can more accurately extract features of different scales, thereby improving the processing capabilities of large-scale transformations such as rotation, translation, and scaling in the image. Secondly, the introduction of the BAM attention module enables the network to adaptively adjust channel and spatial feature responses, effectively suppress irrelevant features and enhance the capture of important information, thereby improving the accuracy of feature extraction and the accuracy of the final registration. In the fine registration stage, through the combination of pixel-by-pixel optimization and segmentation technology, the present invention further accurately aligns images and achieves higher registration accuracy than traditional methods.

[0073] like Figure 7 As shown, Figure 7 700 is a schematic diagram of a controller for executing an image alignment and registration method provided by an embodiment of the present application. The controller 700 implemented in the present application includes: a processor 710, a memory 720, and a computer program stored in the memory 720 and executable on the processor 710, wherein: Figure 7 In the figure, a processor 710 and a memory 720 are taken as an example.

[0074] The processor 710 and the memory 720 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0075] The memory 720, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 720 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 720 optionally includes a memory 720 remotely arranged relative to the processor 710, and these remote memories 720 can be connected to the controller 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0076] Those skilled in the art will understand that Figure 7 The device structure shown in the figure does not constitute a limitation on the controller 700, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0077] exist Figure 7In the controller 700 shown, the processor 710 can be used to call the control program stored in the memory 720, so as to implement the above-mentioned image alignment and registration method. Specifically, the non-transient software program and instructions required to implement the image alignment and registration method of the above-mentioned embodiment are stored in the memory 720, and when executed by the processor 710, the image alignment and registration method of the above-mentioned embodiment is executed.

[0078] It is worth noting that since the controller 700 of the embodiment of the present application can execute the image alignment and registration method of any of the above-mentioned embodiments, the specific implementation methods and technical effects of the controller 700 of the embodiment of the present application can refer to the specific implementation methods and technical effects of the image alignment and registration method of any of the above-mentioned embodiments.

[0079] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the above-described image alignment and registration method. Figures 1 to 6 The method steps in .

[0080] It is worth noting that since the computer-readable storage medium of the embodiments of the present application can execute the image alignment and registration method of any of the above-mentioned embodiments, the specific implementation methods and technical effects of the computer-readable storage medium of the embodiments of the present application can refer to the specific implementation methods and technical effects of the image alignment and registration method of any of the above-mentioned embodiments.

[0081] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0082] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions under the shared conditions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. An image alignment and registration method, characterized in that: include: Acquire a first image and a second image to be aligned, wherein the first image includes first image information and the second image includes second image information; performing coarse registration on the first image and the second image according to the first image information and the second image information to obtain a third image; Refined alignment is performed according to the third image to output a fourth image.

2. The image alignment and registration method according to claim 1, characterized in that: The first image information includes a first image contour line and a first image width, the second image information includes a second image contour line and a second image width, and the coarsely registering the first image and the second image according to the first image information and the second image information to obtain a third image includes: The position and size of the first image are adjusted according to the first image contour line, the second image contour line, the first image width, and the second image width, and the adjusted first image is used as the third image.

3. The image alignment and registration method according to claim 2, characterized in that: The adjusting the position and size of the first image according to the first image contour line, the second image contour line, the first image width, and the second image width includes: Rotate the first image according to the contour line and the horizontal line of the first image so that the feature direction of the first image is consistent with the feature direction of the second image; performing translation processing on the first image after the rotation processing according to the first image contour line and the second image contour line, so that the contour of the first image after the rotation processing coincides with the contour of the second image; The first image after the translation processing is enlarged or reduced according to the first image width and the second image width, so that the size of the first image after the translation processing is consistent with the size of the second image.

4. The image alignment and registration method according to claim 1, characterized in that: The method further comprises: Acquire key point features of the first image and the second image through a ResNet18 residual network; The key points at similar positions are determined according to the key point features, and the key points at similar positions are clustered to determine the key feature matrix.

5. The image alignment and registration method according to claim 4, characterized in that: The method further comprises: Performing Gaussian filtering on the first image to obtain a smoothed image; Downsampling the smoothed image according to a preset number of image layers to obtain multiple image layers; Feature extraction is performed on each of the image layers, and weighted summation is performed on the extracted features to obtain a unified feature representation.

6. The image alignment and registration method according to claim 1, characterized in that: The method further comprises: The BAM attention module adaptively adjusts channel and spatial feature responses and suppresses irrelevant features.

7. The image alignment and registration method according to claim 1, characterized in that: The performing fine alignment according to the third image to output a fourth image comprises: Performing feature segmentation on the third image to obtain a plurality of first feature regions; Performing feature segmentation on the second image to obtain a plurality of second feature regions; Matching alignment and matching degree calculation are performed according to the plurality of first feature regions and the plurality of second feature regions to output the fourth image.

8. The image alignment and registration method according to claim 7, characterized in that: The performing matching alignment and matching degree calculation according to the plurality of the first feature regions and the plurality of the second feature regions to output the fourth image comprises: Performing matching and alignment according to the features of the first feature area and the features of the second feature area; Calculating the image matching degree between the third image and the second image after matching and alignment; When the image matching degree is less than the preset matching degree, returning to the step of performing feature matching and alignment according to the features of the first feature area and the features of the second feature area until the image matching degree is greater than or equal to the preset matching degree; When the image matching degree is greater than or equal to the preset matching degree, it is determined to output the fourth image.

9. A controller, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes an image alignment and registration method as claimed in any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute an image alignment and registration method as described in any one of claims 1 to 8.