Sheet measuring method, device, equipment and medium

By classifying the edge rectangle and generating the film line in the image, the method of identifying the edge of the sheet solves the problem of incomparable identification of edges in existing technologies, and achieves high -precision sheet measurement.

CN119379677AActive Publication Date: 2025-01-28HANGZHOU BAIZIJIAN TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411943367.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The prior art is not accurate enough when identifying the edges of sheets in images, resulting in inaccurate measurement results.

Method used

By divide the initial edge lines in the image of the tablet to be processed, the edge rectangles are constructed at each segment, and the projection line parallel to the initial edge line is generated. Eventually, the border point on the target sliding line is measured.

Benefits of technology

A precise recognition of the edge of the sheet is implemented, and the accuracy of the measurement results is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379677A_ABST
    Figure CN119379677A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a sheet measurement method and device, equipment and a medium, and relates to the technical field of sheet measurement. The method comprises the following steps: in an image of a to-be-processed sheet, dividing an initial edge line into a first preset number of line segments, and constructing an edge rectangle comprising the line segment at each line segment; in the edge rectangle, generating a second preset number of projection lines parallel to the initial edge line; in the same edge rectangle, based on the comprehensive pixel values of the target pixel points corresponding to the projection lines, target projection lines located at the edge position of the to-be-processed sheet are determined in all the projection lines; and measuring the to-be-processed sheet based on the boundary points on the target projection lines in the edge rectangles to obtain a measurement result of the to-be-processed sheet. According to the technical scheme, the edge rectangles are divided between the corner points, the boundary points capable of accurately reflecting the edge positions are recognized in the edge rectangles, and support is provided for accurate measurement of the to-be-processed sheet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sheet material measurement, and in particular to a sheet material measurement method, device, equipment and medium. Background Art

[0002] In industrial production, boundary detection and corner location are the basis of many quality control and dimensional measurement tasks. Accurate boundary detection can help identify the shape and defects of products, while accurate corner location is the prerequisite for high-precision measurement and positioning.

[0003] Currently, when identifying the edge of a sheet in an image, methods such as Canny edge detection, Hough line detection, and SIFT (Scale Invariant Feature Transform) can be used. However, the sheet edges determined by the above methods are not accurate enough, which leads to inaccurate measurement results of the sheet. Summary of the invention

[0004] The present invention provides a sheet material measurement method, device, equipment and medium, which can accurately identify the edge position of the sheet material and thus obtain accurate measurement results.

[0005] According to one aspect of the present invention, a method for measuring a sheet material is provided, the method comprising:

[0006] In the image of the sheet to be processed, an initial edge line is divided into a first preset number of line segments, and an edge rectangle including the line segment is constructed at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed;

[0007] In the edge rectangle, generating a second preset number of projection lines parallel to the initial edge line;

[0008] In the same edge rectangle, based on the comprehensive pixel values ​​of the target pixel points corresponding to the projection lines, a target projection line located at the edge position of the sheet to be processed is determined in each projection line;

[0009] The sheet to be processed is measured based on the boundary points on the target projection line in each edge rectangle to obtain a measurement result of the sheet to be processed.

[0010] According to another aspect of the present invention, there is provided a measuring device for a sheet material, comprising:

[0011] An edge rectangle determination module is used to divide the initial edge line into a first preset number of line segments in the image of the sheet to be processed, and construct an edge rectangle including the line segment at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed;

[0012] A projection line generating module, used for generating a second preset number of projection lines parallel to the initial edge line in the edge rectangle;

[0013] A target projection line determination module is used to determine the target projection line located at the edge position of the sheet to be processed in each projection line based on the comprehensive pixel value of the target pixel point corresponding to the projection line in the same edge rectangle;

