Method and device for measuring large-size planar product
By combining a static line scan module and a dynamic telecentric array module, the problem of insufficient measurement accuracy for large-size planar components is solved, achieving high-precision dimensional inspection, which is applicable to fields such as aerospace, precision instruments, and automobile manufacturing.
Patent Information
- Application Number
- CN202511394241.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-09-28
AI Technical Summary
Traditional methods for measuring large-size planar components are susceptible to interference from factors such as shooting angle, lens distortion, and ambient lighting, resulting in insufficient measurement accuracy and affecting assembly accuracy and application performance.
A measurement method combining a static line scan module and a dynamic area array telecentric module is used to accurately determine the physical coordinates of the marker points through similarity comparison and coordinate system transformation, and to calculate the size combination of the planar product to be measured.
It enables high-precision measurement of large-size planar products, meeting the modern industrial requirements for detection accuracy of 0.1mm or even higher, and reducing equipment costs.
Smart Images

Figure CN120907431A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of large-size component measurement, and in particular to a large-size planar product measurement method and device. BACKGROUND
[0002] A conventional large-size planar component measurement method uses image acquisition technology to capture a large-size planar component on a single image, obtain pixel information of a to-be-measured part, and then measure through a conversion relationship between pixels and actual physical sizes. This method is simple to operate, but because a large-size planar component usually has a large physical size, it is easily disturbed by factors such as a shooting angle, lens distortion, and environmental light during single-image acquisition, resulting in a large deviation between a measurement result and an actual size. This insufficient measurement accuracy directly affects assembly accuracy of such a large-size planar component and overall performance during application. SUMMARY
[0003] The present application aims to provide a large-size planar product measurement method and device to alleviate the technical problem of low size measurement accuracy and precision of a large-size planar product.
[0004] In a first aspect, the present application provides a large-size planar product measurement method applied to a size measurement device, the size measurement device including a test platform for placing a to-be-measured planar product, a servo device installed on the test platform, a static line scan module arranged on the servo device, and a dynamic area array telecentric module. The method includes: Similarity comparison is performed based on a scan image of the to-be-measured planar product obtained by the static line scan module and a preset template image to determine a to-be-measured size type of the to-be-measured planar product, an identification point, and a pixel position coordinate of the identification point in the scan image. Based on the pixel position coordinate of each identification point in the scan image and an actual pixel position coordinate corresponding to each identification point collected by the dynamic area array telecentric module driven by the servo device, a pixel distance from each actual pixel position coordinate to a contour line where the corresponding identification point is located is determined, and a physical position coordinate of each identification point is corrected to a target physical position coordinate. According to the to-be-measured size type and the target physical position coordinate of each identification point, a size combination of the to-be-measured planar product is calculated.
[0005] In an optional embodiment, before the step of similarity comparison based on the scan image of the to-be-measured planar product obtained by the static line scan module and the preset template image to determine the to-be-measured size type of the to-be-measured planar product, the identification point, and the pixel position coordinate of the identification point in the scan image, the method further includes: determining a relationship matrix between the image coordinate system and the world coordinate system of the size measurement device based on the scanning image of the test platform with the identified points acquired by the static line scan module and the acquired image of the test platform for each of the identified points detected by the dynamic area array telecentric module.
[0006] In an optional embodiment, the dynamic area array telecentric module comprises an area array camera and a telecentric lens; the step of determining the relationship matrix between the image coordinate system and the world coordinate system of the size measurement device based on the scanning image of the test platform with the identified points acquired by the static line scan module and the acquired image of the test platform for each of the identified points detected by the dynamic area array telecentric module comprises: dividing the test platform into a plurality of square grids of a preset size according to the size of the test platform, and marking the center point of each of the square grids as an identified point; scanning the test platform with the identified points by the static line scan module, and determining the pixel position coordinates of each of the identified points from the scanning image after distortion correction processing; repeating the following steps until the physical position coordinates of the servo device corresponding to each of the identified points are obtained: based on the movement of the servo device driving the area array camera and the telecentric lens, when the center of the acquired image of the area array camera and the telecentric lens coincides with the current identified point, determining the physical position coordinates of the servo device corresponding to the current identified point; taking the next identified point as a new current identified point; determining the relationship matrix for representing the conversion relationship between the image coordinate system and the world coordinate system based on the pixel position coordinates and the physical position coordinates of each of the identified points.
[0007] In an optional embodiment, the step of determining the to-be-measured size type, the identified point and the pixel position coordinates of the identified point in the scanning image of the to-be-measured planar product based on the scanning image of the to-be-measured planar product and the preset template image obtained by the static line scan module comprises: determining the scanning image of the to-be-measured planar product based on the scanning of the to-be-measured planar product by the static line scan module; comparing the contour line of the to-be-measured planar product in the scanning image with the contour line of the planar product in each of the preset template images; if there is a preset template image with a comparison similarity reaching a preset threshold, determining the model, the to-be-measured size type and the identified point of the to-be-measured planar product based on the preset template image.
[0008] In an optional embodiment, the step of determining the to-be-measured size type, the identification point, and the pixel position coordinates of the identification point in the scanning image of the to-be-measured planar product based on the scanning image of the to-be-measured planar product obtained by the static line scanning module and the preset template image further comprises: If there is no preset template image with a comparison similarity reaching a preset threshold, the model, the to-be-measured size type, and the identification point of the to-be-measured planar product are identified based on the scanning image, and a preset template image corresponding to the to-be-measured planar product is created.
[0009] In an optional embodiment, the step of correcting the physical position coordinates of each identification point to target physical position coordinates based on the pixel position coordinates of each identification point in the scanning image and the actual pixel position coordinates of each identification point corresponding to the dynamic area array telecentric module driven by the servo device to collect further comprises: determining the pixel position coordinates of each identification point corresponding to the scanning image, and converting the pixel position coordinates of each identification point corresponding to the scanning image to physical position coordinates according to a relationship matrix; determining the actual pixel position coordinates of each physical position in the collected image when the dynamic area array telecentric module reaches each physical position; correcting the physical position coordinates of each identification point corresponding to the scanning image to target physical position coordinates respectively by using the pixel distance between each actual pixel position coordinate and the pixel position coordinates of each identification point corresponding to the scanning image.
[0010] In an optional embodiment, the step of correcting the physical position coordinates of each identification point corresponding to the scanning image to target physical position coordinates respectively by using the pixel distance between each actual pixel position coordinate and the pixel position coordinates of each identification point corresponding to the scanning image further comprises: superimposing actual distances corresponding to the pixel distance respectively in the X direction and the Y direction between each actual pixel position coordinate and the pixel position coordinates of each identification point on the physical position coordinates of each identification point corresponding to the scanning image respectively to determine the target physical position coordinates of each identification point; or, superimposing actual distances corresponding to the pixel distance respectively in the Y direction of the physical position coordinates of each identification point on the physical position coordinates of each identification point corresponding to the scanning image by using the pixel distance from each actual pixel position coordinate to the contour line where the corresponding identification point is located to determine the target physical position coordinates of each identification point.
[0011] In an optional embodiment, the size combination includes a first type of size and a second type of size; and the step of calculating the size combination of the to-be-measured planar product according to the to-be-measured size type and the target physical position coordinates of each of the mark points comprises: selecting the corresponding mark points according to the first to-be-measured size type, and calculating the first type of size of the to-be-measured planar product for representing the contour line; selecting the corresponding mark points and the contour line of the to-be-measured planar product according to the second to-be-measured size type, and determining the auxiliary line of the to-be-measured planar product; determining the second type of size of the to-be-measured planar product according to the intersection of the auxiliary line and the contour line.
[0012] In a second aspect, the present application provides a device for measuring a large-size planar product, which is applied to a size measuring equipment, and the size measuring equipment includes a test platform for placing a to-be-measured planar product, a servo device installed on the test platform, a static line scanning module and a dynamic area array telecentric module arranged on the servo device. The device includes: a first determining module configured to perform similarity comparison based on a scanning image of the to-be-measured planar product acquired by the static line scanning module and a preset template image, and determine a to-be-measured size type, mark points and pixel position coordinates of the mark points in the scanning image of the to-be-measured planar product; a second determining module configured to determine a pixel distance from each of the actual pixel position coordinates to a contour line where the corresponding mark point is located based on the pixel position coordinates of each of the mark points in the scanning image and actual pixel position coordinates of each of the mark points corresponding to the dynamic area array telecentric module collected by the servo device, and correct the physical position coordinates of each of the mark points to target physical position coordinates; a calculating module configured to calculate a size combination of the to-be-measured planar product according to the to-be-measured size type and the target physical position coordinates of each of the mark points.
[0013] In a third aspect, the present application provides an electronic device arranged in a size measuring equipment, which includes a memory, a processor and a program stored in the memory and capable of running on the processor, and the processor implements the method according to any one of the preceding embodiments when executing the program.
[0014] The embodiment of the present application provides a kind of large size plane product measurement method and device, through the servo equipment and static line scanning module and dynamic face array telecentric module installed on test platform, the size of the plane product to be measured on test platform is detected;First, the most similar preset template image is found according to the image obtained by scanning the plane product to be measured by static line scanning module, and the size type, identification point and model based on the preset template image are used as the corresponding information of the plane product to be measured;Based on the pixel position coordinates of each identification point found in the scanning image, the actual pixel position coordinates of each identification point collected by the dynamic face array telecentric module driven by servo equipment can be determined, and the pixel distance from the corresponding pixel position coordinates of the same identification point to the contour line is corrected according to the pixel distance, to obtain the target physical position coordinates;Based on the size type to be measured of the plane product to be measured and the target physical position coordinates, the size combination corresponding to the size type to be measured of the plane product to be measured is calculated, and the accurate size measurement of each model of large size plane product is realized.
[0015] Other features and advantages of the present application will be set forth in the descriptions below, and in part will become apparent to those skilled in the art from the descriptions, or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and achieved by the structures particularly pointed out in the description and the drawings.
[0016] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creating any creative labor.
[0018] Figure 1 A size measurement device schematic diagram is provided for the embodiment of the present application; Figure 2 A large size plane product measurement method flow chart is provided for the embodiment of the present application; Figure 3 A scanning image schematic diagram collected by line scanning camera is provided for the embodiment of the present application; Figure 4 A collection image schematic diagram obtained by face array camera and circle center lens is provided for the embodiment of the present application; Figure 5Another acquisition image schematic diagram of a planar array camera and a center-of-circle lens provided by the embodiment of the present application; Figure 6 A pixel distance difference schematic diagram provided by the embodiment of the present application; Figure 7 A to-be-measured size schematic diagram of a planar product provided by the embodiment of the present application; Figure 8 A function module schematic diagram of a measurement device for a large-size planar product provided by the embodiment of the present application; Figure 9 A hardware architecture schematic diagram of an electronic device provided by the embodiment of the present application.
[0019] Icon: 100-to-be-measured planar product; 200-electric control cabinet; 300-test platform; 400-static line scanning module; 500-servo device; 600-dynamic planar array telecentric module; 700-three-color lamp. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiment is a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0021] With the continuous development of industrial detection technology, high-precision visual detection plays an increasingly important role in manufacturing. Modern industrial products have increasingly strict requirements on dimensional accuracy, especially in the fields of aerospace, precision instruments and automobile manufacturing, and the detection accuracy often needs to reach 0.1mm or even higher.
[0022] In the prior art, an industrial visual detection system usually adopts a high-resolution industrial camera in cooperation with backlight or structured light illumination to measure the size by acquiring image information of the measured object. This detection method is limited by the resolution of the camera sensor and the field of view. When the size of the detection object is large, in order to ensure the detection accuracy, a multi-camera splicing or sub-regional shooting method is usually used to realize full-size detection.
[0023] For single image detection scheme, its accuracy mainly depends on the matching relationship between the pixel resolution of the camera and the field of view range. According to the principle of optical imaging, the detection accuracy can be calculated by the physical size represented by a single pixel. For example, when the detection accuracy requirement is 0.1mm, the detection accuracy of the edge size under backlight condition is about 6 pixels, which requires a single pixel accuracy of 0.01666mm / pix. For a detection object with a length of 5m, it means that the long side resolution of the camera needs to reach 300120 pixels.
[0024] However, the resolution of the existing industrial camera cannot meet this requirement at all. The highest resolution of 604 million pixels in the current market is only 28416 pixels in long side resolution, which is far from the required 300120 pixels. At the same time, the cost of such ultra-high resolution camera is already very expensive, which further limits its application in industrial detection. Therefore, under the existing technical conditions, the realization of high-precision detection of large-size workpieces through single image shooting faces great technical challenges and equipment cost limitations.
[0025] Based on this, the measuring method and device for large-size planar products provided by the embodiments of the present application can realize high-precision detection by placing the large-size planar products on the test platform at will.
[0026] In order to facilitate the understanding of the present embodiment, first of all, the size measuring device to which the measuring method for large-size planar products disclosed by the embodiments of the present application is applied is introduced in detail, as shown in Figure 1 The size measuring device includes a test platform 300 for placing the planar product to be measured 100, a servo device 500 installed on the test platform 300, a static line scanning module 400 and a dynamic area array telecentric module 600 arranged on the servo device 500, a three-color lamp 700 for indicating the detection state, and an electric control cabinet 200 for controlling the size measurement. Wherein, the planar product to be measured can be understood as a product assembly extending in a planar sheet shape with a large size, a length greater than 3 meters, which can include large-size planar assemblies such as silicon steel sheets.
[0027] On the basis of the foregoing embodiment, the measuring method for large-size planar products disclosed by the embodiments of the present application is introduced in detail again, which can be specifically applied to the control device of the size measuring device integrated in the electric control cabinet.
[0028] Figure 2 The flow chart of the measuring method for large-size planar products provided by the embodiments of the present application.
[0029] Referring to Figure 2 The method comprises the following steps: In step S102, the similarity between the scanning image of the to-be-measured planar product obtained based on the static line scanning module and the preset template image is compared to determine the to-be-measured size type, the identification point, and the pixel position coordinates of the identification point in the scanning image of the to-be-measured planar product.
[0030] Here, the to-be-measured size type and the identification point of each type of planar product are preset in the preset template image; the comparison similarity between the scanning image and the preset template image can determine the preset template image matched with the current to-be-measured planar product, and further determine the type, the identification point, and the to-be-measured size type corresponding to the matched preset template image. Exemplarily, the step S102 can be implemented through the following steps, specifically including: In step 1.1, the scanning image of the to-be-measured planar product is determined based on the static line scanning module.
[0031] Here, the static line scanning module can be understood as a line scanning camera, which is arranged on a servo device in a relatively static manner, so that the servo device with the line scanning camera can scan the to-be-measured planar product placed on the test platform in a static manner. As an optional embodiment, the image is subjected to distortion removal processing, and then a non-distorted scanning image is obtained.
[0032] In step 1.2, the contour line of the to-be-measured planar product in the scanning image is compared with the contour line of the planar product in each preset template image.
[0033] Here, the pixel points with pixel value changes exceeding a preset pixel threshold value, i.e., the edge pixel points, can be determined from the scanning image / preset template image based on an edge detection operator such as a canny operator, and then the contour line of the planar product connected by the pixel points is measured; the shape and trend of the contour line are compared, and then the similarity between the to-be-measured planar product and each preset template can be determined.
[0034] In step 1.3, if there is a preset template image with a comparison similarity reaching a preset threshold value, the type, the to-be-measured size type, and the identification point of the to-be-measured planar product are determined based on the preset template image.
[0035] Here, it can be understood that if the similarity between the scanning image of the to-be-measured planar product and a certain preset template image reaches a preset threshold value, the to-be-measured planar product and the preset template belong to the same type, to-be-measured size type, and identification point; it should be noted that if the similarity between the scanning image of the to-be-measured planar product and multiple preset template images all reaches a preset threshold value, the to-be-measured planar product selects the preset template corresponding to the highest similarity in the type, to-be-measured size type, and identification point.
[0036] The to-be-measured size type can be understood as a type of size that needs to be measured, such as a length, a width, and a position degree of each vertex of a product, a size of a hole, and a to-be-measured size type of a position degree.
[0037] In step 1.4, if there is no preset template image with a similarity reaching a preset threshold, a to-be-measured size type and a mark point of the to-be-measured planar product are recognized based on the scanning image, and a preset template image corresponding to the to-be-measured planar product is created.
[0038] In actual application, if no preset template image with a similarity reaching a preset threshold is found, the to-be-measured planar product also has no preset template. At this time, the to-be-measured size type and the mark point of the planar product are directly detected, and a detection result of the product is used to create a preset template image of the to-be-measured planar product. The template includes a scanning image of the to-be-measured planar product and carries a model of the to-be-measured planar product, a to-be-measured size type of the to-be-measured planar product, and a mark point. The model of the planar product can determine the corresponding to-be-measured size type, and the mark point can be understood as a position point virtually or actually marked on the scanning image and known by an executed device (such as an upper computer or a control device). Such a mark point is used to calculate a large-size planar product of each to-be-measured size type.
[0039] In step S104, based on a pixel position coordinate of each mark point in the scanning image and an actual pixel position coordinate corresponding to each mark point collected by the servo device driving the dynamic area array telecentric module, a pixel distance from each actual pixel position coordinate to a contour line where the corresponding mark point is located is determined, and a physical position coordinate of each mark point is corrected to a target physical position coordinate.
[0040] The contour of the to-be-measured planar product can be understood as being composed of a plurality of contour lines connected at their heads and tails, and the contour line where the mark point is located can be understood as a product contour line where the mark point exists, that is, a contour line that constitutes the product contour. Specifically, the physical position coordinate is converted from the pixel position coordinate of the mark point in the scanning image. When the servo device moves to the physical position coordinate, an area array image collected by the dynamic area array telecentric module is an acquisition image. As shown in FIG. 6, a center of the acquisition image, that is, a hollow circle point, is an actual pixel position coordinate, but the acquisition image can identify an ideal pixel position coordinate of the mark point, that is, a solid circle point, and a contour line where the mark point is located. According to a pixel distance from the hollow circle point to the contour line where the solid circle point is located, a purpose of correcting the physical position coordinate corresponding to the mark point can be achieved. Figure 6
[0041] Here, the dynamic area array telecentric module includes an area array camera and a telecentric lens. The image precision of the scanning image obtained by the line scanning camera is slightly worse than that of the acquisition image of the dynamic area array telecentric module. For example, a scanning image of a to-be-measured planar product in a triangular shape is as shown in FIG. 7. Figure 3 Figure 4 In step S106, the to-be-measured size type and the mark point of the to-be-measured planar product are detected based on the target physical position coordinate of each mark point.Figure 4 The dynamic area array telecentric module can collect images of the triangular product to be measured. Figure 5 The dynamic area array telecentric module collects images of a mark point. It can be seen that the image collection accuracy of the dynamic area array telecentric module is higher than that of the line scanning camera.
[0042] In some embodiments, the step S104 can correct the actual physical position corresponding to the mark point by the pixel difference value determined by the high-precision dynamic area array telecentric module and the coarse-precision line scanning camera. For example, the step S104 can include the following steps: Step 2.1, determining the pixel position coordinates corresponding to each mark point based on the scanning image, and converting the pixel position coordinates corresponding to each mark point into physical position coordinates according to the relationship matrix.
[0043] According to the foregoing embodiments, the pixel position coordinates of each mark point in the image coordinate system can be obtained based on the scanning image, and the physical position coordinates of each mark point in the world coordinate system can be obtained under the action of the relationship matrix.
[0044] It should be noted that the relationship matrix can be determined in advance before the step S102. The relationship matrix between the image coordinate system and the world coordinate system of the size measurement device can be determined based on the scanning image collected by the static line scanning module on the test platform calibrated with the mark points and the collection image of the test platform detected by the dynamic area array telecentric module for each mark point. The relationship matrix can include the following steps: Step 3.1, dividing the test platform into a plurality of square grids of a predetermined size according to the size of the test platform, and calibrating the center point of each square grid as a mark point.
[0045] Here, the size of the test platform determines the number of square grids, that is, the larger the size, the more the number of square grids; the size of each square grid can be set according to the size of the test platform; and the center point of each square grid is defined as a mark point.
[0046] Step 3.2, scanning the test platform calibrated with the mark points based on the static line scanning module, and determining the pixel position coordinates of each mark point from the scanning image after distortion correction.
[0047] Here, the pixel position coordinates of each mark point are identified from the scanning image collected by the line scanning camera.
[0048] Step 3.3, repeatedly performing the following steps until the physical position coordinates of the servo device corresponding to each mark point are obtained: When the center of the collection image of the area array camera and the telecentric lens coincides with the current mark point, the physical position coordinates of the servo device corresponding to the current mark point are determined, and the next mark point is taken as a new current mark point.
[0049] It should be noted that the dynamic planar array telecentric module, i.e., the planar array camera and the telecentric lens, can be in a motion state relative to the servo device under the action of the control axis of the servo device, and drives the planar array camera and the telecentric lens to capture images such as Figure 5 When the image center of the captured image is exactly the center of the identification point, the two coincide, and at this time the physical position coordinates of the servo device serve as the physical position coordinates of the identification point in the world coordinate system; the servo device controls the dynamic planar array telecentric module to move to the next identification point, and repeats the process until the physical position coordinates of each identification point in the world coordinate system are determined.
[0050] Step 3.4, based on the pixel position coordinates and the physical position coordinates of each identification point, determine the relationship matrix for representing the conversion relationship between the image coordinate system and the world coordinate system.
[0051] It can be understood that based on the mapping relationship between the pixel position coordinates and the physical position coordinates of each identification point, the relationship matrix between the current test platform in the image coordinate system and the world coordinate system can be determined.
[0052] Step 2.2, according to the captured image when the dynamic planar array telecentric module reaches each physical position coordinate, determine the actual pixel position coordinates corresponding to each physical position in the captured image.
[0053] Wherein, when the dynamic planar array telecentric module moves according to the physical position coordinates converted from the pixel position coordinates of each identification point, there is often an error; as Figure 6 As shown in the figure, the hollow circle point is the target point (the actual pixel position coordinates corresponding to the identification point on the captured image) after the dynamic planar array telecentric module moves according to the physical position coordinates of each identification point, but based on the captured image of the dynamic planar array telecentric module, the ideal pixel position of the identification point (the position of the solid circle point) can be known, that is, the position of the solid circle point is the pixel position coordinates (ideal pixel position coordinates) that the dynamic planar array telecentric module is expected to reach when moving according to the physical position coordinates converted from the pixel position coordinates of the identification point.
[0054] Step 2.3, using the pixel distance between each actual pixel position coordinates and the pixel position coordinates corresponding to each identification point, respectively correct the physical position coordinates corresponding to each identification point to the target physical position coordinates.
[0055] As an optional embodiment, based on the pixel distance in the X direction and the Y direction between each actual pixel position coordinates and the pixel position coordinates corresponding to each identification point, the actual distance corresponding to the pixel distance can be determined under the action of the aforementioned relationship matrix, and the actual distance is respectively superimposed on the physical position coordinates corresponding to each identification point to determine the target physical position coordinates corresponding to each identification point.
[0056] It should be noted that the acquired image (area scan image) is generated by the area scan camera moving and capturing images based on the physical position coordinates converted from the pixel position coordinates corresponding to the marked points in the line scan image. At this time, the image center of the area scan image is... Figure 6 The hollow circle is the actual pixel position coordinate of the marker point when the area scan camera actually reaches the actual physical position; then, taking the image center of the area scan image as the reference, we look at the centroid coordinates of the marker point (solid circle) captured on the area scan image, and calculate the pixel distances of the centroid coordinates from the image center in the X and Y directions, respectively.
[0057] As another optional embodiment, the pixel distance from each actual pixel position coordinate to the contour line where the corresponding marker point is located can be used to determine the actual distance corresponding to the pixel distance under the action of the aforementioned relationship matrix. This actual distance is then superimposed on the Y direction of the physical position coordinates corresponding to each marker point to determine the target physical position coordinates corresponding to each marker point.
[0058] Here, the image contour recognition algorithm based on the foregoing embodiments can determine, as follows: Figure 6 The outline of the marker point is shown. By calculating the distance from the actual pixel position coordinates to this outline, a correction value can be determined, which is used to correct the actual physical position coordinates to the target physical position coordinates. Specifically, based on the single-pixel accuracy and the pixel distance in the X and Y directions, the actual physical distances in the X and Y directions can be directly calculated and added to the X and Y physical position coordinates of the area scan camera. The coordinates at this point are the actual coordinates of the marker point in the mechanism (target physical position coordinates).
[0059] Step S106: Calculate the size combination of the planar product to be measured based on the size type to be measured and the target physical location coordinates of each marker point.
[0060] The size combination includes a first type of size and a second type of size; step S106 may include: Step 4.1: Select the corresponding marker point according to the first size type to be measured, and calculate the first type of size of the planar product to be measured to characterize the contour line.
[0061] like Figure 7 As shown, based on the first type of dimension to be measured, the physical coordinates of marker 1 and marker 2, the dimension of the outline L of the planar product to be measured, i.e., the first type of dimension, can be calculated. The first type of dimension to be measured can be understood as the dimension that is expected to be measured.
[0062] Step 4.2: Select the corresponding marker points and the outline of the planar product to be measured according to the second size type to be measured, and determine the auxiliary lines of the planar product to be measured.
[0063] likeFigure 7 As shown, based on the second dimension to be measured, the physical coordinates of marker 1, marker 2, marker 3, and marker 4, and the contour line L, the auxiliary line (center line) between contour line 12 and contour line 34 can be determined. This auxiliary line (center line) is as follows: Figure 7 The midpoint is indicated by the dashed line. The second type of dimension to be measured can be understood as the second type of dimension that is expected to be measured. The second type of dimension can be understood as a dimension that is not the product outline but still needs to be measured.
[0064] Step 4.3: Determine the second type of dimension of the planar product to be measured based on the intersection of the auxiliary lines and the outline.
[0065] Based on the intersection of the auxiliary line (center line) and the aforementioned marker points, the distance L0 between the two points is calculated, thereby obtaining the second type of dimension of the planar product to be measured.
[0066] like Figure 7 As shown, this size combination may include product length dimensions L and L0, product widths B and B / 2, and vertex position dimension PA0. Figure 7 The figure shows a case where the vertex position degree is 45°.
[0067] In a preferred embodiment of practical application, the dimensions of the planar product under test on the test platform are detected using a servo device installed on the test platform, along with a static line scan module and a dynamic telecentric array module. First, the most similar preset template image is found based on the image obtained by the static line scan module scanning the planar product under test. The size type, marker points, and model number of this preset template image are used as the corresponding information for the planar product under test. The pixel coordinates of each marker point are found based on the scanned image. Then, based on the actual pixel coordinates of each marker point collected by the dynamic telecentric array module driven by the servo device, the pixel distance from the actual pixel coordinates of the same marker point to the contour line containing its corresponding pixel coordinates can be determined. The physical coordinates of each marker point are corrected based on this pixel distance to obtain the target physical coordinates. Finally, based on the size type and target physical coordinates of the planar product under test, various size combinations corresponding to the size type are calculated, thereby achieving accurate size measurement of larger-sized planar products of various models.
[0068] In practical applications, this invention also provides another method for measuring large-size planar products, including: 1. A marble test platform can be used. Divide the test platform into nine squares evenly in different directions according to its size, and mark nine markers in the center of each square.
[0069] 2. Use a line scan camera to scan the test platform and its nine marker points, and use an algorithm to correct the image distortion to obtain the corrected scan image (subsequent steps are all calculated on the corrected scan image).
[0070] 3. Calculate the centroid coordinates (pixel coordinates on the line scan) of the nine marker points on the scanned image.
[0071] 4. Using a three-axis servo device, along with an area scan camera and a telecentric lens, locate these nine marker points. When the center of a marker point is in the center of the image captured by the area scan camera, record the physical position coordinates (X, Y) of the servo device at this time as the physical position coordinates of the marker point. Repeat this process until the physical position coordinates of all nine marker points are determined.
[0072] 5. Currently, the pixel coordinates of nine marker points on the scanned image and the physical position coordinates of the servo device in the time coordinate system have been obtained. The relationship matrix between the scanned image and the physical position coordinates can be obtained through nine-point calibration, which is called the nine-point calibration matrix.
[0073] 6. Place the flat product to be tested on the test platform, take a picture with a line scan camera to create a preset template image, so that different flat products to be tested can be distinguished by product type to determine the corresponding model, marking points and the type of size to be tested.
[0074] 7. If a corresponding preset template image exists for the flat product to be tested, the scanned image can be matched with the preset template image to identify the product model, and then the identification points to be tested and the dimensions to be known for different product models can be determined.
[0075] 8. For example Figure 7 As shown, on the scanned image captured by the line scanning camera, by using an edge (contour) finding algorithm, lines L12 and L14 are located, and the intersection of these lines yields corner point 1. Similarly, corner points 2, 3, and 4 can be obtained. These are then converted to physical position coordinates (X, Y) using a nine-point calibration matrix, and these coordinate values are sequentially returned to the servo device. For example, the pixel position of each marker point (such as corner points 1, 2, 3, and 4) on the scanned image is calculated. Then, the physical position coordinates (X, Y) converted using the nine-point calibration matrix are used. The physical position coordinates converted from the line scanning camera image are coarsely located, and the servo device moves to this coarsely located position accordingly.
[0076] 9. The servo device controls the area array camera to take pictures of each marker point at the physical location coordinates of the scanned image converted from the online scanning camera image. Here, a total of four images are taken: A, B, C, and D, corresponding to corner points 1, 2, 3, and 4, respectively. The image taken at each corner point can be as follows: Figure 4 As shown, that is Figure 4Any one of the four images is taken. Illustratively, the servo device can control the area array camera to first take the image of the corner point 1 according to the physical position coordinates of the line-scan camera scanning graph conversion.
[0077] 10. Then the servo device drives the area array camera with the telecentric lens to fine positioning, so as to realize high-precision measurement; illustratively, the intersection 1 (corner point 1) of the edge contour line is obtained through the edge finding algorithm from the images A, B, C and D, and the difference between the intersection 1 and the image center is calculated and compensated to the physical position coordinates (X1, Y1). The record is saved as point MZ_1, and the coordinates are marked as (MZ_X1, MZ_Y1). The image center is the image center of the area array camera with the telecentric lens, which is the reference point; the difference between the intersection 1 and the image center is the distance from the image center point to the perpendicular point of the edge line or the center of the hole; it should be noted that the difference can be divided into X-axis and Y-axis components, or the Y-axis component of the difference in the Y direction is obtained, and then the above components are converted into actual distances, and the physical position coordinates are corrected according to the X-axis and Y-axis directions corresponding to the components. The coordinates of the embodiment of the application can be calculated based on the coordinates in the large coordinate system, and then various dimensions of the product can be calculated in the large coordinate system. As an optional embodiment, theoretically, the position of the intersection 1 should be at the image center after the servo moves, but the movement of the actual servo device has deviation, the nine-point matrix conversion has deviation, and the corner point 1 obtained on the line-scan graph also has deviation, so the grating ruler with higher movement precision is used to read the coordinates of the servo device in real time, which is more accurate, and the movement precision can reach 0.015 mm.
[0078] 11. Then the servo device moves the area array camera to the physical coordinates of the corner point 2 given by the line-scan camera; illustratively, the coordinates of the servo are fed back to the algorithm in real time, and are marked as (X2, Y2). Similarly, the line intersection 2 (corner point 2) is obtained through the edge finding algorithm, the difference between the intersection 2 and the image center is calculated and compensated to the servo coordinates (X2, Y2). The record is saved as point MZ_2, and the coordinates are marked as (MZ_X2, MZ_Y2).
[0079] 12. Similarly, the coordinates of the corner point 3 (MZ_X3, MZ_Y3) and the coordinates of the corner point 4 (MZ_X4, MZ_Y4) can be obtained.
[0080] 13. The size L of the product to be measured can be obtained by the point-to-point distance of the obtained point MZ_1 and point MZ_2; the size L0 of the product to be measured can be obtained by the line L12 obtained from the point MZ_1 and point MZ_2, the line L34 obtained from the point MZ_3 and point MZ_4, the midline obtained by the line L12 and line L34, and the two intersection points generated by the midline and line L14 and line L23, and then the size L0 is calculated by the distance between the two intersection points.
[0081] The embodiment of the present application firstly uses a line scanning camera to perform coarse positioning, and then uses a surface array camera plus a telecentric lens to perform fine positioning, while using a grating ruler to feed back physical position coordinates in real time, so as to realize high-precision measurement of automatic detection of large-size planar products.
[0082] In some embodiments, as shown in Figure 8 The embodiment of the present application provides a measurement device for large-size planar products, applied to a size measurement device, the size measurement device comprising a test platform for placing a planar product to be measured, a servo device installed on the test platform, a static line scanning module and a dynamic surface array telecentric module arranged on the servo device. The device comprises: A first determination module, which performs similarity comparison based on a scanning image of the planar product to be measured acquired by the static line scanning module and a preset template image, and determines a size type to be measured of the planar product to be measured, mark points and pixel position coordinates of the mark points in the scanning image. A second determination module, which determines a pixel distance from each actual pixel position coordinate to a contour line where the corresponding mark point is located based on the pixel position coordinates of each mark point in the scanning image and actual pixel position coordinates corresponding to each mark point collected by the dynamic surface array telecentric module driven by the servo device, and corrects the physical position coordinates of each mark point to target physical position coordinates. A calculation module, which calculates a size combination of the planar product to be measured according to the size type to be measured and the target physical position coordinates of each mark point.
[0083] Due to the resolution limitation of the current camera and the cost problem of high-precision cameras, high-precision size measurement of large-size planar products cannot be achieved. Therefore, a line scanning camera is firstly used to perform coarse positioning, and then a surface array camera plus a telecentric lens is used to perform fine positioning. A grating ruler feeds back physical coordinates in real time to participate in calculation.
[0084] Further, before the step of performing similarity comparison based on the scanning image of the planar product to be measured acquired by the static line scanning module and the preset template image, and determining the size type to be measured of the planar product to be measured, mark points and pixel position coordinates of the mark points in the scanning image, the device is further used to determine a relationship matrix between an image coordinate system and a world coordinate system of the size measurement device based on a scanning image collected by the static line scanning module on a test platform calibrated with mark points and an acquisition image of the test platform detected by the dynamic surface array telecentric module for each mark point.
[0085] Further, the dynamic area array telecentric module comprises an area array camera and a telecentric lens; before the step of determining the to-be-measured size type, the identification point and the pixel position coordinates of the identification point in the scanning image of the to-be-measured planar product based on the similarity comparison between the scanning image of the to-be-measured planar product obtained based on the static line scanning module and the preset template image, the device is specifically configured to divide the test platform into a plurality of square grids of a preset size according to the size of the test platform, and mark the center point of each square grid as an identification point; scan the test platform on which the identification points are marked based on the static line scanning module, and determine the pixel position coordinates of each identification point from the scanning image after distortion correction processing; repeatedly execute the following steps until the physical position coordinates of the servo equipment corresponding to each identification point are obtained: based on the movement of the servo equipment driving the area array camera and the telecentric lens, when the center of the collected image of the area array camera and the current identification point coincide, the physical position coordinates of the servo equipment corresponding to the current identification point are determined; the next identification point is taken as a new current identification point; based on the pixel position coordinates and the physical position coordinates of each identification point, a relationship matrix for representing the conversion relationship between the image coordinate system and the world coordinate system is determined.
[0086] Further, the first determination module is specifically configured to: determine the scanning image of the to-be-measured planar product based on the scanning of the to-be-measured planar product by the static line scanning module; compare the contour line of the to-be-measured planar product in the scanning image with the contour line of the planar product in each preset template image; if there is a preset template image with a comparison similarity reaching a preset threshold, determine the model, to-be-measured size type and identification point of the to-be-measured planar product based on the preset template image.
[0087] Further, the first determination module is specifically configured to: if there is no preset template image with a comparison similarity reaching a preset threshold, identify the model, to-be-measured size type and identification point of the to-be-measured planar product based on the scanning image, and create a preset template image corresponding to the to-be-measured planar product.
[0088] Further, the second determination module is specifically configured to: determine the pixel position coordinates corresponding to each identification point based on the scanning image, and convert the pixel position coordinates corresponding to each identification point into physical position coordinates according to the relationship matrix; determine the actual pixel position coordinates corresponding to each physical position in the collected image when the dynamic area array telecentric module reaches each physical position, according to the collected image; and correct the physical position coordinates corresponding to each identification point to target physical position coordinates respectively by using the pixel distance between each actual pixel position coordinate and the pixel position coordinates corresponding to each identification point.
[0089] Further, the second determining module is specifically configured to: based on the pixel distance of each actual pixel position coordinate and the pixel position coordinate corresponding to each mark point in the X direction and the Y direction respectively, superimpose the actual distance corresponding to the pixel distance on the physical position coordinate corresponding to each mark point respectively to determine the target physical position coordinate corresponding to each mark point; or, by using the pixel distance of each actual pixel position coordinate to the contour line where the corresponding mark point is located, superimpose the actual distance corresponding to the pixel distance on the Y direction of the physical position coordinate corresponding to each mark point respectively to determine the target physical position coordinate corresponding to each mark point.
[0090] Further, the size combination includes a first type of size and a second type of size; the detection module is specifically configured to: select the corresponding mark point according to a first to-be-measured size type to calculate the first type of size of the to-be-measured planar product for representing the contour line; select the corresponding mark point and the contour line of the to-be-measured planar product according to a second to-be-measured size type to determine an auxiliary line of the to-be-measured planar product; and determine the second type of size of the to-be-measured planar product according to the intersection of the auxiliary line and the contour line.
[0091] The electronic device provided in the embodiment can be, but is not limited to, a personal computer (PC), a notebook computer, a monitoring device, a server, and the like.
[0092] As an exemplary embodiment, refer to Figure 9 The electronic device 110 includes a communication interface 111, a processor 112, a memory 113, and a bus 114, the processor 112, the communication interface 111, and the memory 113 are connected through the bus 114; the memory 113 is used for storing a computer program supporting the processor 112 to execute the above method, and the processor 112 is configured to execute the program stored in the memory 113.
[0093] It can be understood that the specific operation method of each functional module in the embodiment can refer to the detailed description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0095] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting" should be understood in a broad sense, for example, can be fixedly connected, or can be detachably connected, or integrally connected; can be mechanically connected, or can be electrically connected; can be directly connected, or indirectly connected through an intermediate medium; can be internal communication of two elements. For those skilled in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0096] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0097] Finally, it should be noted that: the above-described embodiments are only specific embodiments of the present application, used to illustrate the technical solutions of the present application, and are not limited thereto, the protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art within the technical range disclosed by the present application can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application.
Claims
1. A method of measuring a large-size planar product, characterized by, The application is applied to a size measuring device, which comprises a test platform for placing a plane product to be measured, a servo device installed on the test platform, a static line scanning module and a dynamic area array telecentric module arranged on the servo device; The method comprises: Similarity comparison is performed based on a scanning image of the plane product to be measured obtained by the static line scanning module and a preset template image, so as to determine a size type to be measured of the plane product to be measured, identification points and pixel position coordinates of the identification points in the scanning image; Based on the pixel position coordinates of each identification point in the scanning image and actual pixel position coordinates corresponding to each identification point collected by the dynamic area array telecentric module driven by the servo device, pixel distances from each actual pixel position coordinate to a contour line where the corresponding identification point is located are determined, and physical position coordinates of each identification point are corrected to target physical position coordinates; According to the size type to be measured and the target physical position coordinates of each identification point, a size combination of the plane product to be measured is calculated.
2. The method of claim 1, wherein, Before the step of performing similarity comparison based on a scanning image of the plane product to be measured obtained by the static line scanning module and a preset template image, so as to determine a size type to be measured of the plane product to be measured, identification points and pixel position coordinates of the identification points in the scanning image, the method further comprises: Based on a scanning image of the test platform with the identification points calibrated collected by the static line scanning module and a collection image of the test platform detected by the dynamic area array telecentric module for each identification point, a relationship matrix between an image coordinate system and a world coordinate system of the size measuring device is determined.
3. The method of claim 2, wherein, The dynamic area array telecentric module comprises an area array camera and a telecentric lens; based on a scanning image of the test platform with the identification points calibrated collected by the static line scanning module and a collection image of the test platform detected by the dynamic area array telecentric module for each identification point, the step of determining the relationship matrix between the image coordinate system and the world coordinate system of the size measuring device comprises: According to the size of the test platform, the test platform is divided into multiple square grids of preset sizes, and the center points of each square grid are calibrated as identification points; Based on the test platform with the identification points calibrated scanned by the static line scanning module, pixel position coordinates of each identification point are determined from a scanning image after distortion correction processing; The following steps are repeatedly executed until physical position coordinates of the servo device corresponding to each identification point are obtained: based on the movement of the servo device driving the area array camera and the telecentric lens, when the center of the collection image of the area array camera and the telecentric lens coincides with the current identification point, the physical position coordinates of the servo device corresponding to the current identification point are determined; the next identification point is taken as a new current identification point; Based on the pixel position coordinates and the physical position coordinates of each identification point, a relationship matrix for representing the conversion relationship between the image coordinate system and the world coordinate system is determined.
4. The method of claim 1, wherein, The step of determining the to-be-measured size type, the identification point, and the pixel position coordinates of the identification point in the scanning image of the to-be-measured planar product based on the similarity comparison between the scanning image of the to-be-measured planar product and the preset template image obtained by the static line scanning module comprises the following steps: scanning the to-be-measured planar product based on the static line scanning module to determine the scanning image of the to-be-measured planar product; comparing the to-be-measured planar product contour line in the scanning image with the planar product contour line in each preset template image; if there is a preset template image with a comparison similarity reaching a preset threshold, determining the model, the to-be-measured size type, and the identification point of the to-be-measured planar product based on the preset template image.
5. The method of claim 4, wherein, The step of determining the to-be-measured size type, the identification point, and the pixel position coordinates of the identification point in the scanning image of the to-be-measured planar product based on the similarity comparison between the scanning image of the to-be-measured planar product and the preset template image obtained by the static line scanning module further comprises the following steps: if there is no preset template image with a comparison similarity reaching a preset threshold, identifying the model, the to-be-measured size type, and the identification point of the to-be-measured planar product based on the scanning image, and creating a preset template image corresponding to the to-be-measured planar product.
6. The method of claim 1, wherein, The step of determining the pixel distance from each actual pixel position coordinate to the contour line where the corresponding identification point is located and correcting the physical position coordinates of each identification point to target physical position coordinates based on the pixel position coordinates of each identification point in the scanning image and the actual pixel position coordinates corresponding to each identification point collected by the dynamic area array telecentric module driven by the servo device comprises the following steps: determining the pixel position coordinates of each identification point based on the scanning image, and converting the pixel position coordinates of each identification point to physical position coordinates according to a relationship matrix; determining the actual pixel position coordinates corresponding to each physical position in the collected image when the dynamic area array telecentric module reaches each physical position; correcting the physical position coordinates of each identification point to target physical position coordinates respectively by using the pixel distance between each actual pixel position coordinate and the pixel position coordinates corresponding to each identification point.
7. The method of claim 6, wherein, The step of correcting the physical position coordinates of each identification point to target physical position coordinates respectively by using the pixel distance between each actual pixel position coordinate and the pixel position coordinates corresponding to each identification point comprises the following steps: based on the pixel distance of each actual pixel position coordinate and the pixel position coordinates corresponding to each identification point in the X direction and the Y direction respectively, superimposing actual distances corresponding to the pixel distances on the physical position coordinates corresponding to each identification point respectively to determine the target physical position coordinates corresponding to each identification point. or, correcting the physical position coordinates of each identification point to target physical position coordinates respectively by using the pixel distance from each actual pixel position coordinate to the contour line where the corresponding identification point is located and superimposing actual distances corresponding to the pixel distances on the Y direction of the physical position coordinates corresponding to each identification point respectively.
8. The method of claim 1, wherein, The size combination includes a first type of size and a second type of size; and the step of calculating the size combination of the to-be-measured planar product according to the to-be-measured size type and the target physical position coordinates of each of the mark points comprises: selecting the corresponding mark points according to the first to-be-measured size type, and calculating the first type of size of the to-be-measured planar product for representing the contour line; selecting the corresponding mark points and the contour line of the to-be-measured planar product according to the second to-be-measured size type, and determining the auxiliary line of the to-be-measured planar product; determining the second type of size of the to-be-measured planar product according to the intersection of the auxiliary line and the contour line.
9. A measuring device for large-size planar products, characterized in that, The application is applied to a size measuring device, which comprises a test platform for placing a to-be-measured planar product, a servo device installed on the test platform, a static line scanning module and a dynamic area array telecentric module arranged on the servo device. The device comprises: a first determining module configured to perform similarity comparison based on a scanning image of the to-be-measured planar product acquired by the static line scanning module and a preset template image, and determine a to-be-measured size type, mark points and pixel position coordinates of the mark points in the scanning image of the to-be-measured planar product; a second determining module configured to determine a pixel distance from each of the actual pixel position coordinates to a contour line on which the corresponding mark point is located based on the pixel position coordinates of each of the mark points in the scanning image and actual pixel position coordinates corresponding to each of the mark points collected by the dynamic area array telecentric module driven by the servo device, and correct the physical position coordinates of each of the mark points to target physical position coordinates; a calculating module configured to calculate a size combination of the to-be-measured planar product according to the to-be-measured size type and the target physical position coordinates of each of the mark points.
10. An electronic device, comprising: The size measuring device comprises a memory, a processor and a program stored on the memory and capable of running on the processor, and the processor implements the method according to any one of claims 1 to 8 when executing the program.
Citation Information
Patent Citations
Inner river ship automatic identification system of multiple vision sensor information fusion
CN101145200A
Fluorescence Imaging Autofocus Systems And Methods
CN105403543A
The invention relates to an evaluation method of monocular camera and millimeter wave radar external parameter calibration accuracy
CN109636837A
ArUco code-based structure plane displacement visual monitoring method
CN115289982A
Joint measurement method, device and system and storage medium
CN116878389A