Image alignment method and device, equipment and storage medium
By rasterizing the Pcs particle images in semiconductor detection and feature alignment, the problem of inaccurate image mapping alignment is solved, and higher defect detection accuracy and lower error detection rate are achieved.
Patent Information
- Application Number
- CN202411958732.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-16
AI Technical Summary
In the field of semiconductor detection, due to the high resolution and multiple feature points of the Pcs particle image, the image mapping alignment is inaccurate, resulting in the problems of overall bias and high error detection rate.
By rasterizing the image of the circuit board to be detected, a window image collection is generated, and feature alignment or alignment is performed according to the image outline, and one by one is aligned to the master map to improve the accuracy of defect detection.
This method effectively avoids the overall offset caused by the entire image mapping, improves the accuracy of defect detection, reduces the error detection rate, and can more accurately detect the missing, misalignment, addition and damage of components.
Smart Images

Figure CN120014004A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of document scanning, and in particular to an image alignment method, device, equipment and storage medium. Background Art
[0002] In the field of semiconductor inspection, defect detection is an essential inspection item, focusing on detecting the qualified rate of the produced materials and screening, removing or repairing the defective materials. Most defect detection methods use CAM image matching. That is, the photographed circuit board or material board is aligned and matched with the CAD master image to screen out defects. This application describes the defect detection of PCS particles on the material board as an example.
[0003] In related technologies, due to the requirements of Pcs particle size and detection accuracy, most of the images taken are 2K, 4K or higher resolution images, and defect detection is also refined to pixel-level matching. When mapping the Pcs particle image to the Pcs master image, because there are too many feature points and contour lines in the Pcs, there will be situations where the Pcs particle image cannot be accurately identified and located, and the Pcs master image cannot be quickly mapped and aligned. The result is an overall deviation, resulting in large differences in contour matching and an increase in the detection rate of false detections. Summary of the invention
[0004] The embodiments of the present application provide an image alignment method, apparatus, device and storage medium to solve the problem of inaccurate image mapping alignment of a large-size and high-precision circuit board to be tested.
[0005] In one aspect, the present application provides an image alignment method, the method comprising: Obtain a scanned image of the circuit board to be tested, identify and extract any unit area in the circuit board to be tested; Based on the preset segmentation rules, the target unit area is divided into several partitions to generate a window image set; Window images in the window image set are extracted, mapped one by one to the master image corresponding to the target unit area according to the image contours, and image alignment is performed according to the image contours, so as to perform defect detection according to the master image.
[0006] Specifically, the image alignment according to the image contour includes: Determining whether the window image contains alignment feature group data; the alignment feature group data is used to perform feature alignment between the window image and the contour in the master image; When the window image contains the alignment feature group data, performing image self-alignment on the window image according to the alignment feature group data; When the window image does not contain the alignment feature group data, the alignment is performed according to the aligned window images within the adjacent range of the window image.
[0007] Specifically, the determining whether the window image contains the alignment feature group data includes: Identify the shapes and quantities of linear contours and non-linear contours in the window image; When at least two non-linear contours, or at least one non-linear contour and one linear contour are identified, the corresponding contours are determined as target contours, and target feature points in the target contours are extracted; The alignment feature group data of the window image is generated based on the target contour and the corresponding target feature points.
[0008] Specifically, before performing the alignment according to the aligned window images within the adjacent range of the window images, the method includes: Determine whether the adjacent range of the current window image contains an aligned window image; When the adjacent range contains an aligned window image, the alignment is performed based on the aligned window image in the adjacent range; When the adjacent range does not contain the aligned window image, the current window image is temporarily stored. If the adjacent range of the current window image contains the aligned window image, alignment is performed based on the aligned window image.
[0009] Specifically, the step of performing the alignment according to the aligned window images within the adjacent range of the window images includes: Taking the current window image as the center, obtain the aligned candidate alignment window images in the surrounding adjacent range; When the candidate alignment window images include at least one image aligned according to the target contour and the target feature points, determine it as the target alignment window image; When the candidate alignment window images do not contain an image aligned according to the target contour and the target feature points, a candidate aligned window image in a different row and column from the current window image is selected as a target alignment window image; Image stitching alignment is performed according to the target alignment window image and its positional relationship with the current window image.
[0010] Specifically, determining the corresponding contour as the target contour includes: When the recognized contour includes a non-linear contour, the non-linear contour and at least one linear contour are determined as target contours; When the recognized contours include at least two non-linear contours of different shapes and sizes, determining the at least two non-linear contours as target contours; When the identified contours only include linear contours and non-linear contours with similar shapes and sizes, at least two non-linear contours with similar shapes and at least one linear contour are selected as target contours; When the identified contours only include at least two non-linear contours with similar shapes and sizes, at least two non-linear contours close to the edge of the image are taken as target contours; the positional relationship between the several target contours is recorded, and contour alignment is performed after alignment data is generated.
[0011] Specifically, when the identified contours only include one non-linear contour, or only include a number of linear contours, it is determined that the window image does not contain the alignment feature group data, and the alignment operation is performed.
[0012] On the other hand, the present application provides an image alignment device, the device comprising: An extraction module is used to obtain a scanned image of the circuit board to be tested, identify and extract any unit area in the circuit board to be tested; A segmentation module, used to segment the target unit area into a number of partitions based on a preset segmentation rule to generate a window image set; The alignment module is used to extract the window images in the window image set, map them one by one to the master image corresponding to the target unit area according to the image contours, and align the images according to the image contours so as to perform defect detection according to the master image.
[0013] On the other hand, the present application provides a computer device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the image alignment method described in the above aspects.
[0014] On the other hand, the present application provides a computer-readable storage medium, wherein the readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the image alignment method described in the above aspects.
[0015] The beneficial effects brought about by the technical solution provided in the embodiment of the present application include at least: in order to avoid the problem of overall offset and misalignment of the entire image mapped to the master image due to accuracy issues, the present application rasterizes and segments the Pcs particle image, and then maps each window image to the target position in the master image by matching and aligning each window image one by one; each window image can be compared with the contour lines of the master image to the greatest extent possible to detect problems such as missing, misaligned, added and damaged components, thereby improving the accuracy of subsequent defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of an image alignment method provided in an embodiment of the present application; Figure 2It is a schematic diagram of the rasterization and segmentation of the Pcs particle image; Figure 3 Shows Figure 2 A partial schematic diagram of Figure 4 A typical situation where the contour line overlap and deviation may occur is shown; Figure 5 A schematic diagram of local window image arrangement is shown; Figure 6 is a schematic diagram containing a linear contour and a non-linear contour; Figure 7 is a schematic diagram containing at least two nonlinear contours of different shapes and sizes; Figure 8 is a schematic diagram containing only linear contours and nonlinear contours of similar shape and size; Fig. 9 is a schematic diagram showing only one non-linear contour; Fig.10 are window images and scanned images containing only straight line contours; Fig.11 It is a window image and scan that uses multiple non-linear contours and linear contour matching; Fig.12 The structure block diagram of the image alignment device provided by the embodiment of the present application is shown; Fig.13 A structural block diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0017] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0018] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0019] Figure 1 : is a flowchart of the image alignment method provided in an embodiment of the present application, comprising the following steps: S1, obtaining a scanned image of the circuit board to be tested, identifying and extracting any unit area in the circuit board to be tested; The circuit board to be inspected usually contains many small circuit board units of different models, each of which contains many components. This step requires obtaining the overall scan image through the camera module, and then extracting the sub-image of a single small circuit board unit. For the convenience of description, the small circuit board unit will be described as Pcs particles in the following, that is, obtaining the material board scan image, identifying and extracting each Pcs particle image. This process requires identifying the Pcs particles one by one, and then extracting all Pcs particle images along the particle outline.
[0020] Optionally, different Pcs particles have different shapes and sizes, so the CAM image file corresponding to the material board also contains various Pcs master images. In a possible implementation, the Pcs image in the master image can be mapped according to the Pcs model or number.
[0021] S2, based on the preset segmentation rules, the target unit area is divided into several partitions to generate a window image set; All sub-unit regions are combined into a set to obtain a sequence. For each selected target unit region (i.e., Pcs particle image), the Pcs particle image is first divided into several window images to obtain a window image set. The preset segmentation rule means the segmentation and encoding rule, for example, according to the raster segmentation of 200*200 size, and the raster image is numbered from top to bottom and from left to right to generate a set.
[0022] Figure 2 This is a schematic diagram of the rasterization and segmentation of a Pcs particle image. Considering the image mapping accuracy, the selected Pcs particle image is segmented and cropped using the preset grid size alignment. The grid sizes can be the same or different, mainly to cut a large image into many small view images, that is, several window images. In this way, each selected Pcs particle image can be segmented into a set of window images.
[0023] S3. Extract window images from the window image set, map them one by one to the master image corresponding to the target unit area according to the image contours, and align the images according to the image contours.
[0024] Figure 3 Shows Figure 2 A partial schematic diagram of the process, which shows the individual window images after rasterization and segmentation. In the mapping and alignment stage, these window images are mapped to the target positions in the corresponding Pcs master image one by one, and the images are aligned according to the image contours. After alignment, defect detection can be performed based on the degree of overlap with the contour lines in the master image.
[0025] In particular, this process does not strictly align the window image to the master image according to the edge size, but tries to match the contour lines in the window image with the contour image in the master image to the greatest extent. Because this solution is mainly for defect detection, not pure image stitching, the matching mode of segmentation matching can map and align by region, and then accurately identify the omissions and offsets (such as component skew) in each partition on the Pcs particle, avoiding the misalignment caused by the mapping of the entire image. Of course, the contour matching must select markers such as gold surfaces and circuits that do not cause positional offset problems as the matching basis to improve the matching and alignment accuracy.
[0026] To summarize, in order to avoid the problem of overall offset and misalignment of the entire image mapped to the master image due to accuracy issues, the present application rasterizes and segments the Pcs particle image, and then maps each window image to the target position in the master image by matching and aligning each window image one by one; each window image can be compared with the contour lines of the master image to the greatest extent possible to detect problems such as missing, misaligned, added and damaged components, thereby improving the accuracy of subsequent defect detection.
[0027] In the process of mapping using the segmentation alignment strategy, especially for images containing a large number of linear contours, contour lines may overlap during the alignment process, resulting in errors in the alignment results. Figure 4 The figure shows a typical situation where the contour line may overlap and deviate. The cropped window image may contain all standardized image content (such as a base plate or a gold surface image without any components). When this window image with pure linear pixel content is mapped to the master image, the master image contains a large range of this type of content, so the window image cannot be accurately aligned to the target position in the master image. Figure 4 For example, the window image is likely to be aligned upward or downward, and the contour lines can also perfectly overlap, but in fact, they are misaligned.
[0028] In view of this situation, when the application performs image alignment according to the image contour, it is necessary to make a judgment first and adopt different alignment logics based on different situations. Specifically, the following steps can be used: 1. Determine whether the window image contains alignment feature group data; the alignment feature group data is used to align the window image with the contour in the master image; 2. When the window image contains alignment feature group data, the window image is self-aligned according to the alignment feature group data; 3. When the window image does not contain the alignment feature group data, the alignment is performed based on the aligned window images within the adjacent range of the window image.
[0029] The alignment feature group data here is the basis for judging that a large number of linear contours cannot be accurately aligned. Figure 5 A schematic diagram of the arrangement of local window images is shown, which is described in the form of a nine-square grid, in which the 7th window image contains pure straight contours, and its left and right adjacent images also contain some straight contours, but the 8th window image contains a large number of arc contours (i.e., non-linear contours). Then when the 7th window image is selected to align with the master image, it may be biased to the left or right. Assuming that the 8th window image is selected, the alignment feature group data can be generated based on the non-linear contour, because the non-linear contour has certain characteristics, and the probability of mapping alignment errors is lower. Assuming that the 7th window image is selected, because all of them are straight contours, they cannot be aligned according to contour matching, so the adjacent window image is selected, and the alignment feature group data is determined according to the adjacent relationship. The adjacent relationship here refers to the image relationship, and the adjacent image is required to have completed the alignment work. Assume that the 8th window image has been successfully aligned to the target position of the master image, and the current image to be aligned is the 7th window image, but there is no non-linear contour in it, then based on the left and right adjacent relationship, the 7th window image is aligned along the image edge size on the basis of the 8th window image, without considering the contour mapping problem of the master image. This is actually equivalent to the 7th and 8th window images being a large window image, and directly aligned to the master image according to the contour mapping of the 8th window image area.
[0030] Based on the above description, as to how to detect whether the feature group data is aligned in the window image, it is mainly determined according to the contour type and quantity, and the present application can be determined as follows: 1. Identify the shape and quantity of linear and non-linear contours in the window image; 2. When at least two non-linear contours, or at least one non-linear contour and one linear contour are identified, the corresponding contour is determined as a target contour, and target feature points in the target contour are extracted; 3. Generate alignment feature group data of the window image based on the target contour and the corresponding target feature points; the alignment feature group data is used for subsequent alignment operations.
[0031] 4. When the identified contours contain only one non-linear contour, or only contain a number of linear contours, it is determined that the window image does not contain alignment feature group data, and other alignment operations are performed.
[0032] In the above scheme, for the case where there are non-linear contours, considering that there may be multiple similar contours of different shapes and sizes in the master image, at least two non-linear contours, or at least one non-linear contour and one linear contour are selected as target contours, which can improve the alignment accuracy. After determining the target contour, feature points can be selected on the contour line, and alignment data can be constructed based on the feature points. Subsequently, the master image is matched based on these alignment data. For the judgment without alignment feature group data, the judgment of a non-linear contour is considered to be widely present in the master image, and the accuracy cannot be guaranteed; and the judgment of a pure linear contour is to avoid the problem of splicing overlap and deviation, and it is safer to choose the other alignment mode.
[0033] As mentioned above, because there is no non-linear contour, it is necessary to use the adjacent images. Therefore, after obtaining the window image set, it is necessary to number the window images in row or column order according to the segmentation grid. Later, when mapping the master image, select the window image from the window image set according to the numbering order. This can be done as follows Figure 5 Align row by row or column by column in the order shown.
[0034] The specific process of determining the target alignment window image can be confirmed as follows: a. Taking the current window image as the center, obtain the aligned candidate alignment window images in the surrounding adjacent range; b. When the candidate alignment window images contain at least one image aligned according to the target contour and the target feature points, it is determined as the target alignment window image; c. Generate alignment feature group data according to the number of the target alignment window image and its positional relationship with the current window image; during mapping, directly perform image stitching according to the positional relationship between the target alignment window image and the current window image; by Figure 5 Take the 5th window image in the example, it must use the image alignment mode, assuming it is aligned from top to bottom, it is obvious that the 3rd and 6th window images are not aligned with the target contour, so the 2nd window image is selected. Then the image stitching is performed according to the positional relationship formed by the numbering.
[0035] d. When the candidate alignment window image does not contain an image aligned according to the target contour and target feature points, a candidate aligned window image in a different row and column from the current window image is selected as the target alignment window image; Furthermore, image stitching alignment is performed according to the number of the target alignment window image and its positional relationship with the current window image.
[0036] This situation is mainly for images with large-scale linear contours. Figure 5If the images in windows 1-3 are also linear contours, then select the image in window 1 or window 3 (select along the diagonal) as the target alignment window image.
[0037] As mentioned above, the logic for the above-mentioned other-alignment needs to ensure that there are aligned window images around. There are many types of operations. One is to map the alignment strictly in the order of image numbers. Assuming that the alignment operation is performed from top to bottom and from left to right, for the most recently determined other-aligned window image, its bottom is aligned, while the top and right are not aligned. In this case, only the aligned window images can be selected from the left and bottom. The other is not strictly in the order of numbers, but adopts the mode of self-alignment first and then other-alignment. The purpose is to allow more aligned window images to be around the current window image (to be aligned), so that there is more room for selection. The second method is introduced in detail below. Before performing other-alignment according to the aligned window images within the adjacent range of the window image, the method also includes: 1) Determine whether the adjacent range of the current window image contains an aligned window image; 2) When the adjacent range contains an aligned window image, perform alignment based on the aligned window image in the adjacent range; 3) When the adjacent range does not contain the aligned window image, the current window image is temporarily stored. If the adjacent range of the current window image contains the aligned window image, it is aligned based on the aligned window image.
[0038] For step 3), it can be further divided into the following two operation strategies: 31) When it is determined that the current window image needs to perform an alignment (image stitching) operation, the current window image is cached, and other window images and feature judgments are continued to be selected from the window image set; all window images that meet the self-alignment are aligned and mapped to the master image; Select the unaligned window images one by one according to the number size, obtain the aligned window images in the adjacent range, and perform the alignment operation after determining the target aligned window image; 32) When it is determined that the current window image needs to perform an alignment (image stitching) operation, the current window image is cached and the alignment threshold is set; Continue to select other window images and feature judgments from the window image set, and detect the number of aligned window images in the vicinity of the cached unaligned window image; When the number of aligned window images in the neighboring range reaches the alignment threshold, the aligned window images in the neighboring range are obtained, and the alignment operation is performed after the target alignment window image is determined.
[0039] Compared with the method of strictly following the image numbering, the above two solutions have a larger selection space and better alignment accuracy.
[0040] For the self-alignment operation, the focus is on how to select the target contour. The following focuses on the situation of selecting the target contour and extracting feature points: 01. When the recognized contour includes a non-linear contour, the non-linear contour and at least one linear contour are determined as the target contour; Figure 6 It is a schematic diagram that includes a linear contour and a non-linear contour. Because the image contains a partially segmented arc contour above and several straight contours below, after selecting enough straight contours and adding arc contours, alignment and matching can be performed based on the formed positional relationship.
[0041] 02. When the identified contours include at least two non-linear contours of different shapes and sizes, the at least two non-linear contours are determined as target contours; Figure 7 It is a schematic diagram containing at least two non-linear contours of different shapes and sizes. In the figure, three curved contours of different shapes are selected at the top and bottom, and target feature points are extracted therein.
[0042] 03. When the identified contours only include linear contours and non-linear contours with similar shapes and sizes, at least two non-linear contours with similar shapes and at least one linear contour are selected as target contours; Figure 8 It is a schematic diagram that contains only linear contours and non-linear contours of similar shape and size. In the figure, two arc contours and one straight contour are selected on the right as target contours, and the target feature points are extracted.
[0043] 04. When the identified contours contain only at least two non-linear contours of similar shape and size, at least two non-linear contours close to the edge of the image are taken as target contours; the positional relationship between several target contours is recorded for aligning the Pcs contour with the alignment data; The purpose of this is to use positional relationships and features close to the outside as matching criteria, because similar contours are manifested as multiple similar arcs, concentric circles and other structures. If multiple are selected from the outermost layer and based on the positional relationship features, the probability of matching duplication in the entire master image will be reduced, which means that the alignment accuracy will be higher.
[0044] 05. When the identified contour contains only one non-linear contour, the alignment feature group data is generated according to the neighboring relationship of the target alignment window image selected within the adjacent range of the window image.
[0045] Fig. 9It is a schematic diagram showing only one non-linear contour, in which only the outermost contour on the left side is a valid contour, and the inner side is the non-scanning area of the edge of the gold surface. From the contour extraction interface on the right, it can be seen intuitively that this situation of only containing arcs exists in a large number of master images, so feature point alignment cannot be used, but the image stitching alignment mode is directly used. In addition, Fig.10 It is also a window image and a scanned image that only contains straight line contours. This also uses image stitching and alignment.
[0046] Fig.11 It is a window image and scanned image that uses multiple non-linear contours and linear contours to match. The more contours are selected, the more target feature points are extracted, and the better the matching alignment effect.
[0047] Fig.12 The structure block diagram of the image alignment device provided in the embodiment of the present application is shown, and the device includes: The extraction module 1210 is used to obtain a scanned image of the circuit board to be detected, and identify and extract any unit area in the circuit board to be detected; A segmentation module 1220 is used to segment the target unit area into a plurality of partitions based on a preset segmentation rule to generate a window image set; The alignment module 1230 is used to extract the window images in the window image set, map them one by one to the master image corresponding to the target unit area according to the image contours, and align the images according to the image contours so as to perform defect detection according to the master image.
[0048] The image alignment device provided in the embodiment of the present application can be applied to the image alignment method provided in the above embodiment. For relevant details, refer to the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0049] It should be noted that the image alignment device provided in the embodiment of the present application is only illustrated by the division of the above-mentioned functional modules / functional units. In practical applications, the above-mentioned functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the image alignment device is divided into different functional modules / functional units to complete all or part of the functions described above. In addition, the implementation method of the image alignment method provided in the above method embodiment and the implementation method of the image alignment device provided in this embodiment belong to the same concept. The specific implementation process of the image alignment device provided in this embodiment is detailed in the above method embodiment, which will not be repeated here.
[0050] Fig.13The block diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown. It is a computer device such as a desktop computer, a laptop computer, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. The processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, graphics processors (GPU), embedded neural network processors (NPU) or other dedicated deep learning coprocessors, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned chips.
[0051] The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0052] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above-mentioned embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the method in the above-mentioned method implementation is realized. The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor 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 a combination thereof.
[0053] In some embodiments, the computer device may further optionally include: a peripheral device interface and at least one peripheral device. The processor, the memory and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit, a display screen and a keyboard.
[0054] The peripheral device interface can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor and the memory. In some embodiments, the processor, the memory, and the peripheral device interface are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, the memory, and the peripheral device interface can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0055] The display screen is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen is a touch screen, the display screen also has the ability to collect touch signals on the surface or above the surface of the display screen. The touch signal can be input to the processor as a control signal for processing. At this time, the display screen can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen can be one, which is set on the front panel of the computer device; in other embodiments, the display screen can be at least two, which are respectively set on different surfaces of the computer device or are folded; in other embodiments, the display screen can be a flexible display screen, which is set on the curved surface or folded surface of the computer device. Even the display screen can be set into a non-rectangular irregular shape, that is, a special-shaped screen. The display screen can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.
[0056] The power supply is used to power various components in the computer device. The power supply can be AC, DC, a disposable battery, or a rechargeable battery. When the power supply includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0057] Those skilled in the art will appreciate that the structure shown in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0058] The embodiment of the present application also discloses a computer-readable storage medium. Specifically, the computer-readable storage medium is used to store a computer program, and when the computer program is executed by the processor, the method in the above-mentioned method implementation is implemented. Those skilled in the art can understand that the implementation of all or part of the process in the above-mentioned implementation method of the present application can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the process of the implementation of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0059] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. An image alignment method, characterized in that: The method comprises: Obtain a scanned image of the circuit board to be tested, identify and extract any unit area in the circuit board to be tested; Based on the preset segmentation rules, the target unit area is divided into several partitions to generate a window image set; Window images in the window image set are extracted, mapped one by one to the master image corresponding to the target unit area according to the image contours, and image alignment is performed according to the image contours, so as to perform defect detection according to the master image.
2. The method according to claim 1, characterized in that The image alignment according to the image contour comprises: Determining whether the window image contains alignment feature group data; the alignment feature group data is used to perform feature alignment between the window image and the contour in the master image; When the window image contains the alignment feature group data, performing image self-alignment on the window image according to the alignment feature group data; When the window image does not contain the alignment feature group data, the alignment is performed according to the aligned window images within the adjacent range of the window image.
3. The method according to claim 2, characterized in that The determining whether the window image contains the alignment feature group data comprises: Identify the shapes and quantities of linear contours and non-linear contours in the window image; When at least two non-linear contours, or at least one non-linear contour and one linear contour are identified, the corresponding contours are determined as target contours, and target feature points in the target contours are extracted; The alignment feature group data of the window image is generated based on the target contour and the corresponding target feature points.
4. The method according to claim 2, characterized in that: Before performing the alignment according to the aligned window images within the adjacent range of the window images, the method further includes: Determine whether the adjacent range of the current window image contains an aligned window image; When the adjacent range contains an aligned window image, the alignment is performed based on the aligned window image in the adjacent range; When the adjacent range does not contain the aligned window image, the current window image is temporarily stored. If the adjacent range of the current window image contains the aligned window image, alignment is performed based on the aligned window image.
5. The method according to claim 2, characterized in that: The step of performing the alignment according to the aligned window images within the adjacent range of the window images includes: Taking the current window image as the center, obtain the aligned candidate alignment window images in the surrounding adjacent range; When the candidate alignment window images include at least one image aligned according to the target contour and the target feature points, determine it as the target alignment window image; When the candidate alignment window images do not contain an image aligned according to the target contour and the target feature points, a candidate aligned window image in a different row and column from the current window image is selected as a target alignment window image; Image stitching alignment is performed according to the target alignment window image and its positional relationship with the current window image.
6. The method according to claim 3, characterized in that The step of determining the corresponding contour as the target contour comprises: When the recognized contour includes a non-linear contour, the non-linear contour and at least one linear contour are determined as target contours; When the recognized contours include at least two non-linear contours of different shapes and sizes, determining the at least two non-linear contours as target contours; When the identified contours only include linear contours and non-linear contours with similar shapes and sizes, at least two non-linear contours with similar shapes and at least one linear contour are selected as target contours; When the identified contours only include at least two non-linear contours with similar shapes and sizes, at least two non-linear contours close to the edge of the image are taken as target contours; the positional relationship between the several target contours is recorded, and contour alignment is performed after alignment data is generated.
7. The method according to claim 3, characterized in that When the identified contours only include one non-linear contour, or only include a number of linear contours, it is determined that the window image does not contain alignment feature group data, and an alignment operation is performed.
8. An image alignment device, characterized in that: The device comprises: An extraction module is used to obtain a scanned image of the circuit board to be tested, identify and extract any unit area in the circuit board to be tested; A segmentation module, used to segment the target unit area into a number of partitions based on a preset segmentation rule to generate a window image set; The alignment module is used to extract the window images in the window image set, map them one by one to the master image corresponding to the target unit area according to the image contours, and align the images according to the image contours so as to perform defect detection according to the master image.
9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the image alignment method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the image alignment method as described in any one of claims 1 to 7.
Citation Information
Cited By
AOI element dislocation identification method based on anti-capture logic
CN121904052A
A method for identifying misaligned AOI components based on reverse grabbing logic
CN121904052B