[0014] The sheet material measurement module is used to measure the sheet material to be processed based on the boundary points on the target projection line in each edge rectangle to obtain the measurement result of the sheet material to be processed.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the sheet material measuring method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sheet material measuring method described in any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present application includes: in the image of the sheet to be processed, the initial edge line is divided into a first preset number of line segments, and an edge rectangle including the line segment is constructed at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed; in the edge rectangle, a second preset number of projection lines parallel to the initial edge line are generated; in the same edge rectangle, based on the comprehensive pixel value of the target pixel point corresponding to the projection line, the target projection line located at the edge position of the sheet to be processed is determined in each projection line; based on the boundary points on the target projection line in each edge rectangle, the sheet to be processed is measured to obtain the measurement result of the sheet to be processed. The technical solution provides support for the accurate measurement of the sheet to be processed by dividing the corner points into multiple edge rectangles, identifying the boundary points that can accurately reflect the edge position in each edge rectangle.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a flow chart of a sheet material measurement method provided according to Embodiment 1 of the present application;

[0024] Figure 2 is a flow chart of a sheet material measurement method provided according to Embodiment 2 of the present application;

[0025] Figure 3 It is a schematic diagram of the camera field of view and material position provided according to the second embodiment of the present application;

[0026] Figure 4 is a schematic diagram of the motion space relationship between the camera and the material provided in Example 2 of the present application;

[0027] Figure 5 is a schematic diagram of an edge rectangle of a sheet image to be processed captured by a camera according to the second embodiment of the present application;

[0028] Figure 6 is a schematic diagram of an edge rectangle of a sheet image to be processed captured by another camera according to the second embodiment of the present application;

[0029] Figure 7 is a schematic diagram of a comprehensive pixel value provided according to the second embodiment of the present application;

[0030] Figure 8 is a schematic structural diagram of a sheet material measuring device provided according to Embodiment 3 of the present application;

[0031] Fig. 9 It is a schematic diagram of the structure of an electronic device for implementing a sheet material measuring method according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Embodiment 1

[0035] Figure 1 A flow chart of a sheet material measurement method is provided for the first embodiment of the present application. The embodiment of the present application is applicable to the case of measuring a sheet material. The method can be performed by a sheet material measurement device. The sheet material measurement device can be implemented in the form of hardware and / or software. The sheet material measurement device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:

[0036] S110, in the image of the sheet to be processed, dividing the initial edge line into a first preset number of line segments, and constructing an edge rectangle including the line segment at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed.

[0037] The sheet material to be processed may be metal, plastic, leather or other materials that need to be measured, such as aluminum plate, PVC sheet, etc. The first preset number may be determined according to actual conditions, and the embodiment of the present application does not limit this.

[0038] Specifically, an image of a sheet to be processed is acquired, and after corner point recognition is performed on the image, each corner point of the sheet to be processed is obtained, and the line between two adjacent corner points is determined as an initial edge line, and the initial edge line is evenly divided to obtain a first preset number of line segments, and the line segments are used as the median lines of the edge rectangle to obtain the edge rectangle. In a specific example, the process of generating the edge rectangle can be: assume that the four sides of the edge rectangle are the first side, the second side, the third side, and the fourth side, respectively, the first side and the third side are opposite, the second side and the fourth side are opposite, the two ends of the line segment are the midpoints of the first side and the third side, and the lengths of the first side and the third side are set as the preset distance, and the edge rectangle can be obtained.

[0039] S120: Generate, in the edge rectangle, a second preset number of projection lines parallel to the initial edge line.

[0040] Among them, the second preset number can be determined according to actual conditions, and the embodiment of the present application does not limit this.

[0041] Specifically, the edge rectangle includes some line segments of the initial edge line. Since the initial edge line roughly reflects the edge position of the sheet, the line segments of the initial edge line in the edge rectangle can be translated to obtain projection lines, each of which is parallel to the initial edge line.

[0042] In the image, the length of the first side and the third side of the edge rectangle may be 50 pixels in length (the first side and the third side are the two sides in the edge rectangle that intersect with the initial edge line), and each pixel length is the length of a pixel point. In this case, the second preset number can be determined to be 50, that is, when the initial edge line is translated, it is only moved one pixel length each time so that the projection line covers as much of the edge rectangle as possible.

[0043] S130, in the same edge rectangle, based on the comprehensive pixel values ​​of the target pixel points corresponding to the projection lines, determining the target projection line located at the edge position of the sheet to be processed in each projection line.

