Multi-layer matching measurement method applied to image measurement device and image measurement device

By determining the workpiece matching model and local matching model in the image measurement device, and combining the moving image capture of the scanning device, the feature area of ​​the workpiece to be measured is automatically identified and matched, which solves the problem of low efficiency and accuracy of measurement results in the prior art, and realizes efficient and accurate measurement without human positioning.

CN122429705APending Publication Date: 2026-07-21CHOTEST TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHOTEST TECH INC
Filing Date
2025-12-22
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing image measurement equipment requires manual instruction on the specific placement of the workpiece on the stage during automatic measurement. Furthermore, the workpiece in the measurement template program is usually not exactly the same as the workpiece to be measured in terms of placement and the features to be measured, resulting in low efficiency and accuracy of the measurement results.

Method used

By determining the workpiece matching model and local matching model based on the workpiece image of the template workpiece, and combining the moving image of the scanning device, the feature measurement area of ​​the workpiece to be measured is automatically identified and matched, realizing efficient and accurate measurement without the need for manual positioning.

Benefits of technology

It improves the efficiency and accuracy of measurement results from image measurement equipment, ensuring efficient feature scanning and measurement without the need for manual workpiece positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122429705A_ABST
    Figure CN122429705A_ABST
Patent Text Reader

Abstract

The application relates to a multi-layer matching measurement method applied to an image measurement device and the image measurement device. The method comprises the following steps: determining a workpiece matching model and at least one local matching model based on a workpiece image of a template workpiece; the workpiece matching model is used for determining at least one workpiece matching area in a first to-be-measured image comprising at least one to-be-measured workpiece; the at least one workpiece matching area is in one-to-one correspondence with the at least one to-be-measured workpiece; determining at least one first feature measurement model based on the at least one local matching model; the local matching model is used for determining a local matching area corresponding to each workpiece matching area in each workpiece matching area; and determining a relative position relationship between each local matching model and each first feature measurement model to obtain a first relative position relationship. The method can improve the efficiency and accuracy of a measurement result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of measurement technology, and in particular to a multi-layer matching measurement method and an image measurement device for use in image measurement equipment. Background Technology

[0002] With the rapid development of measurement technology, image measurement equipment has emerged. Image measurement equipment can be used to extract the geometric features of a workpiece (exemplarily, such as planar features, line features, point features, or other features), and calculate the length, angle, or other geometric information of the workpiece based on these features. Based on this, it is possible to determine whether the machining accuracy of the workpiece meets the industrial design requirements.

[0003] In the process of measuring multiple workpieces, the measurement process can be saved as a measurement template program. However, on the one hand, existing measurement methods require manual input to the image measuring equipment regarding the specific placement of the workpiece on the stage during automated measurement. On the other hand, the workpiece used to create the measurement template program is usually not identical to the workpiece used for subsequent automated measurement, both in terms of placement and the features to be measured. Clearly, these factors result in lower efficiency and accuracy of the measurement results obtained from automated workpiece measurement based on the measurement template program. Summary of the Invention

[0004] Therefore, it is necessary to provide a multi-layer matching measurement method and image measurement equipment that can improve the efficiency and accuracy of measurement results, addressing the aforementioned technical problems.

[0005] In a first aspect, this application provides a multi-layer matching measurement method applied to an image measuring device. The image measuring device includes a stage and a scanning device, which are movable relative to each other. The stage and the scanning device are arranged opposite to each other, and at least one workpiece to be measured is placed on the stage. The method includes:

[0006] Based on the workpiece image of the template workpiece, determine the workpiece matching model and at least one local matching model;

[0007] Based on at least one local matching model, determine at least one first feature measurement model;

[0008] Determine the relative positional relationship between each local matching model and each first feature measurement model to obtain the first relative positional relationship;

[0009] The control scanning device captures an image of a first selected area of ​​the stage to obtain a first image to be measured, the first image to be measured including at least one workpiece to be measured;

[0010] Based on the first image to be measured and the workpiece matching model, at least one workpiece matching region is determined in the first image to be measured; there is a one-to-one correspondence between the at least one workpiece matching region and at least one workpiece to be measured.

[0011] Based on the matching regions of each workpiece and the local matching model, the local matching regions corresponding to the matching regions of each workpiece are determined.

[0012] Based on the local matching area corresponding to the matching area of ​​each workpiece and the first relative positional relationship, the first feature measurement area of ​​each workpiece to be measured is determined.

[0013] Based on the first feature measurement area of ​​each workpiece to be measured, the measurement result of at least one workpiece to be measured in the first image to be measured is determined.

[0014] Secondly, this application also provides an image measuring device, which includes a stage, a scanning device, a memory, and a processor. The stage and the scanning device are movable relative to each other. The stage and the scanning device are arranged opposite to each other. Multiple workpieces to be measured are placed on the stage. The memory stores a computer program. When the processor executes the computer program, it implements some or all of the steps described in any of the methods in the first aspect of the embodiments of this application.

[0015] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement some or all of the steps described in any method of the first aspect of the embodiments of this application.

[0016] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements some or all of the steps described in any method of the first aspect of the embodiments of this application.

[0017] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements some or all of the steps described in any method of the first aspect of the embodiments of this application.

[0018] The aforementioned multi-layer matching measurement method and image measurement equipment applied to image measurement equipment firstly determine, based on the workpiece image of the template workpiece, a workpiece matching model, at least one local matching model, at least one first feature measurement model, and the first relative positional relationship between each local matching model and each first feature measurement model to complete the measurement template creation process. Then, the scanning device is controlled to capture a first selected area of ​​the stage to obtain a first image to be measured. Based on the first image to be measured and the workpiece matching model, at least one workpiece matching area is determined in the first image to be measured. Based on each workpiece matching area, local matching model, and the first relative positional relationship, the first feature measurement area of ​​each workpiece to be measured can be determined, and the first feature measurement area is scanned to complete the scanning process of at least one workpiece to be measured in the first image to be measured. Based on this, on the one hand, the image measurement equipment does not need to obtain the specific placement position of at least one workpiece to be measured on the stage before measurement. On the other hand, the multi-layer matching measurement method applied to the image measurement equipment can ensure accurate scanning of the first feature measurement area, thereby improving the efficiency and accuracy of the obtained measurement results. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the structure of an image measurement device in one embodiment;

[0021] Figure 2 This is a flowchart illustrating a multi-layer matching measurement method applied to an image measurement device in one embodiment;

[0022] Figure 3 This is a schematic diagram of the structure of the image display interface in one embodiment;

[0023] Figure 4 This is a schematic diagram of the image display interface in another embodiment;

[0024] Figure 5 This is a schematic diagram of the structure of the image display area in one embodiment;

[0025] Figure 6 This is a schematic diagram of the structure of the image display area in another embodiment;

[0026] Figure 7 This is a schematic diagram of the structure of the image display area in yet another embodiment;

[0027] Figure 8 for Figure 6 A magnified schematic diagram of a part of a workpiece image under medium to high magnification.

[0028] Figure 9 This is a schematic diagram of the structure of the image display area in yet another embodiment;

[0029] Figure 10 This is a schematic diagram of the structure of the image display interface in another embodiment;

[0030] Figure 11 This is a schematic diagram of the structure of the image display interface in another embodiment;

[0031] Figure 12 This is a schematic diagram of the structure of the image display area in another embodiment. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0033] Figure 1 This is a schematic diagram of the structure of an image measuring device provided in an embodiment of this application. The multi-layer matching measurement method (also known as a multi-layer matching scanning method for image measuring devices, etc.) provided in this embodiment of the application can be applied to, for example... Figure 1 The image measuring device 10 shown (such as an image measuring instrument or a flash measuring instrument) includes a stage 102 and a scanning device 104. The stage 102 and the scanning device 104 are movable relative to each other. The stage 102 and the scanning device 104 are arranged opposite to each other. The stage 102 can be used to place one or more workpieces 106 to be measured.

[0034] In one exemplary embodiment, Figure 2 This is a flowchart illustrating a multi-layer matching measurement method applied to an image measurement device, as provided in this embodiment. Figure 2 As shown, a multi-layer matching measurement method for image measurement equipment is provided. This method is applied to... Figure 1 The image measurement equipment in the process includes the following steps 202 to 216. Wherein:

[0035] Step 202: Based on the workpiece image of the template workpiece, determine the workpiece matching model and at least one local matching model.

[0036] Among them, image measurement equipment is a precision measuring instrument that can extract planar features, straight line features, point features, hole features or other geometric features of workpieces (including template workpieces and workpieces to be measured), and calculate the length, angle, contour and other dimensional information of the workpieces. Image measurement equipment can be used to determine whether the processing accuracy of the workpiece to be measured meets the industrial design requirements.

