An image matching method, an image matching device, an apparatus, and a storage medium
By using global and local feature matching methods, the problems of time consumption and orientation misjudgment in image matching during printed circuit board production are solved, achieving efficient and accurate image matching and orientation recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- OPTIMA OPTICAL TECH (SHEN ZHEN CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-06-05
AI Technical Summary
In the production of printed circuit boards, existing technologies for automated optical inspection equipment are time-consuming and not robust in calculating on high-resolution images, making it difficult to accurately match physical images with design data. In particular, orientation misjudgment is prone to occur on symmetrical or pseudo-symmetrical boards, affecting the accuracy and efficiency of the inspection process.
By acquiring the global features of the object to be detected, calculating the global feature distance with the preset image set, determining the target image that meets the preset relationship conditions, and comparing it with local features, the accurate matching of the physical image and the design data is achieved.
It improves the accuracy and robustness of image matching, ensures the reliability of orientation recognition, and achieves accurate matching with millisecond-level response.
Smart Images

Figure CN122156083A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition, and in particular to an image matching method, an image matching device, an image matching equipment, and a computer storage medium. Background Technology
[0002] In the printed circuit board (PCB) manufacturing process, automated optical inspection equipment needs to compare images captured by cameras with design data to detect defects such as short circuits, open circuits, and missing components. Before inspection, it is usually necessary to locate the correct data from a massive amount of data and perform alignment, i.e., document matching. Existing solutions mostly use traditional feature point algorithms such as SIFT and SURF for comparison, and perform alignment through geometric transformations.
[0003] However, the aforementioned methods are time-consuming to compute on high-resolution images, are not robust to noise and uneven lighting, and suffer from significant domain differences between physical images and vector design data, resulting in low matching success rates. Especially for symmetrical or pseudo-symmetrical boards, 180-degree misjudgments are prone to occur, affecting the accuracy and efficiency of subsequent inspection processes. Similar matching and orientation determination requirements also exist in the manufacturing and inspection equipment scenarios for non-printed circuit board objects. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides an image matching method, an image matching apparatus, an image matching device, and a computer-readable storage medium.
[0005] To address the aforementioned technical problems, this application proposes an image matching method, which includes:
[0006] Obtain the image to be matched of the object to be detected within the detection area, as well as the global features of the image to be matched; Obtain the first feature distance between the global features of each preset image in the preset image set and the global features of the image to be matched; wherein, the preset image set stores the preset images and their global features of each target image at at least one rotation angle. Based on the first feature distance, the target image corresponding to the first preset image that meets the preset relationship conditions is determined as the final image, and the rotation angle of the object to be detected relative to the detection area is determined according to the rotation angle associated with the first preset image in the preset image set.
[0007] The step of determining the target image corresponding to the preset image that meets the preset relationship conditions as the final image based on the first feature distance includes: Based on the first feature distance, the confidence scores of each preset image in the preset image set and the image to be matched are determined; Obtain the best preset image with the highest confidence score and the second best preset image with the second highest confidence score from the preset image set; Calculate the confidence score difference between the confidence score of the best preset image and the confidence score of the second best preset image; If the confidence difference is not less than a first preset threshold and the confidence score of the best preset image is not less than a second preset threshold, then the target image corresponding to the best preset image is determined as the final image that matches the image to be matched.
[0008] Wherein, each of the first feature distances does not satisfy the preset relationship condition; The image matching method further includes: Based on the first feature distance, a candidate image set is determined from a preset image set; wherein, the number of image data associated with the candidate image set is not less than the number of image data associated with the preset image set; Determine the location information of several local regions used for comparison; Based on the location information, corresponding image blocks are obtained at the corresponding positions of the image to be matched and each candidate image in the candidate image set, forming several local image pairs; Extract local features of the image block to be matched and the candidate image block in each of the plurality of local image pairs, and calculate the local metric value of each of the plurality of local image pairs; Based on the local metric value, the second feature distance between the image to be matched and each candidate image in the candidate image set is calculated; Based on the first feature distance and the second feature distance, the target image corresponding to the candidate image that matches the image to be matched in the candidate image set is determined as the final image.
[0009] The step of determining the target image corresponding to the candidate image that matches the image to be matched in the candidate image set as the final image based on the first feature distance and the second feature distance includes: The first feature distance and the second feature distance are weighted and summed to obtain the comprehensive matching score between the image to be matched and each candidate image in the candidate image set; The candidate images in the candidate image set are sorted from high to low according to their comprehensive matching scores; If the overall matching score of the first-ranked candidate image is not less than the third preset threshold, and the difference between the overall matching scores of the first-ranked candidate image and the second-ranked candidate image is not less than the fourth preset threshold, then the target image corresponding to the first-ranked candidate image is determined as the final image.
[0010] The image matching method further includes: Obtain the first character information and its first spatial position of the image to be matched; Obtain the second character information and its second spatial position of each candidate image in the candidate image set; Based on the first character information and each of the second character information, the character matching degree between each candidate image in the candidate image set and the image to be matched is calculated; Based on the first spatial position and each of the second spatial positions, the character position relationship between each candidate image in the candidate image set and the image to be matched is calculated; If the character matching degree is higher than a third preset threshold, the first feature distance, the second feature distance, and the character matching degree are weighted and summed, and the target image corresponding to the candidate image that matches the image to be matched is determined from the candidate image set; and, Based on the character position relationship, the rotation angle of the object to be detected relative to the detection area is determined.
[0011] The step of acquiring the image to be matched of the object to be detected within the detection area includes: The matching image of the object to be detected within the detection area is obtained using an image acquisition device; The preset image set is constructed in the following way: Obtain design data and determine the data format of the design data; If the design data is in vector format, the design data is converted into a rasterized intermediate image; if the design data is in image format, the design data is directly used as the intermediate image. The intermediate image is standardized so that the image features of the target image obtained after standardization match the image features of the image acquired by the image acquisition device; wherein, the standardization process includes at least one of resolution unification, color space conversion, binarization and contrast normalization; Obtain a preset image of the target image at at least one rotation angle and its global features; Establish the association between the identification information of the design data, the target image, the preset image, the global features and their corresponding rotation angles, and store the association in the preset image set.
[0012] The step of acquiring the image to be matched of the object to be detected within the detection area includes: Acquire an initial image containing the object to be detected within the detection area; The initial image is subjected to target region recognition processing to obtain a first image containing the object to be detected; Based on the geometric structural features of the object to be detected in the first image, the correction angle of the object to be detected relative to the detection area is determined, and the first image is rotated and corrected according to the correction angle. The first image after rotation correction is used as the image to be matched. If the target region recognition process fails or the rotation correction process fails, the initial image will be used as the image to be matched.
[0013] To address the aforementioned technical problems, this application also proposes an image matching device, comprising: The image acquisition module is used to acquire the image of the object to be detected within the detection area. A global retrieval module is used to obtain the global features of the image to be matched, and to obtain the first feature distance between the global features of each preset image in the preset image set and the global features of the image to be matched; wherein, the preset image set stores preset images of each target image at at least one rotation angle and their global features. The decision analysis module is used to determine the target image corresponding to the first preset image that meets the preset relationship conditions as the final image based on the first feature distance, and to determine the rotation angle of the object to be detected relative to the detection area according to the rotation angle associated with the first preset image in the preset image set.
[0014] To address the aforementioned technical problems, this application also proposes an image matching device, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the aforementioned image matching method.
[0015] To address the aforementioned technical problems, this application also proposes a computer-readable storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned image matching method.
[0016] Compared with existing technologies, this application has at least the following beneficial effects: acquiring a matching image of the object to be detected within a detection area, and the global features of the matching image; acquiring a first feature distance between the global features of each preset image in a preset image set and the global features of the matching image; wherein the preset image set stores preset images and their global features of each target image at at least one rotation angle; based on the first feature distance, determining the target image corresponding to the first preset image that meets the preset relationship conditions as the final image, and determining the rotation angle of the object to be detected relative to the detection area according to the rotation angle of the first preset image stored in the preset image set. Through the above image matching method, accurate matching in massive images is achieved, improving the accuracy, robustness, and reliability of direction recognition in image matching. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a flowchart illustrating the first embodiment of the image matching method provided in this application; Figure 2 This is a flowchart illustrating the second embodiment of the image matching method provided in this application; Figure 3 This is a flowchart illustrating the third embodiment of the image matching method provided in this application; Figure 4 This is a schematic diagram of the comprehensive matching score calculation process provided in this application; Figure 5 This is a schematic diagram of an embodiment of the image matching device provided in this application; Figure 6 This is a schematic diagram of the structure of an embodiment of the image matching device provided in this application; Figure 7 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0019] The reference to "embodiment" in this application means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0020] The steps in the embodiments of this application are not necessarily processed in the order described. The steps can be rearranged, deleted, or added as needed. The step descriptions in the embodiments of this application are only optional combinations of sequences and do not represent all possible combinations of steps in the embodiments of this application. The order of steps in the embodiments should not be considered as a limitation of this application.
[0021] The term "and / or" in the embodiments of this application refers to any and all possible combinations including one or more of the associated listed items. It should also be noted that, when used in this specification, "including / comprising" specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or components and / or groups thereof.
[0022] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0023] Furthermore, although the terms "first," "second," etc., are used repeatedly in this application to describe various operations (or various elements or various applications or various instructions or various data), these operations (or elements or applications or instructions or data) should not be limited by these terms. These terms are only used to distinguish one operation (or element or application or instruction or data) from another operation (or element or application or instruction or data).
[0024] This application provides an image matching method that achieves millisecond-level response and improves matching accuracy and orientation recognition capabilities. It is applicable to automatic document alignment and orientation determination scenarios in the electronics manufacturing and inspection fields, covering equipment such as AOI, SMT / SPI, AXI, ICT / flying probe testing, laser cutting / marking, dispensing, and rework stations. It effectively handles complex conditions such as multi-layer PCB boards, oxidation, noise, and slight deformation. Furthermore, this image matching method has cross-domain versatility and can be extended to non-PCB industries such as flexible electronics, precision machining, printing and packaging, and warehousing sorting, providing an efficient solution for various industrial scenarios requiring high-precision registration and preparation of "physical images and design data." The following explanation uses the printed circuit board (PCB) inspection field as an example: In the daily operation of electronic manufacturing equipment, quickly and accurately associating and aligning (i.e., "file matching") the physical images of printed circuit boards (PCBs) captured by cameras with corresponding design documents (such as Gerber data, ODB++ data, CAD data, GDSII data, PDF files, or templates) is a prerequisite for automated inspection and production. However, there are significant domain differences between physical images and vector design documents, and physical images are often affected by environmental factors such as uneven lighting, oxidation, and noise. Traditional matching methods based on manual features (such as SIFT and SURF) are time-consuming to compute on high-resolution images and lack robustness under complex textures. Especially for PCBs with highly symmetrical or pseudo-symmetrical layouts (e.g., only minor silkscreen differences), traditional methods are prone to misjudging orientations at 0° and 180°, affecting the accuracy and efficiency of subsequent inspection processes.
[0025] Therefore, the image matching method provided in this application utilizes the global features of an image to match physical images with design data. This method selects candidate images by calculating the distance between the global feature vector of the physical image and the global feature vectors of each preset image stored in a preset image set. Since the preset image set stores feature vectors of preset images at different angles, this method can determine the target design data and rotation angle that match the physical image by calculating the fraction or distance between the feature vector of the physical image and the feature vectors of the preset images at each angle, thereby improving the accuracy, robustness, and reliability of orientation recognition in image matching.
[0026] Please refer to the details. Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the image matching method provided in this application. Figure 1 As shown, the method includes the following steps S11 to S13, combining... Figure 1 The steps shown are explained.
[0027] The image matching method of this application is applied to an image matching device, which can be a server, a terminal device, or a system in which the server and the terminal device cooperate with each other. Accordingly, the various parts of the image matching device, such as each unit, subunit, module, and submodule, can all be set in the server, all in the terminal device, or separately in the server and the terminal device.
[0028] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.
[0029] like Figure 1 As shown, the specific steps are as follows: Step S11: Obtain the image to be matched of the object to be detected within the detection area, as well as the global features of the image to be matched.
[0030] In this application embodiment, the object to be detected includes, but is not limited to, a PCB board, and the image to be matched is a surface image of the object to be detected acquired by an image acquisition device, also known as a physical image. Specifically, the image acquisition device includes, but is not limited to, industrial cameras and optical imaging systems in manufacturing or testing equipment, and is not specifically limited in this application.
[0031] Optionally, in embodiments of this application, the process of obtaining the image to be matched of the object to be detected within the detection area may include preprocessing of the initial image.
[0032] For example, when only a portion of the initial image contains the object to be detected, while the remainder is invalid areas such as a background panel, conveyor belt, or auxiliary fixtures, the image matching device will perform target region recognition processing. It should be noted that target region recognition processing includes, but is not limited to, foreground detection and region of interest selection operations. Background areas are removed using methods such as background separation, connected component analysis, threshold segmentation, or edge detection, retaining only the main body region containing the object to be detected as the image to be matched.
[0033] Optionally, in this embodiment, the image matching device can determine the correction angle of the object to be detected relative to the detection area based on the geometric structural features of the object in the initial image. For example, if the object to be detected has a large tilt angle relative to the detection area when it is captured, or if the object to be detected in the image to be matched has clear edge features, hole indications, or positioning marks, the image matching device can perform rotation correction processing.
[0034] For example, the rotation correction process determines the correction angle by calculating the direction of the long side of the bounding rectangle of the object to be detected, calculating the principal direction of the connected component, or using the Hough transform to detect the angle of the straight line, and rotates the image to a preset reference direction accordingly, such as aligning the long side to the horizontal or vertical direction. However, it should be noted that this only straightens the tilted image to be matched to the horizontal or vertical direction. It should be noted that in the embodiments of this application, the image matching device can preset the minimum area ratio, maximum area ratio, and shape constraints of the region of interest, and the set of rotation correction angles and step size are configurable. If the target region recognition process or the rotation correction process fails, the image matching device uses the initial image as the image to be matched, and optionally in the subsequent step S22 embodiment, it can increase the sampling coverage density of the corners and asymmetric regions of the object to be detected in the candidate image to ensure matching accuracy and robustness. This application does not make specific limitations here.
[0035] Optionally, in the embodiments of this application, a pre-trained global model can be used to complete the extraction of global features. Understandably, the global model can be a network structure used for global feature extraction of images in this technical field, such as a deep neural network (DNN). Furthermore, the specific network architecture of the global model can be flexibly selected according to actual accuracy requirements, and this application does not impose any limitations on it.
[0036] Furthermore, in this embodiment, the training process of the global model involves processing historical physical images and corresponding design data. For example, if the design data is in vector data format, including but not limited to Gerber format, ODB, or CAM data, it needs to be converted by a rendering engine into an intermediate image in the style of the historical physical images captured by an image acquisition device. During this process, style transfer, noise addition, or texture mapping can optionally be introduced to reduce the domain difference between the physical images and the intermediate images. If the design data itself is in image data format, including but not limited to PDF files or bitmap templates, it can be directly used as an intermediate image.
[0037] Furthermore, in this embodiment of the application, after obtaining the intermediate image, a standardization process can be optionally performed. The standardization process includes, but is not limited to, resolution unification, color space conversion, binarization, and contrast normalization, so that the final generated data image matches the historical physical image obtained by the image acquisition device in terms of image feature distribution, thereby reducing interference caused by lighting and hardware environment, and improving the accuracy and robustness of image matching.
[0038] It should be noted that the images mentioned in the subsequent embodiments of this application are all images obtained after processing by the above-described rendering and / or standardization methods.
[0039] It should be noted that, in this embodiment, a metric learning method is preferably used to train the global model. The training sample pairs include physical images serving as anchor samples, correct images with consistent orientation serving as positive samples, and incorrect images or correct images with incorrect rotation direction serving as negative samples. For example, the training objective of the global model is set to minimize the convergence of feature distances between anchor samples and positive samples in the feature space, while simultaneously minimizing the separation of feature distances between anchor samples and negative samples.
[0040] It should be noted that, in order to enhance the model's ability to distinguish pseudo-symmetric plates, a hard example mining strategy can preferably be adopted during the training process of the global model. For example, by increasing the sampling ratio of correct data images with incorrect rotation directions as negative samples, the global model can learn discriminative features to characterize subtle directional differences, thereby effectively improving the model's ability to identify pseudo-symmetric plates in the 0-degree and 180-degree directions.
[0041] It should be noted that the model used for global feature extraction of physical images and the model used for global feature extraction of data images can use the same network structure, or different network structures can be used according to actual needs. The weights of the two can be set to be fully shared, partially shared, or not shared. This application does not make specific limitations here.
[0042] For example, in the embodiments of this application, the loss function used by the global model during the training phase may include, but is not limited to, triplet loss, contrast loss, Npair loss, multiple similarity loss, Circle loss, ProxyNCA loss, InfoNCE loss, or classification loss with boundaries such as ArcFace or AMSoftmax. The above loss functions may also be combined according to the specific application scenario.
[0043] In this embodiment, the dimension of the global feature can be set between 256 and 1024. The specific dimension value can be adaptively optimized according to the retrieval latency requirements and recall target of the image matching device. This application does not impose any specific limitations on this.
[0044] Step S12: Obtain the first feature distance between the global features of each preset image in the preset image set and the global features of the image to be matched.
[0045] In this embodiment of the application, the preset image set includes multiple preset images and their global features.
[0046] It should be noted that the construction process of the preset image set includes: obtaining the data image corresponding to the design data, wherein the method of obtaining the data image is consistent with the method of generating the data image in the aforementioned step S11 embodiment; subsequently, the generated data image is input into the global model for extracting global features of the data image obtained in the aforementioned step S11 embodiment to obtain the global features of each data image.
[0047] Preferably, in this embodiment of the application, in order to cover the various placement orientations that the PCB board may have within the detection area, the preset image set not only stores the global features of each data image in the baseline state, but also stores preset images of the data image at multiple rotation angles and their corresponding global features. For example, the preset image set stores preset images of the same data image at different rotation angles such as 0 degrees, 90 degrees, 180 degrees, and 270 degrees, along with their global features. The number and value of the rotation angles can be set according to actual process requirements.
[0048] Furthermore, the image matching device associates the extracted preset image with its corresponding reference image, rotation angle, design data, and design data identification information, and stores them in the preset image set.
[0049] In this embodiment, the image matching device utilizes the extracted global features of the image to be matched to perform vector retrieval within a preset image set. It should be noted that this retrieval process includes calculating a first feature distance between the global features of the image to be matched and the global features of each preset image in the preset image set. For example, the global feature vector of the image to be matched is calculated separately with the feature vectors of multiple rotation angles corresponding to the same data image in the preset image set. During this process, the image matching device obtains a corresponding number of first feature distances, which are used as a criterion for measuring the degree of matching between the image to be matched and the candidate data images at a specific rotation angle.
[0050] It should be noted that, in the embodiments of this application, the measurement method of the first feature distance includes, but is not limited to, Euclidean distance, cosine similarity, Manhattan distance, Chebyshev distance, Mahalanobis distance, Earth movement distance, KL divergence, JS divergence, or a measure and its weighted combination learned by a bilinear metric or a neural network discriminator. This application does not impose specific limitations on these methods.
[0051] Optionally, in this embodiment of the application, to improve online retrieval efficiency in large-scale database scenarios, the preset image set is preferably managed using an approximate nearest neighbor vector index structure. Specifically, the approximate nearest neighbor vector index structure includes, but is not limited to, hierarchical navigation small-world index (HNSW), clustering-based inverted index, product quantization-based index, or hash and tree-based index.
[0052] It should be noted that, in the embodiments of this application, the approximate nearest neighbor vector index structure supports batch construction, incremental update and index reconstruction of feature vectors.
[0053] For example, when adding or modifying data, the image matching device performs incremental updates; when the index fragmentation rate is detected to exceed a preset threshold or the retrieval recall index is decreased, the image matching device can trigger an index reconstruction process.
[0054] Alternatively, to reduce latency, online retrieval in large-scale database scenarios can be accelerated using graphics processing units (GPUs) and parallelized global feature extraction and pipeline scheduling can be employed to reduce waiting time.
[0055] Optionally, in this embodiment, before performing distance measurement, the image matching device performs feature preprocessing on the global features of the image to be matched and each preset image to improve the accuracy and robustness of image matching. Feature preprocessing includes, but is not limited to, feature normalization, zero-centering, or mapping global features to a unified feature subspace using projection methods such as principal component analysis and whitening. This application does not impose specific limitations on these methods.
[0056] Step S13: Based on the first feature distance, determine the target image corresponding to the first preset image that meets the preset relationship conditions as the final image, and determine the rotation angle of the object to be detected relative to the detection area according to the rotation angle associated with the first preset image in the preset image set.
[0057] In this embodiment, the image matching device determines the confidence score between each preset image in the preset image set and the image to be matched based on the calculated distances of each first feature. A higher confidence score indicates a higher certainty of matching. It should be noted that the calculation method for the confidence score includes, but is not limited to, normalization processing, calibration processing, temperature scaling processing, or direct mapping based on distance or similarity; no specific limitations are made here.
[0058] For example, if with Representing the global features of candidate images, in order to Represents the global features of the image to be matched, in order to If we represent the distance between the two, then the formula for calculating the confidence score can be expressed as: Alternatively, if similarity is used As a metric, the confidence score can be expressed as: This application does not impose specific limitations.
[0059] Furthermore, in this embodiment, the image matching device acquires the best preset image with the highest confidence score and the second best preset image with the second highest confidence score from the preset image set, and calculates the confidence difference between the confidence scores of the best preset image and the second best preset image. It should be noted that the confidence difference is used to measure the discriminative power of the matching result and the uniqueness of the current global search result.
[0060] For example, if the best preset image corresponds to a 0-degree rotation direction of the target data image, and the second best preset image corresponds to a 180-degree rotation direction of other data images or the target data image, the magnitude of the confidence difference will directly reflect the reliability of the direction determination and the identification of the design data.
[0061] For example, if with The confidence score of the best preset image is represented by... Let the confidence score represent the second-best preset image. Then, the formula for calculating the confidence difference can be expressed as: Furthermore, if confidence scores are calculated based on distance ratios, this difference logic can also be expressed as follows: ,in For the minimum distance, This is the second smallest distance.
[0062] Furthermore, in this embodiment, the preset relationship conditions include a confidence difference not less than a first preset threshold and a confidence score of the best preset image not less than a second preset threshold. If there exists a combination of the best preset image and the second best preset image that satisfies the preset relationship conditions, it indicates that the retrieval has successfully obtained a result with high confidence and significant difference. The image matching device then determines the design data corresponding to the best preset image as the final result that matches the object to be detected.
[0063] Furthermore, after determining the final result, since the global features of each preset image stored in the preset image set are mapped to a specific preset rotation angle, the image matching device will directly read the preset rotation angle corresponding to the best preset image. This preset rotation angle is determined as the actual rotation angle of the object to be detected relative to the detection area. In this way, under high retrieval confidence, the image matching device can output the final matching result and orientation determination result of the physical image, thereby achieving millisecond-level response speed and automatic matching.
[0064] Optionally, by combining the above-mentioned optional embodiments and further optimizing and expanding upon the above technical solutions, a second embodiment of the image matching method provided in this application can be obtained. Please refer to [link / reference] for details. Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the image matching method provided in this application. Figure 2 As shown, the method includes the following steps S21 to S26, combining... Figure 2 The steps shown are explained.
[0065] In the first embodiment described above, a coarse search of global features, i.e., a rough screening, can quickly locate several preset images with high similarity to the image to be matched from a massive database. However, in practical applications, relying solely on global features may have limitations. For example, when the object to be detected has a highly symmetrical or pseudo-symmetrical structure, or when different versions of the data images have only extremely minor differences in local components, it may be difficult to accurately distinguish between 0-degree and 180-degree rotation directions using only global features, and it may also be difficult to distinguish the optimal solution among preset images with extremely high similarity.
[0066] For example, if the object to be detected is an asymmetrical plate, the first feature distance in the correct orientation and matching the preset image will usually be significantly better than in other orientations. In this case, only one candidate with high confidence needs to be generated and output directly. However, if the object to be detected is a symmetrical or pseudo-symmetrical plate, there may be multiple orientations with similar first feature distances, resulting in multiple candidates generated in different orientations for the same data, or candidates with extremely high similarity generated in different data.
[0067] Therefore, in order to further improve the accuracy of matching and the accuracy of direction recognition, this embodiment introduces fine comparison based on local features after the image matching device fails to meet the preset relationship conditions in step S13 above.
[0068] like Figure 2 As shown, the specific steps are as follows: Step S21: Based on the first feature distance, determine a candidate image set from the preset image set; In this embodiment, the candidate image set includes the top N preset images with the highest confidence scores selected from the preset image set, i.e., the Top-N candidate list. It should be noted that the number of image data associated with each other in the candidate image set is usually much smaller than the total number of image data associated with each other in the preset image set. For example, the value of N can be set to an integer between one and ten.
[0069] Optionally, in this embodiment, the number N of candidate images can be adaptively and dynamically adjusted based on the confidence score and candidate score difference in step S13. For example, when the confidence score is high but has not yet reached the early stopping threshold, the value of N can be reduced to improve subsequent computational efficiency; when the confidence score is low or the scores of multiple candidates are extremely close, the value of N can be increased to include more potential matching targets, thereby enabling more comprehensive verification in the subsequent local feature comparison stage.
[0070] Step S22: Determine the location information of several local regions used for comparison.
[0071] In this embodiment of the application, in order to perform fine-grained comparison between the preset image and the image to be matched, the image matching device needs to determine the location of key local regions.
[0072] It should be noted that the selection strategies for local area location information include, but are not limited to, preset location method, random location method, heat map driven method, and learning-based key location selection.
[0073] For example, when using the preset position method, the image matching device selects a local area at several typical structures or fixed coordinates in the image. The typical structures or fixed coordinates include, but are not limited to, the four corner points, edges, geometric centers, and densely populated areas of devices. When using the random position method, the image matching device randomly samples several windows within the set legal area.
[0074] It should be noted that random sampling windows can be used not only for supplementary verification when there is uncertainty in online retrieval, but also to enhance the model's ability to generalize to different texture distributions.
[0075] For example, when using learning-based key location selection, the image matching device automatically selects discriminative regions based on attention mechanisms or candidate generation networks.
[0076] For example, when using the heatmap-driven method, the image matching device generates a response heatmap based on the feature layer of the global model, and extracts local regions at several locations with the highest absolute response values in the heatmap according to preset selection rules. These selection rules include, but are not limited to, normalization, smoothing, and non-maximum suppression.
[0077] It should be noted that when the heatmap is approximately uniform or has no significant peak (i.e., the response value is below the preset threshold), the image matching device will revert to the preset position method to ensure stability. If necessary, a combination of multiple strategies can be selectively adopted.
[0078] For example, in order to enhance the orientation determination capability, the image matching device will ensure that at least one corner area or asymmetrical feature area is covered when determining the location information.
[0079] In this embodiment, the selection of local areas adopts an open hybrid strategy, which by default includes a combination of preset locations and heatmap-driven methods, and can dynamically enable or adjust random location sampling, candidate location expansion and rollback mechanisms according to uncertainty indicators and resource constraints.
[0080] For example, when the highest confidence score among candidate images is below a minimum threshold, the heatmap response is unstable, or local consistency is insufficient, the image matching device increases the number of key locations or the sampling density.
[0081] It should be noted that when computing resources are limited or the overlap rate exceeds a preset ratio, the image matching device uses non-maximum suppression and minimum spacing constraint to control window overlap, but this application does not make specific limitations on this.
[0082] Among them, the above-mentioned strategies, thresholds, and quantity parameters are all configurable items.
[0083] Step S23: Based on the location information, obtain the corresponding image blocks at the corresponding positions of the image to be matched and each candidate image in the candidate image set, and form several local image pairs.
[0084] In this embodiment, for each candidate image in the set of candidate images and the image to be matched, the image matching device, based on determined position information, extracts local regions of the image at corresponding coordinate positions in the image to be matched and the candidate image, thereby forming several local image pairs. It should be noted that each local image pair includes a local region of the object image and a local region of the candidate image corresponding to that local region of the object image.
[0085] Optionally, in this embodiment, during the process of cropping a local image patch, the image matching device can adaptively crop the local region according to the window size, aspect ratio, and step size to adapt to the texture distribution or structural features of different objects to be detected. For example, the size of the local image patch includes, but is not limited to, 256 x 256 pixels to 512 x 512 pixels.
[0086] Step S24: Extract the local features of the image block to be matched and the candidate image block in each of the several local image pairs, and calculate the local metric value of each of the several local image pairs.
[0087] In the embodiments of this application, the image matching device uses a pre-trained local model to extract the local feature vectors of the image block to be matched and the candidate image block in each of several local image pairs.
[0088] It should be noted that in the embodiments of this application, the metric learning method used for training the local model, including the loss function, training samples, training objectives, and strategies used during training, can refer to the global model training method in the first embodiment above. The implementation principle and technical effect are similar, and will not be repeated here.
[0089] It should be noted that the network structure of the local feature extraction model of the image to be matched and the local feature extraction model of the candidate image can be the same or different, and the weights can be shared or not. The global model and the local model can be the same, partially shared, or different.
[0090] In the embodiments of this application, the image matching device calculates local metrics between the feature vectors of each of several local image pairs. Exemplarily, local metrics include, but are not limited to, Euclidean distance, cosine similarity, Manhattan distance, Chebyshev distance, Mahalanobis distance, Earth-moving distance, KL divergence or JS divergence, learned metrics such as bilinear or neural network discriminators, and their weighted or combined forms, which are not specifically limited herein.
[0091] It should be noted that before calculating the local metric, the image matching device may optionally perform feature normalization, zero-centering processing on the local feature vector, or project the features into a unified subspace through principal component analysis, whitening, or dimensionality reduction processing. This application does not make any specific limitations here.
[0092] Step S25: Calculate the second feature distance between the image to be matched and each candidate image in the candidate image set based on the local metric value.
[0093] In this embodiment, the image matching device aggregates the local metrics of multiple local image pairs acquired for the same candidate image to obtain a second feature distance.
[0094] It should be noted that the second feature distance is used to characterize the similarity between the actual image and the reference image at a specific rotation angle from a fine-grained texture level.
[0095] For example, the image matching device obtains the second feature distance by summing the local metrics of several cropped local image pairs, or it can be calculated by weighted summation or by taking the arithmetic mean.
[0096] It should be noted that when using a weighted accumulation method, the image matching device can assign different weights based on the discriminative strength of different local regions. For example, a higher weight ratio can be assigned to regions containing asymmetric components or special silkscreen markings.
[0097] Optionally, in the embodiments of this application, the calculation process of the second feature distance is combined with a consistency check to remove abnormal local metrics that are severely affected by noise before aggregation. For example, the RANSAC concept or removing values other than twice the standard deviation of the distance mean are not specifically limited in this application.
[0098] Step S26: Based on the first feature distance and the second feature distance, determine the target image in the candidate image set that matches the image to be matched.
[0099] In this embodiment of the application, the image matching device calculates a comprehensive matching score based on the first feature distance (i.e., the distance of global features) and the second feature distance (i.e., the distance of local features), and determines the final matching result and rotation angle accordingly.
[0100] It should be noted that in the embodiments of this application, the comprehensive matching score adopts an adaptive weighted fusion form, and the weight can be fixed or adaptively set.
[0101] For example, the formula for calculating the comprehensive matching score can be expressed as a weighted sum of the first feature distance and the second feature distance, where each term is normalized, zero-centered, or temperature-scaled before fusion to ensure dimensional consistency. The second feature distance participates in the fusion as an auxiliary term, and its weight is adjusted according to the scenario and threshold strategy.
[0102] For example, the weights of the fusion decision adopt an adaptive mechanism. The image matching device dynamically allocates the global feature weights and local feature weights based on at least one confidence and uncertainty index. The indexes include, but are not limited to, the difference in scores between candidates, the consistency of local similarity, the variance of global features, the variance of local features, the confidence of index retrieval, and the stability of heatmap response.
[0103] It should be noted that when any indicator triggers a preset threshold or rule, the image matching device optimizes the judgment logic by increasing or decreasing the weight of the corresponding fusion item, and can use normalization, temperature scaling, smoothing or regularization constraints to keep the weight stable.
[0104] In this embodiment of the application, the image matching device sorts the candidate images in the candidate image set according to the comprehensive matching score. If the comprehensive matching score of the first-ranked candidate image is not less than the third preset threshold, and the difference between the comprehensive matching scores of the first-ranked candidate image and the second-ranked candidate image is not less than the fourth preset threshold, then the design data corresponding to the first-ranked candidate image is determined as the final matching result.
[0105] Optionally, if the overall matching score is insufficient to form a significant discrimination, the image matching device may increase the number of key locations or the sampling density and re-perform the calculation, which is not specifically limited in this application.
[0106] Optionally, by combining the above-mentioned optional embodiments and further optimizing and expanding upon the above technical solutions, a third embodiment of the image matching method provided in this application can be obtained. Please refer to [link / reference] for details. Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the image matching method provided in this application. Figure 3 As shown, the method includes the following steps S31 to S35, combining... Figure 3 The steps shown are explained.
[0107] In the second embodiment described above, the combination of global feature coarse screening and local feature fine screening can solve the matching problem in most scenarios. However, in actual electronic manufacturing and inspection scenarios, there are some objects to be inspected that have highly symmetrical or "pseudo-symmetrical" features (for example, the traces and pad layouts of a PCB board are centrally symmetrical, with only the silkscreen characters differing). In these scenarios, the feature distances calculated solely based on geometric or texture features may be extremely close, resulting in a small difference in the overall matching score between the best and second-best candidate images, or making it difficult to make a reliable distinction between 0 degrees and 180 degrees. Simple image visual features may fall into the dilemma of "being unable to make a decision due to unclear details" when faced with severe homogenization interference or strong noise.
[0108] Therefore, in order to further improve the robustness of the system in complex scenarios, especially to accurately resolve directional ambiguity, the third embodiment of this application introduces character features with clear semantic attributes as auxiliary verification basis.
[0109] like Figure 3 As shown, the specific steps are as follows: Step S31: Obtain the character information of the image to be matched, and the first spatial position of the character information of the image to be matched.
[0110] In this embodiment, if the overall matching score of the top-ranked candidate image is less than a third preset threshold, or the difference between the overall matching scores of the top-ranked candidate image and the second-ranked candidate image is less than a fourth preset threshold, a character-assisted verification step is triggered. The image matching device uses optical character recognition (OCR) technology to further detect the image to be matched.
[0111] It should be noted that the character information of the image to be matched includes, but is not limited to, the recognized text content and the recognition confidence level; the first spatial location includes, but is not limited to, the bounding box coordinates, pixel center coordinates, or geometric coordinates of the four vertices of the text content in the image to be matched.
[0112] It should be noted that, in cases where there are multiple texts in a physical image, the image matching device can simultaneously extract information on multiple characters and their corresponding first spatial positions, which is not specifically limited in this application.
[0113] In this embodiment, if there is no text information in the image to be matched or the character recognition confidence is lower than a preset threshold, the image matching device can fall back to the weighted fusion judgment based on global features and local features. This application does not make specific limitations here.
[0114] Step S32: Obtain the character information of each candidate image in the candidate image set, and the second spatial position of the character information of each candidate image in the candidate image set.
[0115] In this embodiment of the application, the image matching device parses and obtains character information from the data image attribute information corresponding to the candidate image set.
[0116] It should be noted that the character information of the candidate image includes, but is not limited to, the recognized text content and the recognition confidence level; the second spatial location includes, but is not limited to, the bounding box coordinates, pixel center coordinates, or geometric coordinates of the four vertices of the text content in the candidate image.
[0117] It should be noted that the character information and second spatial position of each candidate image can also be pre-stored in a preset image set, or can be retrieved in real time based on the identification information of the candidate image during the online stage. This application does not make specific limitations here.
[0118] Step S33: Based on the first character information and each second character information, calculate the character matching degree between each candidate image in the candidate image set and the image to be matched.
[0119] In this embodiment, the image matching device performs fuzzy matching between the recognized character information of the physical image and the attribute information of the candidate image. It should be noted that fuzzy matching allows for tolerance of common OCR character confusions (such as '0' and 'O', '1' and 'I').
[0120] In this embodiment, the image matching device calculates the character matching degree based on the consistency of the character content. It should be noted that if the text content of the first character information and the second character information are consistent or within the error range allowed by fuzzy matching, a higher character matching degree is assigned; if the first character information and the second character information do not match at all, the image matching device will reduce the overall matching score of the candidate image or impose a confidence penalty on it.
[0121] Optionally, in the embodiments of this application, the calculation process of character matching degree can refer to the character recognition confidence degree, and this application does not make specific limitations.
[0122] Step S34: Based on the first spatial position and each of the second spatial positions, calculate the character position relationship between each candidate image in the candidate image set and the image to be matched.
[0123] In this embodiment of the application, if the first character information in the image to be matched successfully matches the second character information in the candidate image, the image matching device calculates the character position relationship based on the geometric mapping logic of the first spatial position and the second spatial position.
[0124] It should be noted that the character position relationship is used to verify or correct the rotation direction of the object to be detected; if the character is located near the geometric center, the determination depends on the reading direction of the character content.
[0125] For example, if the text content of the candidate image is located in the lower left corner of the image coordinate system, while the text content identified in the image to be matched is located in the upper right corner of the image coordinate system, then the object to be detected is determined to have rotated 180 degrees relative to the detection area based on the mirror or rotation correspondence of the positional relationship.
[0126] It should be noted that, in the embodiments of this application, the positional relationship of characters can be used to preferentially resolve directional ambiguities that may occur in global or local feature comparison, especially for symmetrical misjudgments between 0 degrees and 180 degrees, which have a high judgment weight.
[0127] It should be noted that the calculation process of character position relationships includes, but is not limited to, coordinate normalization, coordinate system transformation and mapping, and relative azimuth angle calculation, which are not specifically limited in this application.
[0128] Step S35: If the character matching degree is higher than the third preset threshold, the first feature distance, the second feature distance and the character matching degree are weighted and summed, and the target image corresponding to the candidate image that matches the image to be matched is determined from the candidate image set. Based on the character position relationship, the rotation angle of the object to be detected relative to the detection area is determined.
[0129] In this embodiment, the image matching device uses an adaptive weighted fusion method to calculate the comprehensive matching score.
[0130] It should be noted that if the identified character matching degree is higher than the third preset threshold, it indicates that the semantic information of the text has a high degree of confidence. At this time, the image matching device performs the following calculations on the first feature distance, the second feature distance, and the character matching degree: Figure 4 The weighted fusion is shown.
[0131] For example, in the embodiments of this application, the formula for calculating the comprehensive matching score can be expressed as:
[0132] Where S is the overall matching score, The first feature distance after normalization. The normalized second feature distance. This represents the normalized character matching degree. , , These are the weights of each fusion item, and the sum of the weights is 1.
[0133] It should be noted that, in the embodiments of this application, the weights of each fusion item adopt an adaptive mechanism, dynamically adjusting the weights of each fusion item based on at least one confidence and uncertainty indicator. Indicators include, but are not limited to, confidence difference, OCR matching confidence, local similarity consistency, global feature variance, local feature variance, confidence score, and heatmap response stability.
[0134] For example, when the OCR confidence is high and consistent with other criteria, the image matching device improves... The weighting is determined by prioritizing the OCR result. When the OCR fails, has low confidence, or is unavailable, the image matching device... When the value is 0, the fusion decision does not depend on the OCR term, but is based on global features, local features, and threshold strategies.
[0135] It should be noted that the image matching device ultimately selects the design data corresponding to the candidate image with the highest comprehensive matching score as the final matching result, and outputs the final rotation result by combining the character position relationship and the rotation angle corresponding to the candidate image. This application does not impose specific limitations on this.
[0136] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0137] To implement the above image matching method, this application also proposes an image matching device, which can be found in the following details. Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the image matching device provided in this application.
[0138] The image matching device 100 of this embodiment includes an image acquisition module 11, a global retrieval module 12, and a decision analysis module 13.
[0139] The image acquisition module 11 is used to acquire the image of the object to be detected within the detection area.
[0140] The global retrieval module 12 is used to obtain the global features of the image to be matched, and to obtain the first feature distance between the global features of each preset image in the preset image set and the global features of the image to be matched.
[0141] The global retrieval module 12 stores preset images of each target image at at least one rotation angle and their global features in its preset image set.
[0142] The decision analysis module 13 is used to determine the target image corresponding to the first preset image that meets the preset relationship conditions as the final image based on the first feature distance, and to determine the rotation angle of the object to be detected relative to the detection area according to the rotation angle associated with the first preset image in the preset image set.
[0143] To implement the above image matching method, this application also proposes an image matching device, which can be found in the following details. Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the image matching device provided in this application.
[0144] The image matching device 400 of this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.
[0145] The processor 41, memory 42, and input / output device 43 are respectively connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the image matching method of the above embodiment.
[0146] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.
[0147] This application also provides a computer storage medium; please refer to the following: Figure 7 , Figure 7This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the image matching method of the above embodiment.
[0148] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0149] The above are merely embodiments of this application and do not limit the scope of this patent application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.
Claims
1. An image matching method, characterized in that, The image matching method includes: Obtain the image to be matched of the object to be detected within the detection area, as well as the global features of the image to be matched; Obtain the first feature distance between the global features of each preset image in the preset image set and the global features of the image to be matched; wherein, the preset image set stores the preset images and their global features of each target image at at least one rotation angle. Based on the first feature distance, the target image corresponding to the first preset image that meets the preset relationship conditions is determined as the final image, and the rotation angle of the object to be detected relative to the detection area is determined according to the rotation angle associated with the first preset image in the preset image set.
2. The image matching method according to claim 1, characterized in that, The step of determining the target image corresponding to the preset image that meets the preset relationship conditions based on the first feature distance as the final image includes: Based on the first feature distance, the confidence scores of each preset image in the preset image set and the image to be matched are determined; Obtain the best preset image with the highest confidence score and the second best preset image with the second highest confidence score from the preset image set; Calculate the confidence score difference between the confidence score of the best preset image and the confidence score of the second best preset image; If the confidence difference is not less than a first preset threshold and the confidence score of the best preset image is not less than a second preset threshold, then the target image corresponding to the best preset image is determined as the final image that matches the image to be matched.
3. The image matching method according to claim 1, characterized in that, The distances of each of the first features do not satisfy the preset relationship conditions; The image matching method further includes: Based on the first feature distance, a candidate image set is determined from a preset image set; wherein, the number of image data associated with the candidate image set is not less than the number of image data associated with the preset image set; Determine the location information of several local regions used for comparison; Based on the location information, corresponding image blocks are obtained at the corresponding positions of the image to be matched and each candidate image in the candidate image set, forming several local image pairs; Extract local features of the image block to be matched and the candidate image block in each of the plurality of local image pairs, and calculate the local metric value of each of the plurality of local image pairs; Based on the local metric value, the second feature distance between the image to be matched and each candidate image in the candidate image set is calculated; Based on the first feature distance and the second feature distance, the target image corresponding to the candidate image that matches the image to be matched in the candidate image set is determined as the final image.
4. The image matching method according to claim 3, characterized in that, The step of determining the target image corresponding to the candidate image that matches the image to be matched in the candidate image set as the final image based on the first feature distance and the second feature distance includes: The first feature distance and the second feature distance are weighted and summed to obtain the comprehensive matching score between the image to be matched and each candidate image in the candidate image set; The candidate images in the candidate image set are sorted from high to low according to their comprehensive matching scores; If the overall matching score of the first-ranked candidate image is not less than the third preset threshold, and the difference between the overall matching scores of the first-ranked candidate image and the second-ranked candidate image is not less than the fourth preset threshold, then the target image corresponding to the first-ranked candidate image is determined as the final image.
5. The image matching method according to claim 3 or 4, characterized in that, The image matching method further includes: Obtain the first character information and its first spatial position of the image to be matched; Obtain the second character information and its second spatial position of each candidate image in the candidate image set; Based on the first character information and each of the second character information, the character matching degree between each candidate image in the candidate image set and the image to be matched is calculated; Based on the first spatial position and each of the second spatial positions, the character position relationship between each candidate image in the candidate image set and the image to be matched is calculated; If the character matching degree is higher than a third preset threshold, the first feature distance, the second feature distance, and the character matching degree are weighted and summed, and the target image corresponding to the candidate image that matches the image to be matched is determined from the candidate image set; and, Based on the character position relationship, the rotation angle of the object to be detected relative to the detection area is determined.
6. The image matching method according to claim 1, characterized in that, The step of acquiring the image to be matched of the object to be detected within the detection area includes: The matching image of the object to be detected within the detection area is obtained using an image acquisition device; The preset image set is constructed in the following way: Obtain design data and determine the data format of the design data; If the design data is in vector format, the design data is converted into a rasterized intermediate image; if the design data is in image format, the design data is directly used as the intermediate image. The intermediate image is standardized so that the image features of the target image obtained after standardization match the image features of the image acquired by the image acquisition device; wherein, the standardization process includes at least one of resolution unification, color space conversion, binarization and contrast normalization; Obtain a preset image of the target image at at least one rotation angle and its global features; Establish the association between the identification information of the design data, the target image, the preset image, the global features and their corresponding rotation angles, and store the association in the preset image set.
7. The image matching method according to claim 1, characterized in that, The step of acquiring the image to be matched of the object to be detected within the detection area includes: Acquire an initial image containing the object to be detected within the detection area; The initial image is subjected to target region recognition processing to obtain a first image containing the object to be detected; Based on the geometric structural features of the object to be detected in the first image, the correction angle of the object to be detected relative to the detection area is determined, and the first image is rotated and corrected according to the correction angle. The first image after rotation correction is used as the image to be matched. If the target region recognition process fails or the rotation correction process fails, the initial image will be used as the image to be matched.
8. An image matching device, characterized in that, include: The image acquisition module is used to acquire the image of the object to be detected within the detection area. A global retrieval module is used to obtain the global features of the image to be matched, and to obtain the first feature distance between the global features of each preset image in the preset image set and the global features of the image to be matched; wherein, the preset image set stores preset images of each target image at at least one rotation angle and their global features. The decision analysis module is used to determine the target image corresponding to the first preset image that meets the preset relationship conditions as the final image based on the first feature distance, and to determine the rotation angle of the object to be detected relative to the detection area according to the rotation angle associated with the first preset image in the preset image set.
9. An image matching device, characterized in that, The image matching device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the image matching method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program data, which, when executed by a computer, is used to implement the image matching method as described in any one of claims 1 to 7.