[0044] Specifically, since the image of the edge position of the sheet to be processed is at the junction of the background and the sheet, that is, the pixel values ​​of the pixel points near the edge of the sheet to be processed have numerical changes, the projection line whose comprehensive pixel value has a large difference with the comprehensive pixel value of the adjacent projection line can be identified according to the comprehensive pixel values ​​corresponding to different projection lines, and the projection line is determined as the target projection line.

[0045] S140, measuring the sheet to be processed based on the boundary points on the target projection line in each edge rectangle to obtain a measurement result of the sheet to be processed.

[0046] Specifically, after obtaining the target projection line in each edge rectangle, the boundary point can be identified on the projection line (for example, the midpoint of the projection line is used as the boundary point). In this case, the boundary points obtained are all located in the edge area of ​​the sheet to be processed. The length, area and other parameters of the sheet to be processed can be measured based on the boundary points on each side of the sheet to be processed.

[0047] The technical solution of the embodiment of the present application includes: in the image of the sheet to be processed, the initial edge line is divided into a first preset number of line segments, and an edge rectangle including the line segment is constructed at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed; in the edge rectangle, a second preset number of projection lines parallel to the initial edge line are generated; in the same edge rectangle, based on the comprehensive pixel value of the target pixel point corresponding to the projection line, the target projection line located at the edge position of the sheet to be processed is determined in each projection line; based on the boundary points on the target projection line in each edge rectangle, the sheet to be processed is measured to obtain the measurement result of the sheet to be processed. The technical solution provides support for the accurate measurement of the sheet to be processed by dividing the corner points into multiple edge rectangles, identifying the boundary points that can accurately reflect the edge position in each edge rectangle.

[0048] Embodiment 2

[0049] Figure 2 This is a flow chart of a sheet material measurement method provided in Example 2 of the present application. This example of the present application is optimized based on the above example.

[0050] like Figure 2 As shown, the method of the embodiment of the present application specifically includes the following steps:

[0051] S210, determining corner points in the sheet image to be processed.

[0052] In an embodiment of the present application, optionally, the process of determining the corner points of the sheet to be processed includes: performing corner point detection on an initial detection area of ​​the sheet image to be processed based on a corner point detection model to obtain initial corner point coordinates; performing outward expansion processing based on the initial corner point coordinates to obtain an updated detection area; if a target corner point detection algorithm is used to perform corner point identification in the updated detection area to obtain updated corner point coordinates, then determining the final corner point coordinates based on the initial corner point coordinates, the updated corner point coordinates, and the distance between the initial corner point coordinates and the updated corner point coordinates; otherwise, determining the initial corner point coordinates as the final corner point coordinates.

[0053] For example, Figure 3 The camera field of view and material position diagram can be used to shoot the material through the camera to obtain the image of the sheet to be processed. If the sheet to be processed is large, two line scan cameras can cover the entire sheet. There is a certain degree of overlap between the cameras to prevent missed inspections. The schematic diagram of the motion space relationship between the camera and the material is shown in Figure 4. An initial detection area is marked in the sheet image to be processed, and the corner point detection model is used to perform corner point detection on the initial detection area of ​​the sheet image to be processed to obtain the initial corner point coordinates; an outward expansion process is performed with the initial corner point coordinates as the center to obtain an updated detection area smaller than the initial detection area; in the updated detection area, the Harris Corner Detection algorithm is used to identify the corner points. If the corner points are identified, the identified corner point coordinates are used as the updated corner point coordinates, and then the distance between the initial corner point coordinates and the updated corner point coordinates is determined according to the following formula:

[0054] ;

[0055] in, is the distance between the initial corner point coordinates and the updated corner point coordinates, are the initial corner point coordinates, To update the corner point coordinates, is the distance threshold.

[0056] If it is less than or equal to the distance threshold, the updated corner point coordinates are determined as the final corner point coordinates; if it is greater than the distance threshold, the final corner point coordinates are determined based on the product of the initial corner point coordinates and the first weight, and the product of the updated corner point coordinates and the second weight; the first weight is less than the second weight, and the sum of the first weight and the second weight is 1; exemplarily, the first weight is 0.4 and the second weight is 0.6.