[0037] The image measurement device is equipped with measurement software and includes an interactive image display interface. The image display interface can display workpiece images, so that users can complete the creation process of measurement templates on the image display interface, and can also view the measurement results of at least one workpiece in the first image to be measured on the image display interface.

[0038] For example, such as Figure 3 As shown, the image display interface of the image measurement device includes a toolbar 302, a taskbar 304, an image display area 306, and a lens magnification switching button 308. The toolbar 302 may include tools such as a local matching tool, a workpiece matching tool, a feature tool, and a dimensioning tool that the user can select. The taskbar 304 may include the user-selected first feature measurement model, the name of the first feature measurement model set by the user, and the specific feature type corresponding to the first feature measurement model. That is, the taskbar 304 may include the various execution steps of the measurement template program, so that the measurement software can automatically execute the measurement template program according to the various execution steps and execution order in the taskbar 304. The image display area 306 displays the images captured by the scanning device, such as real-time captured images or images recorded during the capturing process, such as stitched images. The image display area 306 can also display the current field of view of the scanning device. Figure 3 The scanning device shown includes a template workpiece 310 within its field of view. A lens magnification switching button 308 allows the user to switch the lens magnification of the scanning device to display images captured under high magnification or low magnification in the image display area 306.

[0039] A scanning device is a component in an image measuring device used to capture images of a workpiece placed on a stage. The scanning device and the stage can move relative to each other to allow the scanning device to capture images of the workpiece on the stage, enabling the image measuring device to scan the workpiece. This application describes the following scheme by moving the scanning device to capture images of different workpieces separately. Optionally, the scanning device can be a scanning camera.

[0040] Optionally, the images obtained after the scanning device captures an image can all be grayscale images. That is to say, when the workpiece image is obtained by the scanning device, the first image to be measured and the second image to be measured mentioned below can all be grayscale images. Optionally, the workpiece image, the first image to be measured and the second image to be measured mentioned below can also all be binarized images.

[0041] The stage and the scanning device are positioned opposite each other, meaning that the scanning range of the scanning device is aligned with the stage.

[0042] A template workpiece refers to a sample workpiece used to define the workpiece matching model and at least one local matching model; that is, a sample workpiece used to establish a measurement template. It can be understood that the measurement template established using the template workpiece can be used not only for at least one workpiece to be measured placed on the stage in the current batch, but also for at least one workpiece to be measured in subsequent batches. This is as long as the template workpiece and the workpiece to be measured have the same measurement requirements.

[0043] Optionally, the template workpiece can be a complete solid workpiece or a unit on a complete solid workpiece. For example, a solid workpiece may include multiple units with the same measurement requirements (i.e., repetitive structures), and one of these units can serve as the template workpiece. For instance, if a printed circuit board has multiple chips with the same measurement requirements, one of these chips can serve as the template workpiece.

[0044] The workpiece image includes a configuration image containing the template workpiece. The configuration image may include the entire template workpiece, or at least cover the area of ​​the template workpiece that needs to be selected and set later. Optionally, the workpiece image may be obtained by a scanning device capturing an image of the template workpiece placed on a stage, or it may be a design image of the template workpiece. If the workpiece image is a design image of the template workpiece, the corresponding design file may be imported by the user into the measurement software, thereby enabling the measurement software to display the design image in the image display interface.

[0045] Based on this, in an exemplary embodiment, the above method further includes:

[0046] Obtain the workpiece image of the template workpiece;

[0047] The workpiece image is either a design image of the template workpiece or a second image to be measured obtained by scanning a second selected area of ​​the stage.

[0048] When the scanning device has a large field of view, the workpiece image of the template workpiece is a single, complete image without stitching, i.e., a single captured image. When the scanning device has a small field of view, the workpiece image of the template workpiece can be formed by stitching together multiple captured images, which are obtained by the scanning device taking images at different positions. It is easy to understand that when the workpiece image is formed by stitching together multiple captured images, these multiple captured images can be understood as multiple sub-workpiece images used to stitch together the final workpiece image. For example, a large field of view for the scanning device could be a flash meter, or a field of view greater than or equal to a field of view threshold; a small field of view for the scanning device could be an image measuring instrument, or a field of view less than a field of view threshold.

[0049] For example, the template workpiece is a solid workpiece placed on a stage; after the scanning device is turned on, the scanning device and the stage can move relative to each other. By adjusting the relative position of the scanning device to the stage, the scanning device is positioned above the template workpiece and an image is captured. After obtaining the captured image of the template workpiece, the workpiece image of the template workpiece can be obtained using the captured image.

[0050] In a flash photometer, the scanning device typically moves only along the Z-axis (representing depth or height) of the coordinate system for focusing. The stage containing the template workpiece can move along the X-axis (horizontal direction, representing left-right position) and the Y-axis (vertical direction, representing up-down position in the plane) to adjust the relative position between the template workpiece and the scanning device. The flash photometer's scanning device has a large field of view, covering the entire template workpiece. A single image capture can obtain a complete workpiece image, including the template workpiece. Figure 3 As shown, a single field-of-view image can completely cover the template workpiece 310. However, this is not the only possibility; images can also be captured at different locations within the template workpiece's area to obtain multiple images covering different regions of the template workpiece. These multiple images can then be stitched together to obtain the workpiece image.

[0051] In an imaging system, depending on the type of imaging system, the scanning device and / or the stage can move along the X-axis and Y-axis, respectively. The scanning device of the imaging system can be configured with multiple different lens magnifications. The scanning device can adjust the height difference between itself and the template workpiece by moving along the Z-axis to adapt to focusing at different lens magnifications. Generally, the field of view of the scanning device of the imaging system is relatively small, requiring image capture at different positions within the location of the template workpiece to obtain multiple scanned images covering different areas of the template workpiece. The workpiece image can be obtained by stitching together these multiple scanned images. However, this is not the only possibility. For some smaller template workpieces, a single field of view of the imaging system can directly cover the entire template workpiece. That is to say, whether image stitching is necessary is determined by the size of the imaging system's field of view and the size of the template workpiece. Image stitching is only necessary when a single field of view cannot completely cover a single template workpiece or the workpiece under test.

[0052] The workpiece to be measured refers to the workpiece for which the measurement result needs to be determined by the multi-layer matching measurement method for image measuring equipment provided in the embodiments of this application.

[0053] A workpiece matching model is an image segment extracted from a template workpiece image, used to identify image segments with the same or similar image features as the template workpiece in a first image to be measured, which includes the workpiece to be measured. Since the workpiece matching model of the template workpiece corresponds to the workpiece matching model of each workpiece to be measured, the workpiece to be measured can be identified from the first image to be measured, based on the workpiece matching model.

[0054] It should be noted that, in order to successfully identify the workpiece matching region with the same or similar image features as the template workpiece in the subsequent first image to be measured, the workpiece matching model should have sufficient visual saliency relative to the template workpiece. Optionally, visual saliency can be reflected in the workpiece matching model being large enough or having a distinctive shape, etc., as long as it makes it easier for the measurement software to identify and distinguish it. This application does not impose any limitations on this.

[0055] In other words, an image region is selected from the workpiece image of the template workpiece, and the image in this region is used as the workpiece matching model. Optionally, the selected image region can cover the entire template workpiece; however, to reduce the computational complexity of matching the workpiece matching region in subsequent measurements, the workpiece matching model can also cover most of the template workpiece. For example, it can cover at least 60% of the image content of the template workpiece, and preferably include the key edges of the template workpiece. Key edges can be, for example, contour segments that are unique to the target or visually significant, such as corners, holes, etc. It should be noted that the key edges used to determine the workpiece matching model are preferably not easily deformed locally relative to the template workpiece as a whole, to ensure that the subsequent matching based on the workpiece matching model can more accurately and efficiently match at least one workpiece to be measured in the first image to be measured.

[0056] like Figure 4 As shown, specifically, the workpiece matching model 402 can be achieved by using a rectangular image mask to select a workpiece matching pattern 406 (i.e., a rectangular area pattern) within the workpiece image of the image display area 404, and then extracting the actual workpiece pattern from this rectangular area pattern as the workpiece matching model 402. Optionally, the workpiece matching model 402 can be saved as a binary image. Alternatively, the workpiece matching model 402 can also be set to use an image mask of other shapes for selection. For example, the shape of the image mask can be a circle, a polygon, or other shapes. The specific shape of the image mask can be determined based on the approximate shape of the area to be selected, thereby finding a matching shape for selection.

[0057] After determining the workpiece matching model, the relative position coordinates of the workpiece matching model in the current coordinate system can be determined. The coordinate system can be the world coordinate system (i.e., the stage coordinate system) by default, or it can be adjusted to other coordinate systems, such as the set workpiece coordinate system.

[0058] like Figure 4As shown, during the measurement program for creating a measurement template, the workpiece matching tool 408-2 can be selected in the toolbar 408 of the image display interface. In the pop-up page 408-4 of the workpiece matching tool, matching can be performed based on the similarity of image shapes or the similarity of image grayscale. Similarity matching refers to the comparison of the similarity between the image to be measured presented in the image display interface and the workpiece matching model 402 during subsequent measurement. Based on this, the image measurement device can find workpiece matching areas in the image to be measured presented in the current image display interface during the measurement process that meet the set similarity threshold. The similarity threshold can be adjusted; for example, it can be adjusted to 0.75. That is, as long as the similarity between the current image display interface and the workpiece matching model 402 is not less than 0.75, it can be selected as a workpiece matching area. If the similarity of the image area with the highest similarity to the workpiece matching model 402 is less than 0.75, a matching failure signal is issued, and no further action is taken on the workpiece to be measured. In practical applications, the image to be measured presented in the image display interface may contain images of multiple workpieces to be measured. This will result in multiple image regions with a similarity of not less than the similarity threshold in the current image display interface. At this time, these image regions can be used as workpiece matching regions to achieve synchronous measurement of multiple workpieces to be measured.

[0059] If the workpiece to be measured is not present in the first image to be measured during the measurement process, the measurement software will report an error, and all subsequent steps will also report errors. The corresponding measurement template program in the taskbar of the image display interface will be displayed in red to remind you of the error, or the word FAIL will be displayed on the image.

[0060] If there are multiple workpieces to be measured in the current image display interface or the first image to be measured, and at least one workpiece fails to match the workpiece matching model, it is considered that the measurement software has not recognized the workpiece to be measured and skips the workpiece that failed to match. At this time, the subsequent matching measurement process can still be performed on other workpieces that have successfully matched with the workpiece matching model.

[0061] Optionally, the synchronous measurement of multiple workpieces to be measured can be performed by measuring each workpiece sequentially, or by measuring each workpiece simultaneously according to a measurement template program. This application does not limit the specific measurement method.

[0062] To ensure higher accuracy in subsequent matching processes, during the selection of the workpiece matching model based on the image mask for the image region, parameters such as grayscale sensitivity and morphological denoising iteration of the pattern region selected based on the image mask can be adjusted to reduce the impact of image noise. Furthermore, in the pop-up page 408-4 of the workpiece matching tool, the pattern in the pattern region can be saved as a binary image to serve as the workpiece matching model.

[0063] Optionally, the matching model or matching area search method of the image measurement device can also be set. This can be done in the subsequent matching action by setting a rotation search, a translation search, or other search methods in the image display area 404 in the pop-up page 408-4 of the workpiece matching tool. Considering that the placement angle of the workpiece to be measured may be different, this embodiment can choose to search the workpiece matching model or local matching model of the workpiece to be measured by rotation search. Of course, if the placement angle of each workpiece to be measured is the same as that of the template workpiece, a translation search can also be selected to eliminate the interference caused by the angle, reduce the matching complexity, and improve the matching efficiency.

[0064] The local matching model is obtained after the workpiece matching model is determined, by further extracting local positions of the template workpiece based on the workpiece matching model. The local position can be the internal region or the surrounding region of the workpiece matching model. The internal region or the surrounding region is used as the local matching model so that the local matching model can be used to identify image segments that include the first feature measurement region in the internal region or the surrounding region of the workpiece matching model.

[0065] The size of the local matching model is usually smaller than the size of the workpiece matching model.

[0066] There is a correlation between the workpiece matching model and at least one local matching model determined for the workpiece image of the same template workpiece.

[0067] Optionally, the local matching model does not need to be subject to too many restrictions. However, the local matching model can be used for areas of the template workpiece that require attention to measurement data and / or are prone to local deformation. Areas prone to local deformation refer to areas that are likely to deform due to the material, shape, or other factors of the template workpiece.

[0068] Similarly, as Figure 5As shown, select the Local Matching Tool in the toolbar of the measurement software, and use the Local Matching Tool to select a local matching pattern 502 on the workpiece image in the image display area. This selected local matching pattern 502 is then used as the local matching model 504. In practical applications, both the Local Matching Tool and the Workpiece Matching Tool are matching tools. Typically, the first pattern selected by this matching tool can be used as the workpiece matching pattern to establish the workpiece matching model. Subsequent local matching models are established sequentially according to the selection order. That is, for a template workpiece, there can be one or more local matching models. Alternatively, the Local Matching Tool and the Workpiece Matching Tool can be set as two independent and different matching tools in the toolbar of the measurement software. Thus, the workpiece matching tool is used when selecting the workpiece matching pattern, while the local matching tool is used when selecting the local matching pattern 502. Similarly, after determining the local matching model 504, the relative position coordinates of each local matching model 504 in the current coordinate system can be determined.

[0069] In practical applications, the local matching pattern can be limited to the workpiece matching model for selection, thereby ensuring that the local matching model is located within the workpiece matching model. During subsequent matching measurements, the local matching region corresponding to the local matching model is searched only within or around the workpiece matching area successfully matched by the workpiece matching model. However, this is not limited to this; the local matching pattern can also be selected outside the workpiece matching model, thereby ensuring that the local matching model is located outside the workpiece matching model.

[0070] In the matching measurement process of local matching models, each local matching model searches for an image region with the highest similarity to the local matching model and greater than or equal to a similarity threshold within or around the workpiece matching area of ​​each workpiece to be tested. That is to say, each local matching model will correspond to at most one local matching region within the workpiece matching area of ​​each workpiece to be tested.

[0071] Optionally, during the process of establishing multiple local matching models in the workpiece image, the positions of the multiple local matching models can be parallel or nested. A nested relationship means that another local matching model is further set within the internal region of one local matching model; a parallel relationship means that there is no nesting relationship between the two local matching models, that is, one local matching model is not completely covered by another local matching model.

[0072] If the workpiece image is captured by a scanning device, it may also include an auxiliary configuration image. The auxiliary configuration image and the configuration image can be captured at different lens magnifications. Specifically, some areas in the configuration image may be blurry. In this case, the lens magnification of the scanning device can be adjusted (e.g., to a high-magnification lens) to capture the template workpiece and obtain the auxiliary configuration image, which is the field-of-view image captured at the current lens magnification. The auxiliary configuration image can assist the workpiece image in setting the measurement template program.

[0073] Typically, the auxiliary configuration image is captured using a higher magnification lens, providing a clearer view of the measured local location. In this case, the workpiece matching model is extracted from the configuration image; the local matching model can be extracted from either the configuration image or the auxiliary configuration image. The feature measurement model required for this local location is preferentially selected from the auxiliary configuration image. This ensures that the image used for feature extraction is clear enough to obtain more accurate measurement results.

[0074] For example, such as Figure 6 As shown, the lens magnification can be switched to high magnification to photograph the template workpiece and obtain an auxiliary configuration image 602 under a high magnification field of view. This auxiliary configuration image 602 can be simultaneously displayed on the configuration image 604 under a low magnification field of view. For example, the configuration image 604 under a low magnification field of view can be used as the bottom layer image, while the auxiliary configuration image 602 under a high magnification field of view is its upper layer image; that is, they are in different layers. The scanning device or stage is moved so that the auxiliary configuration image 602 under a high magnification field of view covers the pattern to be selected, so that a local matching model 606 can be established on the auxiliary configuration image 602 under a high magnification field of view. Similarly, the associated feature measurement model can also be established in the image under a high magnification field of view. When the scanning device is switched to a high magnification lens, the relative position coordinates of the scanning device in the current coordinate system can be obtained, allowing the determination of the positional relationship between the high magnification workpiece image and the workpiece matching model, as well as the positional relationship between the local matching model 606 established under a high magnification field of view and the workpiece matching model. When the lens magnification of the scanning device is adjusted again or the lens is switched back to a low magnification lens, the workpiece image under the previous lens magnification (referred to as the previous lens magnification) will be hidden, or it can be adjusted to be the bottom layer image below the workpiece image under the current lens magnification by adjusting the layer order. The local matching model, feature measurement model, etc. created on the workpiece image under the previous lens magnification can be displayed in the corresponding position of the workpiece image and / or configuration image under the current lens magnification.

[0075] It should be noted that since different measurement scenarios have different measurement requirements, the local matching model may also differ in different measurement scenarios. For example, although... Figure 5 and Figure 6 The term "local matching model" is involved in both, however, due to Figure 5 and Figure 6 These correspond to different measurement scenarios in different implementations, therefore... Figure 5 Local matching model 504 and Figure 6 The local matching model 606 points to different locations. It is easy to understand that this difference arises from the different measurement requirements corresponding to different measurement scenarios in different embodiments, ensuring that each embodiment can accurately and as expected achieve its measurement function. Therefore, although... Figure 5 and Figure 6 The term "local matching model" is involved in all of these studies, but the specific parts or measurement content they refer to differ in different measurement scenarios.