[0057] Exemplarily, the final corner point coordinates are determined according to the following formula:

[0058] ;

[0059] in, is the final corner point coordinate, is the first weight, is the second weight.

[0060] It should be noted that, for a sheet of fixed size, the corner detection model can be a fixed-size target detection model based on deep learning. For a sheet of non-fixed size, the corner detection model can be a multi-scale pyramid feature fusion network model.

[0061] This solution combines the deep learning model with the traditional corner detection method for corner detection, effectively improving the positioning accuracy of boundaries and corners, and reducing missed detections and false detections in complex backgrounds and noisy environments. By combining deep learning detection with traditional corner detection, if the traditional method fails to detect the corner, the deep learning result can be used as the standard, ensuring the effective positioning of each corner. This solution reduces background interference that is not related to detection by setting the initial detection area and updating the detection area (the detection area is the region of interest (ROI)), significantly improving the detection effect of corners and boundaries.

[0062] S220, connecting two adjacent corner points in the sheet image to be processed to obtain an initial edge line.

[0063] In an embodiment of the present application, optionally, before dividing the initial edge line into a first preset number of line segments, the method further includes: calculating the angle between the initial edge line and the horizontal line; if the angle is not within a preset angle range, issuing an angle abnormality alarm and recording angle abnormality information.

[0064] Specifically, after corner point detection, four corner points may be obtained, each of which is located at the edge of the sheet to be processed. The four corner points are connected into a rectangle, and each side of the rectangle is the initial edge line. The angle between each initial edge line and the horizontal line (which can be the x-axis) is calculated. If the angle is within the preset angle range, the position of the sheet is normal; if the angle is not within the preset angle range, an angle abnormality alarm is issued and the angle abnormality information is recorded.

[0065] This solution monitors each edge by setting angle anomaly detection. If it exceeds the set range, the system can promptly alarm and remind the staff to check. It can promptly detect equipment deviation or sheet position anomaly to prevent production accidents. It ensures the stability and safety of the production line. It effectively monitors the equipment status and warns of possible problems early, thus avoiding system failures caused by significant deviations in the hardware structure.

[0066] For example, the equation of a straight line: For two corner points (x1, y1) and (x2, y2), the slope m of the straight line is calculated as:

[0067] ;

[0068] Calculate the angle between each side and the horizontal line based on the slope :

[0069] .

[0070] For each initial edge line, according to the allowed deviation angle And the set value determines the preset angle range, such as the preset angle range =Set value .

[0071] S230 , in the image of the sheet to be processed, dividing the initial edge line into a first preset number of line segments, and constructing an edge rectangle including the line segment at each line segment.

[0072] For example, Figure 5 It is a schematic diagram of the edge rectangle of the sheet image to be processed captured by a camera. Figure 6 This is a schematic diagram of the edge rectangle of the sheet image to be processed captured by another camera. The surrounding red circles are corner points, and the rectangles between the corner points are edge rectangles.

[0073] Specifically, the initial edge line is divided into a first preset number of line segments, and at each line segment, an edge rectangle is constructed with the two ends of the line segment being the midpoints of the first side and the third side of the edge rectangle (the lengths of the first side and the third side can be set according to actual conditions). In this case, each edge rectangle includes a portion of the line segment of the initial edge line, and the line segment is the median line of the edge rectangle.

[0074] S240: Determine the initial edge line located in the edge rectangle as the starting projection line.

[0075] Specifically, in the edge rectangle, each projection line needs to be determined. Since the projection lines are parallel to the initial edge line, the initial edge line in the edge rectangle can be determined as the starting projection line. Subsequently, each projection line can be obtained by translating the starting projection line.

[0076] S250, in the edge rectangle, translate the starting projection line along the normal direction of the initial edge line to obtain a second preset number of projection lines; the interval between two adjacent projection lines is an integer multiple of the pixel length.

[0077] Specifically, after determining the starting projection line, the distance of each translation can be set to one pixel length, and then the starting projection line is translated, and a new projection line is obtained each time the translation ends until the translation reaches the boundary of the edge rectangle, thereby obtaining each projection line separated by one pixel length in the edge rectangle.