[0076] Based on this, in an exemplary embodiment, the workpiece image includes a configuration image and an auxiliary configuration image; at least one local matching model includes at least one first local matching model and at least one second local matching model;

[0077] The above-mentioned workpiece image based on the template workpiece determines the workpiece matching model and at least one local matching model, including:

[0078] Based on the workpiece image of the template workpiece, determine the workpiece matching model;

[0079] Based on the configuration image, at least one first local matching model corresponding to the workpiece matching model is determined;

[0080] Based on the auxiliary configuration image, at least one second local matching model corresponding to the workpiece matching model is determined; the configuration image and the auxiliary configuration image are respectively captured by the scanning device at different lens magnifications.

[0081] Optionally, the configuration image can be a workpiece image under a low magnification field of view; in other words, it is captured by the scanning device at a low lens magnification. Correspondingly, the auxiliary configuration image can be a workpiece image under a high magnification field of view; in other words, it is captured by the scanning device at a high lens magnification. That is to say, the configuration image corresponds to the first magnification, the auxiliary configuration image corresponds to the second magnification, and the first magnification is less than the second magnification.

[0082] The aforementioned process of establishing a local matching model and a feature measurement model by switching the lens magnification of the scanning device can be recorded in the measurement template program. In this case, during the measurement process, when the measurement template program executes the step of determining the local matching pattern on the workpiece image under the current high magnification field of view, it can automatically adjust the lens magnification of the scanning device and, based on the position coordinates of the workpiece matching model and the aforementioned relative positional relationship, adjust the position of the scanning device relative to the workpiece to be measured to obtain the first image to be measured under the high magnification field of view. This image is then used as the search range to search for image regions greater than or equal to the similarity threshold as the local matching region of the workpiece to be measured. It can be seen that, in this case, by introducing the workpiece image under the high magnification field of view to set the local matching model, the search range can be further limited during the subsequent matching process of the local matching model, thereby improving the matching efficiency and accuracy in the matching measurement process. Similarly, the process of establishing a feature measurement model by switching the lens magnification of the scanning device described below can also be recorded in the measurement template program, and it also has the effect of improving the matching efficiency and accuracy of the first feature measurement model or the second feature measurement model, so it will not be elaborated further below.

[0083] Step 204: Determine at least one first feature measurement model based on at least one local matching model.

[0084] The first feature measurement model refers to the key feature model located in the corresponding local matching model that needs to be scanned.

[0085] There is a one-to-one correspondence between at least one local matching model and at least one first feature measurement model.

[0086] Optionally, after determining at least one first feature measurement model based on at least one local matching model in the workpiece image of the template workpiece, the measurement result of the template workpiece can be obtained based on the first feature measurement model, or the workpiece to be measured can be measured directly without measuring the template workpiece.

[0087] There is a correlation between at least one local matching model and at least one first feature measurement model. The first feature measurement model that is correlated with the local matching model will change as the corresponding local matching model changes.

[0088] Since the overall features of the workpiece under test may shift due to different placement angles, meaning the entire workpiece may deflect, a workpiece matching model is needed to locate the workpiece. Then, based on the located workpiece, corresponding features are generated through matching. Because some features of the workpiece are prone to local positional changes or deformations relative to the overall workpiece due to processing or assembly errors, these features can be selected as those requiring local image matching, i.e., matching can be performed using a local matching model.

[0089] In practical applications, if it is necessary to associate the created first feature measurement model with a local matching model, the created first feature measurement model can be selected in the taskbar of the measurement software to adjust the associated local matching model. Since there is at least one local matching model, it is possible to select which local matching model to associate a specific first feature measurement model with. During this process, it is not necessary to select the workpiece matching model associated with the local matching model. In this embodiment, both the created local matching model and the feature measurement model are associated with the workpiece matching model by default. The association between the local matching model and the workpiece matching model is direct, and the association between the local matching model and the first feature measurement model is also direct. Therefore, the association between the first feature measurement model and the workpiece matching model is indirect.

[0090] Each first feature measurement model created in the measurement software can be displayed in the taskbar. The name of each first feature measurement model in the taskbar can correspond to a specific feature type (for example, the feature type can be a point feature, line feature, circle feature, etc.). Optionally, for first feature measurement models that require image matching, the matching names of the associated local matching models can be additionally displayed in the remarks section of the measurement software. This allows users to easily see which local matching model a particular first feature measurement model is associated with, thereby facilitating the differentiation of different first feature measurement models.

[0091] It should be noted that, to ensure the first feature measurement model can be matched to the correct position of the template workpiece, any local matching model and its associated first feature measurement model are generally established in the same workpiece image. However, this is not limited to this; the local matching model and its associated first feature measurement model may also be established in images different from the same workpiece image, specifically in images under different magnification fields of view. For example, the local matching model may be created in the configuration image, and the first feature measurement model associated with that local matching model may be created in the auxiliary configuration image. The establishment process between the second feature measurement model and the workpiece matching model is similar, and therefore will not be repeated below. The first and second feature measurement models are collectively referred to as feature measurement models.

[0092] Dimensioning can be performed based on two first feature measurement models to obtain measurement data about the template workpiece based on the dimensioning. For example, the measurement data corresponding to the dimensioning can be, for example, the distance between two feature lines, the angle between two feature lines, or the distance between a circle feature and a line feature, etc.

[0093] It should be noted that in this embodiment, there are no strict restrictions on the creation order of the local matching model, the first feature measurement model, and the dimension annotations in the first feature measurement model, because the order of the various execution steps in the taskbar of the measurement software can be adjusted. For example, even if the local matching model is created after the first feature measurement model is created, it is only necessary to insert the order of the local matching model before the first feature measurement model, and then change the first feature measurement model to be associated with the local matching model that is executed before it.

[0094] The process of determining at least one first feature measurement model based on a local matching model can be specifically as follows: In the workpiece image of the template workpiece, a first feature measurement model is created, and the first feature measurement model is associated with the corresponding local matching model. For example, a feature tool of the corresponding category (e.g., a line feature tool, arc feature tool, or circle feature tool, etc.) can be selected in the toolbar of the measurement software first, and then the edges of that category are selected based on the local matching model in the workpiece image of the template workpiece to create the first feature measurement model. The created first feature measurement model can be displayed on the workpiece image. Optionally, the first feature measurement region can be selected within the workpiece image range covered by the associated local matching model.

[0095] Similarly, the process of determining at least one second feature measurement model based on the workpiece matching model can be specifically as follows: In the workpiece image of the template workpiece, the second feature measurement model is selected. For example, the corresponding category of feature tool can be selected in the toolbar of the measurement software first, and then the edge of that category can be selected in the workpiece image of the template workpiece to select and create the second feature measurement model. The created second feature measurement model can be displayed on the workpiece image. Thus, the second feature measurement model is determined in the workpiece image of the template tool, and the second feature measurement model is associated with the workpiece matching model by default.

[0096] For example, taking a common line feature as an example: After selecting the line feature tool in the measurement software's toolbar, a selected line can be drawn along the desired line feature (e.g., the linear edge of the workpiece) in the workpiece image of the template workpiece. The measurement software will automatically generate a first feature measurement model (or a second feature measurement model) based on pre-set scanning parameters and display it in the workpiece image of the template workpiece. After determining the first feature measurement model (or the second feature measurement model), the relative position coordinates of the first feature measurement model (or the second feature measurement model) in the current coordinate system can be determined. This allows the positional relationship between the first feature measurement model and the local matching model to be determined based on their relative position coordinates, i.e., the first relative positional relationship. Alternatively, the positional relationship between the second feature measurement model and the tool matching model can be determined based on their relative position coordinates, i.e., the second relative positional relationship.

[0097] In an exemplary embodiment, the workpiece image includes a configuration image and an auxiliary configuration image; at least one second feature measurement model includes at least one first magnification second feature measurement model and a second magnification second feature measurement model;

[0098] The above-mentioned determination of at least one second feature measurement model based on the workpiece matching model includes:

[0099] Based on the configuration image and the workpiece matching model, determine the first magnification and second feature measurement model corresponding to the workpiece matching model;

[0100] Based on the auxiliary configuration image and the workpiece matching model, the second magnification and second feature measurement model corresponding to the workpiece matching model are determined; the configuration image and the auxiliary configuration image are respectively captured by the scanning device at different lens magnifications.

[0101] The first magnification second feature measurement model can be a second feature measurement model under low magnification field of view. Correspondingly, the second magnification second feature measurement model can be a second feature measurement model under high magnification field of view.

[0102] It should be noted that the first feature measurement model and the local matching model each set the same coordinate system category as their references. At the same time, the second feature measurement model and the workpiece matching model each set the same coordinate system category as their references.

[0103] For example, such as Figure 7As shown, after selecting the line feature tool in the measurement software's toolbar, a selected line can be drawn along the desired line feature in the workpiece image of the template workpiece. The measurement software will use the selected line as the center line and form a measurement area 702 according to the set scan line length. This measurement area 702 can be used as the generated feature measurement model. After the measurement area 702 is generated, the measurement software will extract the edge features within the area in the form of scan lines using the software's internal edge detection algorithm to obtain feature elements 704. During the selection of the measurement area 702, relevant scan parameters can be set, including the scan direction of the scan line 706. Figure 7 The "→" symbol indicates the scanning direction of scan line 706. It is easy to understand that the actual coverage position is adjusted by stretching or dragging the measurement area 702 to determine the edge features that need to be measured.

[0104] For example, scanning parameters, in addition to the scanning direction of the scan lines, may also include at least one of the following: scanning speed, dot density, and scan line length. The scan line length corresponds to the width of the feature measurement region. It is easy to understand that, based on appropriate scanning parameters, it is possible to ensure that the extracted edge features more closely resemble the actual situation, thereby guaranteeing high accuracy of the measurement results.

[0105] The scan line length refers to the length of the scan line used to scan the corresponding feature measurement area (i.e., the first feature measurement area or the second feature measurement area). The scan line is used to identify and extract the edge features of the corresponding feature measurement area. A single feature measurement area may include multiple scan lines perpendicular to the selected lines drawn above. During the identification of line features, point features associated with edge features can be identified on the scan line based on conditions such as contrast and distance. Each scan line can correspond to one point feature, meaning a set of point data can be extracted using the corresponding feature measurement area. Subsequently, corresponding edge features, such as feature element 704, can be fitted based on the point data set to complete the identification. During the configuration of the measurement program, the width of the feature measurement area is determined by the scan line length, and the length of the feature measurement area is determined by the length of the selected lines.

[0106] Point density refers to the distance between adjacent scan lines, i.e., the sampling density of scan lines. The higher the point density, the denser the scan lines, meaning the smaller the distance between adjacent scan lines, and the more point features are obtained in the point data set.

[0107] For example, for dimensional features that are relatively small, a first feature measurement model can also be created in the workpiece image under high magnification, such as... Figure 8As shown, in the image display area of ​​the measurement software, the first feature measurement model 802 can also be determined in the auxiliary configuration image 602 under high magnification field of view, thereby achieving higher measurement accuracy.

[0108] Based on the extracted edge features, set the dimension annotations for the measurement data that need to be focused on. After creating the edge features, you can first select the corresponding type of dimension tool in the toolbar of the measurement software (for example, length dimension tool, angle dimension tool, parallelism dimension tool, curvature dimension tool, etc.), and then select the corresponding feature to be measured in the workpiece image. The measurement software will automatically present a schematic diagram of the dimension annotations based on the type of dimension tool and the selected feature.

[0109] For example, suppose the edge features are line features, such as Figure 9 As shown, after selecting the length dimension tool in the toolbar, select two target feature elements 902 in the template workpiece. Based on the positions of the two target feature elements 902, you can determine the dimension data to be measured in the template workpiece, that is, the length distance D1 of the line feature. D1 can also be understood as the dimension annotation of the template workpiece, thus obtaining the length dimension data. Figure 9 The length dimension data is 19.8533. The dimension annotation can be associated with the feature measurement model, facilitating subsequent dimensional measurement during the matching process of each workpiece under test. It is easy to understand that in at least one workpiece under test within the same batch, the required measurement data is the same for each workpiece; therefore, the dimension annotation can be applied to other workpieces under test. That is, by determining the feature measurement area of ​​the workpiece under test and extracting feature elements, it is also possible to determine the dimension annotation associated with the feature measurement area to obtain the corresponding dimensional data.

[0110] In one exemplary embodiment, the method further includes:

[0111] Determine the relative positional relationships between the workpiece matching model and each local matching model to obtain the second relative positional relationship;

[0112] The above-mentioned determination of the local matching region corresponding to each workpiece matching region, based on the matching region of each workpiece and the local matching model, includes:

[0113] Based on the matching areas of each workpiece and the second relative positional relationship, the local matching areas corresponding to the matching areas of each workpiece are determined.

[0114] In an exemplary embodiment, the workpiece image includes a configuration image and an auxiliary configuration image; at least one first feature measurement model includes at least one first magnification first feature measurement model and a second magnification first feature measurement model;

[0115] The above-mentioned determination of at least one first feature measurement model based on at least one local matching model includes:

[0116] Based on the configuration image and at least one local matching model, determine the first magnification and first feature measurement model corresponding to the workpiece matching model;

[0117] Based on the auxiliary configuration image and at least one local matching model, a second magnification first feature measurement model corresponding to the workpiece matching model is determined; the configuration image and the auxiliary configuration image are respectively captured by the scanning device at different lens magnifications.

[0118] The first magnification first feature measurement model can refer to a first feature measurement model under low magnification field of view; in other words, it is obtained by the scanning device at low lens magnification. Correspondingly, the second magnification first feature measurement model can refer to a first feature measurement model under high magnification field of view; in other words, it is obtained by the scanning device at high lens magnification.

[0119] Step 206: Determine the relative positional relationship between each local matching model and each first feature measurement model to obtain the first relative positional relationship.

[0120] Among them, the first relative positional relationship refers to the relative pose of each local matching model and each first feature measurement model in the spatial coordinate system of the stage, that is, the spatial positional relationship and spatial orientation of the two.

[0121] It is easy to understand that since each of the template workpiece and at least one workpiece to be measured has the same measurement requirements, the first relative positional relationship can also characterize the relative pose of the local matching area and the first feature measurement area in the spatial coordinate system of the stage in each workpiece to be measured. The second and third relative positional relationships in the following text are similar, so they will not be described again in the following text.

[0122] After creating the corresponding feature measurement model, it is necessary to record the relative position of the corresponding feature measurement model in the coordinate system. The corresponding feature measurement model can have a fixed relative positional relationship with its associated matching model (i.e., workpiece matching model or local matching model). That is to say, in the subsequent matching measurement process, no matter how the corresponding matching model rotates or moves during the process of finding the corresponding matching area (i.e., workpiece matching area or local matching area) in the first image to be measured by the scanning device, the associated corresponding feature measurement model, which was pre-set in the process of creating the measurement template program, can also rotate or move in the same way. The corresponding feature measurement model always maintains a fixed relative positional relationship with its associated matching model. In other words, the spatial position and spatial direction between the corresponding feature measurement model and the corresponding matching model will remain constant.

[0123] After steps 202-206, which determine the workpiece matching model, at least one local matching model, at least one first feature measurement model, and the first relative positional relationship, all the setting steps in steps 202-206 can be saved to obtain the measurement template program for the template workpiece. The measurement template program contains at least the workpiece matching model, at least one local matching model, at least one first feature measurement model, and the first relative positional relationship. Therefore, when the user needs to measure at least one new batch of workpieces to be measured later, they can directly retrieve the measurement template program with the same measurement requirements from the measurement software. This allows the image measurement equipment to automatically run the measurement template program to automatically measure at least one new batch of workpieces to be measured and automatically obtain new measurement results.

[0124] In a straightforward manner, the measurement software can store measurement template programs for different types of template workpieces, enabling the image measurement device to automatically run the corresponding measurement template program for different types of workpieces to be measured. It is only necessary to ensure that the measurement software stores the corresponding measurement template program that has the same measurement requirements as the workpiece to be measured.

[0125] It is easy to understand that, in the case that there is at least one second feature measurement model that is associated with the workpiece matching model, the measurement template program can also store at least one second feature measurement model and the second relative positional relationship between the workpiece matching model and each second feature measurement model, so this will not be elaborated on below.

[0126] For example, such as Figure 10As shown, the saved template measurement program 1002 list includes multiple execution steps arranged in execution order, with steps having smaller sequence numbers being executed earlier. Thus, after completing step 206, the template program creation process in this embodiment ends. The execution content of steps 208 to 216 can be achieved by retrieving the measurement template program of the template workpiece; that is, the measurement result of at least one workpiece in the first image to be measured can be obtained after the measurement software of the image measurement device executes the measurement template program.