[0078] S260: Determine the target pixel point corresponding to the projection line in the same edge rectangle.

[0079] In an embodiment of the present application, optionally, determining the target pixel point corresponding to the projection line includes: determining the intersection of the projection line and the first side of the edge rectangle as the starting point; constructing a rectangular coordinate system corresponding to the pixel coordinate system, and determining the projection expression of the projection line in the rectangular coordinate system; determining the target movement interval according to the slope of the projection expression and the pixel length of the pixel point; starting from the starting point of the projection line, each time the target movement interval is moved on the projection line, a discrete projection point is obtained; and the pixel point corresponding to the discrete projection point in the pixel coordinate system is determined as the target pixel point corresponding to the projection line.

[0080] Specifically, the projection line intersects with two sides of the edge rectangle and has two intersection points. Any of the two sides can be used as the first side, and the intersection point of the projection line and the first side of the edge rectangle is determined as the starting point. Starting from the starting point, each time the target moving interval is moved on the initial edge line in the edge rectangle, each discrete projection point is obtained, and the pixel points corresponding to the discrete projection points (including the starting point) in the pixel coordinate system are determined, and these pixel points are determined as the target pixel points corresponding to the projection line. Among them, when determining the pixel points corresponding to the discrete projection points in the pixel coordinate system, the coordinates of the discrete projection points can be rounded to obtain the corresponding pixel points in the pixel coordinate system, or the coordinate range of the discrete projection points corresponding to each pixel point can be pre-set, and then the pixel points corresponding to the discrete projection points in the pixel coordinate system are determined based on the pre-set information.

[0081] Furthermore, the target movement interval is determined according to the slope of the projection expression and the pixel length of the pixel point, which can be:

[0082] If the slope of the projection expression is equal to 1, the target movement interval is determined to be times the pixel length; if the slope of the projection expression is less than 1, then after moving one pixel length on the horizontal axis, the moving distance on the projection line is the target moving interval, which can be specifically calculated by the slope of the projection expression for the angle between the projection line and the x-axis, and the ratio of one pixel length to the cosine value of the angle is used as the target moving interval. If the slope of the projection expression is greater than 1, then after moving one pixel length on the vertical axis, the moving distance on the projection line is the target moving interval, which can be specifically calculated by the slope of the projection expression for the angle between the projection line and the y-axis, and the ratio of one pixel length to the cosine value of the angle is used as the target moving interval.

[0083] S270, taking the average pixel value of the target pixel point as the comprehensive pixel value corresponding to the projection line.

[0084] S280: Determine, among the integrated pixel values, a projection line corresponding to the integrated pixel value that satisfies the pixel mutation condition as the target projection line.

[0085] For example, Figure 7 is a schematic diagram of a comprehensive pixel value. Figure 7 In , the vertical coordinate pixel value is the comprehensive pixel value. The comprehensive pixel values ​​corresponding to each projection line are not the same. At the edge of the sheet to be processed, the comprehensive pixel value changes greatly. The projection line corresponding to the comprehensive pixel value that meets the pixel mutation condition can be determined as the target projection line.

[0086] S290, measuring the sheet to be processed based on the boundary points on the target projection line in each edge rectangle to obtain a measurement result of the sheet to be processed.

[0087] Specifically, after determining the target projection line, the midpoint on the target projection line can be used as the boundary point. In this way, the boundary points of each edge rectangle are located on the edge of the sheet to be processed. The sheet to be processed can be accurately measured based on the boundary point position and the corner point position.

[0088] In an embodiment of the present application, optionally, the sheet to be processed is measured based on the boundary points on the target projection line in each edge rectangle to obtain a measurement result of the sheet to be processed, including: determining the boundary points according to the comprehensive pixel value corresponding to the target projection line and the position of the target projection line; determining the length of the side to be measured according to the position of the boundary points in the edge rectangle on the side to be measured of the sheet to be processed; if it is determined that the side to be measured of the sheet to be processed appears in at least two images, then determining the final length of the side to be measured of the sheet to be processed based on the length of the side to be measured detected in each image and the length of the pixel overlap area in the camera.