[0127] On the one hand, it can be seen that in the process of creating the measurement template program in this embodiment, it is not necessary to set the placement position of at least one workpiece to be measured on the stage in the measurement template program. That is to say, the measurement software does not know the specific placement position of at least one workpiece to be measured. The measurement software only needs to determine whether there is a workpiece to be measured in the first image to be measured obtained after the image is captured by the scanning device. Whether there is a workpiece to be measured in the first image to be measured is based on the workpiece matching model. Since the image measurement device does not need to know the placement position of at least one workpiece to be measured on the stage in advance, the user does not need to manually enter the placement position of at least one workpiece to be measured on the stage in advance, which can improve the efficiency of the measurement results.

[0128] On the other hand, it can be seen that the measurement program template in this embodiment adopts a multi-layer matching measurement method applied to image measurement equipment. The first layer of image matching refers to using a workpiece matching model to locate the workpiece under test, addressing the issue that at least one workpiece in the first image under test may be offset due to different placement angles or positions, making it difficult to match the corresponding feature measurement areas (first feature measurement area and / or second feature measurement area) of each workpiece in subsequent execution steps. The second layer of image matching refers to using a first local matching model and / or a second local matching model to achieve local matching of corresponding local matching areas (first local matching area and / or second local matching area), addressing the issue that at least one workpiece in the first image under test may be deformed locally due to assembly errors, processing errors, etc., making it difficult to match the corresponding feature measurement area in that local location. Based on this, the accuracy of the obtained measurement results can be improved.

[0129] Step 208: Control the scanning device to take a picture of the first selected area of ​​the stage to obtain the first image to be measured.

[0130] The first image to be measured refers to the current image at which at least one of the workpieces to be measured needs to be measured at the current time point. The first image to be measured is the image displayed on the image display interface at the current time point. This image can also be prepared in advance.

[0131] When executing the measurement template program, the selected first image to be measured may include at least one workpiece to be measured. That is, the first image to be measured may include only one workpiece to be measured, or it may include at least two or more workpieces to be measured. It is easy to understand that the number of workpieces to be measured included in the first image to be measured is determined by the field of view of the scanning device and the size of the workpieces to be measured. Of course, this is not limited to this; the first image to be measured may not contain any workpieces to be measured. In this case, after executing the measurement template program, the measurement software will report an error, and the execution steps in the taskbar will also report an error, such as being displayed in red to provide an error reminder, or the word "FAIL" will be displayed on the first image to be measured to indicate that no workpiece was successfully matched.

[0132] The placement angle of at least one workpiece to be tested on the stage may vary, and the overall placement position of at least one workpiece to be tested may also be offset, resulting in inconsistent orientation of the workpiece matching areas of at least some of the workpieces to be tested. Alternatively, due to processing errors or assembly errors of the workpieces to be tested, some of the workpieces to be tested may experience local deformation, thereby causing inconsistencies in the relative position coordinates and angles of the local matching areas of at least some of the workpieces to be tested in the first measurement image. Similarly, at least one workpiece to be tested included in the first measurement image may also exhibit similar phenomena, which will not be elaborated further here.

[0133] When the scanning device has a large field of view, meaning its field of view is not smaller than the first selected area, a single field-of-view image can be used as the first image to be measured. If there are multiple workpieces to be measured on the stage, the single field-of-view image of the scanning device can include multiple workpieces. In this case, the captured image can be directly used as the first image to be measured, so that in the subsequent matching measurement process, only one first image to be measured can be used to obtain the measurement results of multiple workpieces.

[0134] When the scanning device has a small field of view, i.e., less than the first selected area, it needs to acquire multiple images at multiple locations within the first selected area. These multiple images are then stitched together to obtain a composite image covering the first selected area. In this case, the multiple images can be used as multiple first sub-images to be measured, and the composite image can be used as the first image to be measured. The measurement result of the workpiece within this first image to be measured can then be determined. It should be noted that the composite image obtained by stitching together multiple images can also include multiple workpieces to be measured; therefore, the measurement results of multiple workpieces to be measured can also be obtained based on this composite image.

[0135] When it is necessary to stitch together multiple images captured by a scanning device, a stitching path can be preset. The scanning device is then moved to a selected position and performs multiple image captures along the stitching path to obtain multiple scanned images within a first selected area. These multiple scanned images are then stitched together to obtain a stitched image that covers the first selected area. It should be noted that the movement of the scanning device can also be manually controlled, allowing it to capture images at different positions to obtain multiple images. These multiple images can then be stitched together to obtain the first image to be measured.

[0136] The stitching path refers to the pre-set motion path for the scanning device during the image capture process of the workpiece under test. It is easy to understand that the order of the motion path corresponds to the shooting order of multiple images; therefore, the images can be stitched together according to the shooting order to obtain a stitched image. For example, the stitching path can be an S-shaped path or a meandering path, etc.

[0137] Based on this, in an exemplary embodiment, the aforementioned control scanning device captures an image of a first selected area of ​​the stage to obtain a first image to be measured, including:

[0138] Obtain the splicing path;

[0139] The control scanning device takes pictures of the first selected area of ​​the stage according to the stitching path, and obtains multiple first sub-images to be measured; at least two of the first sub-images to be measured include a part of the workpiece to be measured;

[0140] Multiple first-to-be-measured sub-images are stitched together to obtain the first-to-be-measured image.

[0141] As can be seen, when a single field of view cannot cover the first selected area, the image measurement device can obtain the stitching path and control the scanning device to take pictures of the first selected area of ​​the stage according to the stitching path, thereby obtaining multiple first sub-images to be measured. The multiple first sub-images to be measured are then stitched together to obtain the first image to be measured. Thus, it can be ensured that regardless of the relationship between the size of the field of view and the size of the first selected area, the image on the stage within the first selected area can be obtained for measurement. The measurement template program created in steps 202 to 206 can be automatically and smoothly carried out, significantly improving measurement efficiency and accuracy.

[0142] Step 210: Based on the first image to be measured and the workpiece matching model, determine the workpiece matching area in the first image to be measured.

[0143] The workpiece matching region refers to the region extracted from the first image to be measured, corresponding to the workpiece to be measured. The workpiece to be measured identified in the workpiece matching region has an image similarity greater than or equal to a similarity threshold with the template workpiece. In other words, when the measurement software matches the workpiece matching region, it indicates that the measurement software has recognized the existence of the corresponding workpiece to be measured based on the first image to be measured.

[0144] As can be seen, during the matching measurement of at least one workpiece placed on the stage, the workpiece is first positioned using a workpiece matching model. The search range during the workpiece positioning process is the entire first image to be measured displayed in the current image display interface. Optionally, the search method used during the workpiece positioning process can refer to the search method set in the measurement template program. It can be to find an image region in the first image to be measured that meets the similarity threshold with the workpiece matching model using rotation matching or translation matching, and use it as the workpiece matching region for the corresponding workpiece.

[0145] For example, the first image to be measured may include at least one workpiece to be measured. Therefore, there may be multiple workpiece matching regions that can be matched based on the first image to be measured and the workpiece matching model. At this time, the multiple workpiece matching regions correspond to multiple workpieces to be measured respectively. Based on this, the measurement action of the multiple matched workpieces to be measured can be completed in subsequent steps to obtain the measurement results of the multiple workpieces to be measured.

[0146] Thus, based on the first image to be measured and the workpiece matching model, at least one workpiece matching area has been determined in the first image to be measured, and the first layer of matching measurement action has been completed.

[0147] Step 212: Based on the matching regions of each workpiece and the local matching model, determine the local matching regions corresponding to the matching regions of each workpiece.

[0148] The local matching region refers to the region extracted from the first image to be measured based on the corresponding workpiece matching region and the local matching model.

[0149] The size of the local matching area is usually smaller than the size of the workpiece matching area.

[0150] The local matching action is performed on a per-workpiece matching region basis, thus each workpiece matching region can be identified as a local matching region. In at least one local matching model, each model will match at most one corresponding image region in each workpiece matching region, which will then serve as the local matching region.

[0151] Based on this, in an exemplary embodiment, determining the local matching region corresponding to each workpiece matching region based on each workpiece matching region and at least one local matching model includes:

[0152] Based on the matching regions of each workpiece, the candidate local matching region with the highest similarity to the target local matching model and with a similarity threshold greater than or equal to the threshold is determined as the local matching region corresponding to the target local matching model.

[0153] The target local matching model can be any one of at least one local matching model.

[0154] During the process of finding candidate local matching regions, the scanning device can be controlled to find the candidate local matching region with the highest similarity to the target local matching model in each workpiece matching region by rotation matching or translation matching (refer to the search method set in the measurement template program). This candidate local matching region is then used as the local matching region of the workpiece to be tested corresponding to the workpiece matching region.

[0155] It is easy to understand that there may be at least one candidate local matching region with a similarity greater than or equal to the similarity threshold with respect to the target local matching model. However, in order to ensure that a local matching model can only match one local matching region in one workpiece under test, it is necessary to further select the candidate local matching region with the highest similarity from at least one candidate local matching region as the local matching region corresponding to the target local matching model.

[0156] Because some areas of the workpiece under test may be severely deformed, the local matching model may struggle to find regions that meet the similarity threshold within the workpiece, resulting in a matching failure. In this case, the programs related to the local matching model in the corresponding measurement template program (such as the local matching program and the associated first feature measurement model program) will report errors, displayed in red as an error warning. Alternatively, the image of the workpiece under test may display "NG" or similar text to indicate that the measurement result is unacceptable.

[0157] In an exemplary embodiment, the above-mentioned determination of at least one candidate local matching region with a similarity greater than or equal to a similarity threshold with respect to each workpiece matching region includes:

[0158] Based on the image shape shown by each workpiece matching region, the candidate local matching region with the highest similarity to the image shape of the target local matching model (which has a similarity greater than or equal to a similarity threshold) is determined as the local matching region corresponding to the target local matching model; and / or,

[0159] Based on the image grayscale values ​​of each workpiece matching region, the candidate local matching region with the highest similarity to the image grayscale values ​​of the target local matching model that is greater than or equal to the similarity threshold is determined as the local matching region corresponding to the target local matching model.

[0160] The similarity threshold can be 0.75, or it can be 0.8, 0.85 or other values. Please refer to the settings in the measurement template program for details.

[0161] Alternatively, the similarity between image shapes can be determined using edge detection algorithms, contour matching algorithms, or other algorithms capable of determining shape similarity.

[0162] Optionally, the similarity between the image grayscale of the target local matching model and the image grayscale of the candidate local matching region can be determined by comparing the grayscale histogram of the target local matching model and the grayscale histogram of the candidate local matching region.

[0163] Optionally, after the scanning device acquires the first image to be measured, it can perform image denoising on the first image to be measured, or adjust the grayscale sensitivity of the first image to be measured, so as to ensure that the local matching region with a similarity greater than or equal to the similarity threshold between the first image to be measured and the local matching model can be determined efficiently and accurately based on the first image to be measured.

[0164] Optionally, in addition to determining the local matching region based on similarity, the local matching region corresponding to each workpiece matching region can also be determined based on the matching regions of each workpiece and the second relative positional relationship.

[0165] In the process of determining the local matching region corresponding to each workpiece matching region based on the matching region of each workpiece and the second relative position relationship, the target position after coordinate position transformation can be determined based on the matching region of each workpiece and the second relative position relationship. Then, the measurement software uses the target position as the search reference position and prioritizes the search in the area where the target position is located and its surrounding area. Specifically, it can expand a certain range in all directions from the search reference position to obtain the expanded search range. Then, it can find the image region with a similarity greater than or equal to the similarity threshold between the local matching model and the local matching model in the expanded search range by rotation matching or translation matching, so as to serve as the local matching region of the workpiece to be measured corresponding to each workpiece matching region.

[0166] In an exemplary embodiment, the first image to be measured includes a first magnification image to be measured and a second magnification image to be measured; the above-mentioned determination of at least one local matching region corresponding to each workpiece matching region based on each workpiece matching region and at least one local matching model includes:

[0167] Based on the first magnification image to be measured, the matching regions of each workpiece, and at least one local matching model, the first local matching regions corresponding to the matching regions of each workpiece are determined respectively.

[0168] Based on the second magnification image to be measured, the matching regions of each workpiece, and at least one local matching model, the second local matching regions corresponding to the matching regions of each workpiece are determined respectively.

[0169] The above-mentioned determination of the first feature measurement area of ​​each workpiece to be tested, based on the local matching area corresponding to the matching area of ​​each workpiece and the first relative positional relationship, includes:

[0170] Based on the first local matching area, the second local matching area, and the first relative positional relationship corresponding to the matching area of ​​each workpiece, the first feature measurement area of ​​each workpiece to be tested is determined.

[0171] It can be seen that when the measurement template program involves switching the lens magnification of the scanning device, the measurement software can automatically switch the lens magnification of the scanning device in the corresponding steps based on the settings of the measurement template program during the subsequent matching measurement process. This enables the determination of the corresponding local matching area in the first image to be measured at different magnifications, thereby ultimately determining the first feature measurement area of ​​each workpiece to be measured. In this way, the measurement results of at least one workpiece to be measured in the first image to be measured can be accurately obtained.

[0172] Step 214: Based on the local matching area corresponding to the matching area of ​​each workpiece and the first relative positional relationship, determine the first feature measurement area of ​​each workpiece to be tested.

[0173] The first feature measurement region refers to the key feature region located in the corresponding local matching region that needs to be scanned.

[0174] The positional relationship between the first feature measurement region and the corresponding local matching region also maintains the first relative positional relationship. The first feature measurement region can be found by adjusting its position coordinates through a local matching model with which it is associated. Specifically, the first feature measurement model with an association with a certain local matching model can perform coordinate position transformation in the current first image to be measured based on the coordinate changes between the associated local matching model and the corresponding local matching region, so as to find the corresponding first feature measurement region in the current first image to be measured, thereby extracting the edge features to be measured. Thus, it is equivalent to being able to eliminate the angle or position deviation caused by local region deformation based on the coordinate changes between the local matching region and the local matching model, ensuring the accuracy of the measurement results.

[0175] Similarly, the second feature measurement region, which is associated with the workpiece matching model, can also achieve coordinate position transformation by adjusting the coordinate changes between the associated workpiece matching model and the corresponding workpiece matching region. This allows for finding the matching region in the current first image to be measured, thereby identifying the matching edge features. In other words, it eliminates the placement angle deviation between the second feature measurement region and the corresponding workpiece matching model. Likewise, it can adapt to the overall offset effect of different placement angles of the workpiece to be measured. The first and second feature measurement regions are collectively referred to as the feature measurement regions.

[0176] Based on this, the first feature measurement region and / or the second feature measurement region can find their respective matching edge features to measure and accurately obtain the corresponding dimensions.

[0177] Step 216: Based on the first feature measurement area of ​​each workpiece to be measured, determine the measurement result of the workpiece to be measured in the first image to be measured.

[0178] The measurement result refers to the target feature elements (usually a set of point data, which can be fitted to edge lines) obtained based on the first feature measurement region of at least one workpiece in the first image to be measured, as well as the measurement data obtained based on the target feature elements, such as the data corresponding to the dimension annotations. It can be understood that the measurement result of the workpiece in the first image to be measured includes the measurement data of at least one workpiece. Similarly, when the template workpiece also needs to be measured, the measurement result of the template workpiece includes the measurement data of the template workpiece.

[0179] In an exemplary embodiment, determining the measurement result of the workpiece in the first image to be measured based on at least one first feature measurement region of each workpiece to be measured includes:

[0180] Feature elements are extracted from at least one first feature measurement region of each workpiece in the first image to be measured to obtain at least one feature element of each workpiece to be measured.

[0181] Based on at least one feature element of each workpiece to be measured, determine at least one dimension annotation for each workpiece to be measured.

[0182] Based on each dimension mark in at least one dimension mark of each workpiece to be measured, determine the measurement data corresponding to each dimension mark of each workpiece to be measured.

[0183] Based on the measurement data corresponding to each dimension mark of each workpiece to be measured, the measurement result of at least one workpiece to be measured in the first image to be measured is obtained.

[0184] The measurement data corresponding to each dimension annotation can be used to characterize the workpiece feature dimensions of each workpiece under test. Optionally, the workpiece feature dimensions of each workpiece under test may include length-related dimensions, curvature, chamfer angle, parallelism, or perpendicularity, etc., which are related to the workpiece features.

[0185] When the workpiece matching model corresponds to a second feature measurement model that is related to it, the measurement result of at least one workpiece in the first image to be measured is determined based on the first feature measurement area and the second feature measurement area of ​​at least one workpiece to be measured.

[0186] In one exemplary embodiment, the method further includes:

[0187] Based on the workpiece matching model, at least one second feature measurement model is determined;

[0188] Determine the relative positional relationship between the workpiece matching model and each of the second feature measurement models to obtain the third relative positional relationship;

[0189] The above methods also include:

[0190] Based on the matching regions of each workpiece in the first image to be measured and the third relative positional relationship, the second feature measurement region of each workpiece to be measured is determined.

[0191] Based on the first feature measurement area of ​​each workpiece to be measured, the measurement result of at least one workpiece to be measured is determined, including:

[0192] Based on the first feature measurement area and the second feature measurement area of ​​each workpiece to be measured, the measurement result of at least one workpiece to be measured in the first image to be measured is determined.