[0089] For example, one feasible solution is to determine the midpoint on the target projection line as the boundary point. Another feasible solution is to determine the pixel point closest to the comprehensive pixel value among the pixel points on the target projection line as the boundary point. After the boundary point is determined, two adjacent boundary points can be connected on one edge, and each edge can be connected through the corner point to obtain all the edges of the sheet to be processed. If the sheet to be processed is large, for example Figure 3 As shown, if two images are needed to obtain a complete sheet, the length and area of ​​the edge to be measured (the edge to be measured is an edge that overlaps) of the sheet to be processed in the two images of the sheet to be processed are calculated respectively, and then based on the installation position and field of view of the two cameras, the overlapping length and overlapping area are determined in the two images respectively, and the final length of the edge to be measured and the final area are determined according to the above results.

[0090] Specifically, in one sheet image to be processed, the length of the first side to be measured and the first overlapping length are measured; in another sheet image to be processed, the length of the second side to be measured and the second overlapping length are measured; the difference between the length of the first side to be measured and the first overlapping length is determined as the first value, the difference between the length of the second side to be measured and the second overlapping length is determined as the second value, and the sum of the first value and the second value is determined as the final length of the side to be measured.

[0091] In one sheet image to be processed, a first detection area and a first overlap area are measured; in another sheet image to be processed, a second detection area and a second overlap area are measured, and the difference between the first detection area and the first overlap area is taken as the third value, and the difference between the second detection area and the second overlap area is taken as the fourth value, and the sum of the third value and the fourth value is determined as the final area.

[0092] This arrangement of the present scheme can accurately determine the boundary points of the sheet to be processed, and since each boundary point is determined in the edge rectangle, it can more accurately reflect the edge position of the sheet to be processed, thereby making the final calculated values ​​such as the length and area of ​​the sheet to be processed more accurate.

[0093] Embodiment 3

[0094] Figure 8 This is a schematic diagram of the structure of a sheet material measuring device provided in the third embodiment of the present application. The device can execute the sheet material measuring method provided in any embodiment of the present invention and has the corresponding functional modules and beneficial effects of the execution method. Figure 8 As shown, the device comprises:

[0095] The edge rectangle determination module 310 is used to divide the initial edge line into a first preset number of line segments in the image of the sheet to be processed, and construct an edge rectangle including the line segment at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed;

[0096] A projection line generating module 320, configured to generate a second preset number of projection lines in the edge rectangle that are parallel to the initial edge line;

[0097] A target projection line determination module 330 is used to determine, in the same edge rectangle, a target projection line located at an edge position of the sheet to be processed in each projection line based on the comprehensive pixel value of the target pixel point corresponding to the projection line;

[0098] The sheet material measurement module 340 is used to measure the sheet material to be processed based on the boundary points on the target projection line in each edge rectangle to obtain the measurement result of the sheet material to be processed.

[0099] The technical solution of the embodiment of the present application includes: an edge rectangle determination module 310, which is used to divide the initial edge line into a first preset number of line segments in the image of the sheet to be processed, and construct an edge rectangle including the line segment at each line segment; the initial edge line is the line between two adjacent corner points of the sheet to be processed; a projection line generation module 320, which is used to generate a second preset number of projection lines parallel to the initial edge line in the edge rectangle; a target projection line determination module 330, which is used to determine the target projection line located at the edge position of the sheet to be processed in each projection line based on the comprehensive pixel value of the target pixel point corresponding to the projection line in the same edge rectangle; a sheet measurement module 340, which is used to measure the sheet to be processed based on the boundary points on the target projection line in each edge rectangle to obtain the measurement result of the sheet to be processed. The technical solution divides the corner points into multiple edge rectangles, identifies the boundary points that can accurately reflect the edge position in each edge rectangle, and provides support for the accurate measurement of the sheet to be processed.

[0100] In the embodiment of the present application, optionally, the projection line generation module 320 includes:

[0101] A starting projection line determining unit, used for determining an initial edge line located in the edge rectangle as a starting projection line;

[0102] The projection line generating unit is used to translate the starting projection line along the normal direction of the initial edge line in the edge rectangle to obtain a second preset number of projection lines; the interval between two adjacent projection lines is an integer multiple of the pixel length.

[0103] In the embodiment of the present application, optionally, the target projection line determination module 330 includes:

[0104] A target pixel point determination unit, used to determine the target pixel point corresponding to the projection line;

[0105] A comprehensive pixel value calculation unit, used to take the average pixel value of the target pixel point as the comprehensive pixel value corresponding to the projection line;

[0106] The target projection line determination unit is used to determine the projection line corresponding to the integrated pixel value that meets the pixel mutation condition among the integrated pixel values ​​as the target projection line.

[0107] In an embodiment of the present application, optionally, the target pixel point determination unit includes:

[0108] A starting point determination subunit, used to determine the intersection of the projection line and the first side of the edge rectangle as the starting point;

[0109] A projection expression determination subunit is used to construct a rectangular coordinate system corresponding to the pixel coordinate system and determine the projection expression of the projection line in the rectangular coordinate system;

[0110] A target movement interval determination subunit is used to determine the target movement interval according to the slope of the projection expression and the pixel length of the pixel point;

[0111] A discrete projection point determination subunit is used to obtain discrete projection points by moving the target at each time interval on the projection line starting from the starting point of the projection line;

[0112] The target pixel point determination subunit is used to determine the pixel point corresponding to the discrete projection point in the pixel coordinate system as the target pixel point corresponding to the projection line.

[0113] In the embodiment of the present application, optionally, the device further includes: a corner point determination module, specifically including:

[0114] Performing corner point detection on the initial detection area of ​​the sheet image to be processed based on the corner point detection model to obtain initial corner point coordinates;

[0115] Perform outward expansion processing based on the initial corner point coordinates to obtain an updated detection area;

[0116] If a target corner point detection algorithm is used in the update detection area to identify corner points and obtain update corner point coordinates, the final corner point coordinates are determined according to the initial corner point coordinates, the update corner point coordinates, and the distance between the initial corner point coordinates and the update corner point coordinates;

[0117] Otherwise, the initial corner point coordinates are determined as the final corner point coordinates.

[0118] In the embodiment of the present application, optionally, the device further includes:

[0119] An angle calculation module, used to calculate the angle between the initial edge line and the horizontal line;

[0120] The abnormality alarm module is used to issue an angle abnormality alarm and record angle abnormality information if the angle is not within a preset angle range.

[0121] In the embodiment of the present application, optionally, the sheet material measurement module 340 includes:

[0122] A boundary point determination unit, used to determine the boundary point according to the comprehensive pixel value corresponding to the target projection line and the position of the target projection line;

[0123] A length determination unit, used to determine the length of the side to be measured according to the position of the boundary point in the edge rectangle on the side to be measured of the sheet to be processed;

[0124] The final length determining unit is used to determine the final length of the edge to be measured of the sheet to be processed based on the length of the edge to be measured detected in each image and the length of the pixel overlap area in the camera if it is determined that the edge to be measured of the sheet to be processed appears in at least two images.

[0125] A sheet material measuring device provided in an embodiment of the present application can execute a sheet material measuring method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0126] Embodiment 4

[0127] Fig. 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0128] like Fig. 9 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0129] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0130] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for measuring a sheet.

[0131] In some embodiments, the sheet material measurement method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the sheet material measurement method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the sheet material measurement method in any other appropriate manner (e.g., by means of firmware).

[0132] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0134] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0135] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0136] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0137] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0138] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0139] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for measuring a sheet material, characterized in that: include: In the image of the sheet to be processed, an initial edge line is divided into a first preset number of line segments, and an edge rectangle including the line segment is constructed at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed; In the edge rectangle, generating a second preset number of projection lines parallel to the initial edge line; In the same edge rectangle, based on the comprehensive pixel values ​​of the target pixel points corresponding to the projection lines, a target projection line located at the edge position of the sheet to be processed is determined in each projection line; The sheet to be processed is measured based on the boundary points on the target projection line in each edge rectangle to obtain a measurement result of the sheet to be processed.