[0193] The workpiece matching model and at least one second feature measurement model are related. The second feature measurement model that is related to the workpiece matching model will change accordingly as the coordinate position of the corresponding workpiece matching model changes.

[0194] For example, such as Figure 11 As shown, after the measurement template program is executed by the measurement software, the image display interface will remain at the display content of the last execution step 1102-2 of the measurement template program 1102. Assuming that the last execution step 1102-2 is performed under high magnification, therefore... Figure 11 The image display area 1104 will display the high-magnification first image to be measured 1106 corresponding to the last execution step 1102-2. At the same time, the image display area 1104 will display the measurement result 1108 of the workpiece to be measured, which includes “[D1] 19.8533”, “[D2] 19.8533”, and “[D3] 19.8533”.

[0195] In an exemplary embodiment, the above-mentioned measurement results for at least one workpiece are obtained based on the measurement data corresponding to each dimension marking of each workpiece to be measured, including:

[0196] Determine the deviation between the measured data and the design value corresponding to each dimension mark of each workpiece to be tested, and obtain the deviation value of at least one workpiece to be tested;

[0197] Based on the deviation value of at least one workpiece to be tested, the measurement result of the corresponding workpiece to be tested is determined; the measurement result of the corresponding workpiece to be tested is characterized as a qualified workpiece or an unqualified workpiece.

[0198] In this context, a qualified workpiece refers to a workpiece under test whose corresponding deviation value is less than or equal to the deviation threshold. For example, if the deviation values ​​between the measured feature dimensions of the workpiece and the design values ​​all meet the corresponding deviation thresholds, then the workpiece under test is a qualified workpiece.

[0199] A defective workpiece is a workpiece to be tested whose corresponding deviation value is greater than the deviation threshold.

[0200] Optionally, the image display interface can show whether each workpiece to be tested is a qualified or unqualified workpiece. Specifically, the text "qualified" or "unqualified" can be directly displayed on the corresponding workpiece to be tested. Of course, this is not limited to this. For example, such as... Figure 12 As shown, "OK" or "NG" can also be displayed directly on the image of the workpiece 1202 to be measured, thereby enabling the user to intuitively confirm the measurement results of each of the eight workpieces 1202 to be measured in the first image to be measured from the image display interface.

[0201] Alternatively, the design value can be determined by design drawings or based on measurement data of the template workpiece.

[0202] In the aforementioned multi-layer matching measurement method applied to image measuring equipment, firstly, based on the workpiece image of the template workpiece, a workpiece matching model, at least one local matching model, at least one first feature measurement model, and the first relative positional relationship between each local matching model and each first feature measurement model are determined to complete the measurement template creation process; then, the measurement process is executed, controlling the scanning device to capture a first selected area of ​​the stage to obtain a first image to be measured; based on the first image to be measured and the workpiece matching model, a workpiece matching area is determined in the first image to be measured; based on each workpiece matching area, the local matching model, and the first relative positional relationship, the first feature measurement area of ​​each workpiece to be measured can be determined, and the first feature measurement area is scanned to complete the scanning process of at least one workpiece to be measured in the first image to be measured. Based on this, on the one hand, the image measuring equipment does not need to obtain the specific placement position of at least one workpiece to be measured on the stage before measurement; on the other hand, the multi-layer matching measurement method applied to the image measuring equipment can ensure accurate scanning of the feature measurement area to be measured, thereby improving the efficiency and accuracy of the obtained measurement results.

[0203] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0204] Based on the same inventive concept, this application also provides an image measuring device, which includes a stage, a scanning device, a memory, and a processor. The stage and the scanning device are movable relative to each other. The stage and the scanning device are arranged opposite to each other. Multiple workpieces to be measured are placed on the stage. The memory stores a computer program. When the processor executes the computer program, it implements the steps of any of the above-described matching measurement method embodiments applied to the image measuring device in a multi-layer matching measurement method.

[0205] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0206] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above-described method embodiments.

[0207] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0208] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0209] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0210] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0211] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A multi-layer matching measurement method applied to image measurement equipment, characterized in that, The image measuring device includes a stage and a scanning device, the stage and the scanning device being movable relative to each other, the stage being positioned opposite to the scanning device, and the stage being used to place the workpiece to be measured; the method includes: Based on the workpiece image of the template workpiece, a workpiece matching model and at least one local matching model are determined; the workpiece matching model is used to determine at least one workpiece matching region in a first measurement image including at least one of the workpieces to be measured; there is a one-to-one correspondence between the at least one workpiece matching region and the at least one workpiece to be measured. Based on at least one of the local matching models, at least one first feature measurement model is determined; the local matching model is used to determine a local matching region corresponding to each of the workpiece matching regions in each of the workpiece matching regions. The relative positional relationship between each of the local matching models and each of the first feature measurement models is determined to obtain a first relative positional relationship; the first relative positional relationship is used to determine the first feature measurement area of ​​each of the workpieces to be measured based on the local matching area corresponding to the matching area of ​​each workpiece; the first feature measurement area of ​​the workpiece to be measured is used to determine the measurement result of at least one of the workpieces to be measured in the first image to be measured.

2. The method according to claim 1, characterized in that, The determination of at least one first feature measurement model based on at least one of the local matching models includes: Select the appropriate feature tool category; the feature tool category can be one of the following: line feature tool, arc feature tool, or circle feature tool. Based on at least one of the local matching models, edge features corresponding to the feature tools of the selected category are used to select and create at least one of the first feature measurement models.

3. The method according to claim 1, characterized in that, The method further includes: The relative positional relationship between the workpiece matching model and each of the local matching models is determined to obtain a second relative positional relationship; the second relative positional relationship is used to determine the local matching region corresponding to each of the workpiece matching regions based on each of the workpiece matching regions.

4. The method according to claim 1, characterized in that, The method further includes: Based on the workpiece matching model, at least one second feature measurement model is determined; The relative positional relationship between the workpiece matching model and each of the second feature measurement models is determined to obtain a third relative positional relationship; the third relative positional relationship is used to determine the second feature measurement area of ​​each workpiece to be measured based on each workpiece matching area and the third relative positional relationship; The first feature measurement area and the second feature measurement area are used to determine the measurement result of at least one of the workpieces to be measured in the first image to be measured.

5. The method according to claim 1, characterized in that, The workpiece image includes a configuration image and an auxiliary configuration image; The workpiece image based on the template workpiece determines the workpiece matching model and at least one local matching model, including: Based on the configuration image of the template workpiece, the workpiece matching model is determined; Based on the auxiliary configuration image, at least one local matching model corresponding to the workpiece matching model is determined; the configuration image and the auxiliary configuration image are respectively captured by the scanning device at different lens magnifications.

6. The method according to claim 1, characterized in that, The workpiece image includes a configuration image and an auxiliary configuration image; at least one first feature measurement model includes at least one first magnification first feature measurement model and one second magnification first feature measurement model; The determination of at least one first feature measurement model based on at least one of the local matching models includes: Based on the configuration image and at least one of the local matching models, determine the first magnification first feature measurement model corresponding to the workpiece matching model; Based on the auxiliary configuration image and at least one of the local matching models, a second magnification first feature measurement model corresponding to the workpiece matching model is determined; the configuration image and the auxiliary configuration image are respectively captured by the scanning device at different lens magnifications.

7. The method according to claim 6, characterized in that, The first multiplier is less than the second multiplier.

8. The method according to claim 1, characterized in that, The method further includes: Based on the workpiece matching model, at least one local matching model, at least one first feature measurement model, and the first relative positional relationship, a measurement template program for the template workpiece is determined; When at least one new workpiece to be measured is placed on the stage, and the measurement requirements of the new at least one workpiece to be measured are the same as those of the template workpiece, the method further includes: The measurement template program is retrieved and run to automatically measure at least one new workpiece to be measured, so as to automatically obtain the measurement results of at least one new workpiece to be measured.

9. The method according to claim 3, characterized in that, The method further includes: Based on the workpiece matching model, at least one local matching model, at least one first feature measurement model, a first relative positional relationship, at least one second feature measurement model, and the second relative positional relationship, a measurement template program for the template workpiece is determined; When at least one new workpiece to be measured is placed on the stage, and the measurement requirements of the new at least one workpiece to be measured are the same as those of the template workpiece, the method further includes: The measurement template program is retrieved and run to automatically measure at least one new workpiece to be measured, so as to automatically obtain the measurement results of at least one new workpiece to be measured.

10. An image measuring device, characterized in that, The image measuring device includes a stage, a scanning device, a memory, and a processor. The stage and the scanning device are movable relative to each other. The stage and the scanning device are arranged opposite to each other. The stage is used to place the workpiece to be measured. The memory stores a computer program. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.