2. The method according to claim 1, characterized in that In the edge rectangle, generating a second preset number of projection lines parallel to the initial edge line, comprising: An initial edge line located in the edge rectangle is determined as a starting projection line; In the edge rectangle, the starting projection line is translated along the normal direction of the initial edge line to obtain a second preset number of projection lines; the interval between two adjacent projection lines is an integer multiple of the pixel length.

3. The method according to claim 1, characterized in that Based on the comprehensive pixel values ​​of the target pixel points corresponding to the projection lines, a target projection line located at the edge of the sheet to be processed is determined in each projection line, including: Determine the target pixel point corresponding to the projection line; The average pixel value of the target pixel point is taken as the comprehensive pixel value corresponding to the projection line; The projection line corresponding to the integrated pixel value that meets the pixel mutation condition among the integrated pixel values ​​is determined as the target projection line.

4. The method according to claim 3, characterized in that Determine the target pixel point corresponding to the projection line, including: Determine the intersection point of the projection line and the first side of the edge rectangle as the starting point; Construct a rectangular coordinate system corresponding to the pixel coordinate system, and determine the projection expression of the projection line in the rectangular coordinate system; According to the slope of the projection expression and the pixel length of the pixel point, the target movement interval is determined; Starting from the starting point of the projection line, a discrete projection point is obtained by moving the target each time on the projection line; The pixel point corresponding to the discrete projection point in the pixel coordinate system is determined as the target pixel point corresponding to the projection line.

5. The method according to claim 1, characterized in that The process of determining the corner points of the sheet to be processed includes: Performing corner point detection on the initial detection area of ​​the sheet image to be processed based on the corner point detection model to obtain initial corner point coordinates; Perform outward expansion processing based on the initial corner point coordinates to obtain an updated detection area; If a target corner point detection algorithm is used in the update detection area to identify corner points and obtain update corner point coordinates, the final corner point coordinates are determined according to the initial corner point coordinates, the update corner point coordinates, and the distance between the initial corner point coordinates and the update corner point coordinates; Otherwise, the initial corner point coordinates are determined as the final corner point coordinates.

6. The method according to claim 1, characterized in that Before dividing the initial edge line into a first preset number of line segments, the method further includes: Calculate the angle between the initial edge line and the horizontal line; If the angle is not within the preset angle range, an angle abnormality alarm is issued and the angle abnormality information is recorded.

7. The method according to claim 1, characterized in that The sheet to be processed is measured based on the boundary points on the target projection line in each edge rectangle to obtain the measurement result of the sheet to be processed, including: Determine the boundary point according to the comprehensive pixel value corresponding to the target projection line and the position of the target projection line; Determine the length of the side to be measured according to the position of the boundary point in the edge rectangle on the side to be measured of the sheet to be processed; If it is determined that the edge to be measured of the sheet to be processed appears in at least two images, the final length of the edge to be measured of the sheet to be processed is determined based on the length of the edge to be measured detected in each image and the length of the pixel overlap area in the camera.

8. A sheet material measuring device, characterized in that: include: An edge rectangle determination module is used to divide the initial edge line into a first preset number of line segments in the image of the sheet to be processed, and construct an edge rectangle including the line segment at each line segment; the initial edge line is a line connecting two adjacent corner points of the sheet to be processed; A projection line generating module, used for generating a second preset number of projection lines parallel to the initial edge line in the edge rectangle; A target projection line determination module is used to determine the target projection line located at the edge position of the sheet to be processed in each projection line based on the comprehensive pixel value of the target pixel point corresponding to the projection line in the same edge rectangle; The sheet material measurement module is used to measure the sheet material to be processed based on the boundary points on the target projection line in each edge rectangle to obtain the measurement result of the sheet material to be processed.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the sheet material measuring method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sheet material measuring method according to any one of claims 1 to 7 when the processor executes the computer instructions.

Citation Information

Patent Citations

  • Method for detecting quadrangular marker in image

    CN105654097A

  • Line segment extraction method for high-resolution remote sensing image

    CN110136159A

  • Straight line detection method and device, equipment and storage medium

    CN116309660A

  • Cylindrical object three-dimensional reconstruction method and equipment for constructing visual cone based on edge lines

    CN118505906A

  • Rendering apparatus, rendering processing method and computer program product

    US20050275663A1