CN118328897B - Method for measuring slot hole size of sheet metal workpiece - Google Patents

Method for measuring slot hole size of sheet metal workpiece Download PDF

Info

Publication number
CN118328897B
CN118328897B CN202410765779.XA CN202410765779A CN118328897B CN 118328897 B CN118328897 B CN 118328897B CN 202410765779 A CN202410765779 A CN 202410765779A CN 118328897 B CN118328897 B CN 118328897B
Authority
CN
China
Prior art keywords
contour
measuring
rectangle
value
measurement result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410765779.XA
Other languages
Chinese (zh)
Other versions
CN118328897A (en
Inventor
肖苏华
林圣彬
吴振桦
罗文斌
琅亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Polytechnic Normal University
Original Assignee
Guangdong Polytechnic Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Polytechnic Normal University filed Critical Guangdong Polytechnic Normal University
Priority to CN202410765779.XA priority Critical patent/CN118328897B/en
Publication of CN118328897A publication Critical patent/CN118328897A/en
Application granted granted Critical
Publication of CN118328897B publication Critical patent/CN118328897B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the technical field of machine vision measurement, and discloses a method for measuring the slot size of a sheet metal workpiece, which comprises the following steps: s1: establishing a standard parameter file; s2: logging in an operating system to collect images; s3: measuring the contour to be detected in the acquired image; s4: comparing the actual value of the measurement result with the standard value in the standard parameter file: if the tolerance value is smaller than the tolerance value, outputting OK; otherwise, outputting 'NG'; s5: saving measurement result data; compared with the prior art, the method for measuring the slot hole size of the sheet metal workpiece does not need manual interaction operation on the images to determine the feature to be measured, overcomes the complicated operation that the images are selected by a mouse and fitted into the feature when the number of the feature to be measured of the workpiece is large, can judge whether the slot hole size is within the precision range or not by only comparing the measurement result with standard data, and can effectively improve the measurement efficiency of the product.

Description

Method for measuring slot hole size of sheet metal workpiece
Technical Field
The invention relates to the technical field of machine vision measurement, in particular to a method for measuring the slot size of a sheet metal workpiece.
Background
The sheet metal workpiece is a part or a workpiece processed by a sheet metal processing technology, and in the field of industrial manufacturing, the dimension precision of a hole and a slot of the sheet metal workpiece is an important factor for determining the quality of a product.
In traditional measurement, tools such as vernier calipers and micrometer are used for measuring and are required to be in contact with a workpiece, scratches are easily formed on the surface of the workpiece, manual detection is high in labor intensity, the measuring process is easily affected by physiological factors and external interference, and the efficiency is low.
With the prominence of vision measurement systems in recognition, localization, measurement tasks, vision measurement systems have begun to gradually replace manual measurements.
Most of visual measurement in the current market is visual equipment such as an imaging instrument or a visual measuring instrument, but is not suitable for measuring sheet metal workpieces. When the sheet metal workpiece needs to be measured with more features, the image needs to be acquired first, then the features are fitted on the image one by one, and the efficiency is low.
Disclosure of Invention
The invention aims to provide a method for measuring the slot size of a sheet metal workpiece, which is used for solving the technical problems.
A method for measuring the slot size of a sheet metal workpiece comprises the following steps:
s1: establishing a standard parameter file:
S11: the PRT.1 file of Pro/ENGINEER is transferred to a DWG file;
S12: reserving size table information of the DWG file and exporting the size table information into a CSV file;
s13: converting the CSV file into an Excel file to obtain an original standard parameter table;
s14: sequencing the outlines in the original standard parameter table to obtain a standard parameter file;
The method for sequencing the outlines in the original standard parameter table comprises the following steps:
S141: recording the total number, the minimum rank value and the maximum rank value of the outlines to be detected: the row values are the basis for distinguishing which row the contours to be ordered start, and the column values are the basis for distinguishing which contours start;
S142: determining the rows and columns of all outlines;
S143: the contours of the same type are orderly ordered and numbered according to the rank value: among the similar contours, the contour with the smallest row and column value is the first contour, the contour with the smallest column value is the first contour of the row, and the contour with the largest column value is the last contour of the row;
S2: logging in an operating system to collect images;
S3: measuring the contour to be detected in the acquired image:
S31: distinguishing the outline shape according to the roundness and the rectangularity of the sub-pixel outline;
S32: reordering the screened profiles of the same type: re-ordering and numbering the same types of contours by adopting the same method as the method for ordering contours in the original standard parameter table in the step S14;
S33: fitting out corresponding contour features and measuring;
S4: comparing the actual value of the measurement result with the standard value in the standard parameter file: if the tolerance value is smaller than the tolerance value, outputting OK; otherwise, outputting 'NG';
S5: and saving the measurement result data.
In step S142, if a contour spans at least two adjacent rows, the contour belongs to the row whose maximum row value falls.
According to an embodiment of the present invention, in step S143: after the contours of the same type are sequentially ordered and numbered according to the rank values, the method further comprises the step S144 of: deleting the symbols and data representing the hole depth, the counter bore and the maximum entity requirement in the original standard parameter table, adding the symbols representing the length information, and in S33: after fitting the corresponding profile features and measuring, the length information is symbolized with increased length information.
In step 31, according to an embodiment of the present invention, the criteria for distinguishing the contour shape according to the roundness and the rectangularity of the subpixel contours are: the shape of the roundness of the sub-pixel outline [0.7,1.0] is circular, the shape of the rectangle of the sub-pixel outline [0.8,0.9] is groove-shaped, and the shape of the rectangle of the sub-pixel outline [0.92,0.99] is round rectangle.
According to an embodiment of the present invention, in step S33, a method for fitting and measuring corresponding profile features includes:
Sequentially fitting the shapes of the circular outlines of the sub-pixels with the roundness of [0.7,1.0] into circles according to the sequence of the circular outlines in the step S32, and recording the circle center coordinates and the radius of the circles to obtain the measurement result of the circular holes;
According to the sequence of the groove profile in the step S32, sequentially fitting the shape with the sub-pixel profile rectangle degree of [0.8,0.9] into a groove shape, wherein the groove shape hole consists of a rectangle and two semi-circles, fitting the groove shape profile into a circle and a straight line to obtain circle center and radius parameters, obtaining the minimum external rectangle of the groove shape, further obtaining the overall length of the groove shape, and obtaining the measurement result of the groove shape hole;
and (3) according to the sorting of the rounded rectangle in the step S32, sequentially fitting the shape with the sub-pixel outline rectangle degree of [0.92,0.99] into the rounded rectangle to obtain the minimum circumscribed rectangle of the rounded rectangle, and obtaining the length and the width of the rounded rectangle to obtain the measurement result of the rounded rectangular hole.
According to one embodiment of the invention, before measuring the profile, the operator logs in to the operating system and creates an empty folder for the product to be tested, which folder is used as a place for storing the stored templates, standard parameter files and their parameter measurement result files, in which folder the standard parameter files created in step S1 and the measurement result data files in step S5 are stored.
According to an embodiment of the present invention, in step S2: after logging into the operating system, there are: s21: template operation, S22: connection camera, S23: three options for measurement are performed;
If templates are stored in the folder, the user may select S22: connecting camera options, acquiring images by the industrial camera, sending acquired pictures to a computer, judging the type of a workpiece by the computer according to the acquired pictures, reading templates from the folders after judging successfully, matching the templates with the images, selecting an S23 option and entering a step S3;
If the folder does not store templates, after the user logs in the operating system, S21 is selected: and (3) template operation, namely opening a template operation interface, connecting a camera to acquire a picture, creating a template by using the acquired picture, storing the created template in the folder, returning to a system interface, and entering an S22 option.
According to one embodiment of the invention, the method for creating the template by using the acquired picture comprises the following steps: the operator draws an angled rectangle in the image frame by using the image acquired by the industrial camera, selects the image area and the angle to be created into the template to form the template, and then saves the template into the folder so as to be used as the template to compare the subsequent images acquired by the option S22, thereby judging the type of the workpiece.
According to an embodiment of the present invention, in step S4, the method for comparing the actual value of the measurement result with the standard value in the standard parameter file is as follows: and fitting the workpiece with an angled rectangle to obtain a virtual intersection point of two lines at the left upper corner of the workpiece, recording the relative positions of each detection feature and the intersection point, and comparing and judging according to the size data of which the relative positions of the standard parameter files are consistent with the measured relative positions.
According to an embodiment of the present invention, in step S5: when the measurement result data is stored, the measurement result data file outputs an Excel form and a PDF file for storage.
Compared with the prior art, the method for measuring the slot hole size of the sheet metal workpiece has the following advantages:
according to the method for measuring the slot hole size of the sheet metal workpiece, disclosed by the invention, the characteristic to be measured is determined without manual interaction operation on the images, the complicated operation that the images are selected by a mouse and fitted into the characteristics when the number of the measured characteristics of the workpiece is large is overcome, and whether the measured result is in the precision range or not can be judged by only comparing the measured result with standard data, so that the measuring efficiency of the product can be effectively improved.
Drawings
FIG. 1 is a schematic diagram of a PRT.1 file;
FIG. 2 is a profile map;
FIG. 3 is a schematic view of relative position pointing;
FIG. 4 is a case of creating a template file;
FIG. 5 is a schematic view of PDF file export;
FIG. 6 is an Excel file export schematic;
FIG. 7 is a flow chart of a method for measuring slot dimensions of a sheet metal workpiece;
Fig. 8 is a software flow diagram of a vision measurement system.
The implementation and advantages of the functions of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
Various embodiments of the invention are disclosed in the following drawings, in which details of the practice are set forth in the following description for the purpose of clarity. However, it should be understood that these practical details are not to be taken as limiting the invention. That is, in some embodiments of the invention, these practical details are unnecessary. Moreover, for the purpose of simplifying the drawings, some conventional structures and components are shown in the drawings in a simplified schematic manner.
It should be noted that all directional indicators (such as up, down, left and right, front and rear … …) in the embodiments of the present invention are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicators are correspondingly changed.
In addition, the descriptions of the "first," "second," and the like, herein are for descriptive purposes only and are not intended to be specifically construed as order or sequence, nor are they intended to limit the invention solely for distinguishing between components or operations described in the same technical term, but are not to be construed as indicating or implying any relative importance or order of such features. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
For a further understanding of the nature, features, and efficacy of the present invention, the following examples are set forth in order to provide a further understanding of the invention, and are intended to be described in connection with the accompanying drawings:
In order to overcome the defects of the prior art, the invention provides a method for measuring the slot hole size of a sheet metal workpiece, which can not only measure the sizes of various types of slot holes of the sheet metal workpiece by carrying out measurement after modeling treatment, but also measure different sheet metal workpieces by creating a template.
Before describing the invention, a visual inspection system supporting the measuring method of the invention is described, and the functions of the measuring system include real-time acquisition of workpiece images, processing of workpiece images, real-time measurement of workpiece dimensions and display of a result interface. The measuring system mainly comprises two aspects of a hardware part and a software part, wherein the hardware part mainly comprises a light source, a camera, an objective table and an upper computer, the software part mainly comprises an image processing algorithm and an interactive interface design, the software system is based on a Windows11, 64-bit operating system, and the image processing and the measurement are realized by combining Halcon and C# programming so as to realize a multi-type sheet metal workpiece vision measuring system. The system software part is mainly based on a visual studio2022 platform, a WinForm framework design interface in C# language and a Halcon visual library are used for developing high-precision measurement software, and an SQLite database is used for managing account data and the like of the system. When making a size measurement, the resolution of the camera and the size of the picture both have an impact on the accuracy of the measurement. In case the required measurement accuracy is known, the minimum resolution required by the camera can be calculated by the equationIs calculated where ε is the directional system accuracy, L is the field of view directional length, and N is the number of directional pixels. For the measuring system provided by the invention, the precision requirement is 0.1mm, and the visual field width is 320mm, so that the minimum requirement can be met by at least 3200 pixels in a single direction. In production practice, in consideration of factors such as pixel errors and system stability, a camera with a resolution of 3-4 times or more than the minimum requirement is generally selected. The measuring system does not need to measure a moving object, and has low frame rate requirement, so that a global shutter or a rolling shutter camera can be selected; because the measurement system is a parameter measurement system, a black-and-white camera can be used. In summary, the invention selects the MV-CH500-90TM-F-NF CMOS global shutter black-white industrial camera of the sea-Kangwei company, the resolution is 7008 x 7000, and the frame rate is 15.5 fps; in order to reduce the influence of parallax and lens distortion on imaging quality, the invention selects the XF-10MDT 01090436X 120DSS-D-L90 double telecentric lens with the magnification of 0.109, the distortion rate of less than 0.066%, the working distance of 120mm and the visual field range of 110mm. For the light source type selection, a strip light source, a ring light source, a backlight source, a coaxial light source and the like can be generally selected. Compared with other light sources, the backlight source has the advantages of improving contrast, eliminating shadows, enhancing edge characteristics and the like, so that the measuring system adopts the backlight source as the light source of the measuring system.
Based on the measuring system, the invention discloses a measuring method for the slot hole size of a sheet metal workpiece, which comprises the following steps:
s1: establishing a standard parameter file:
S11: the PRT.1 file of Pro/ENGINEER is transferred to a DWG file;
S12: reserving size table information of the DWG file and exporting the size table information into a CSV file;
s13: converting the CSV file into an Excel file to obtain an original standard parameter table;
S14: and sequencing the outlines in the original standard parameter table to obtain a standard parameter file.
The method for sequencing the outlines in the original standard parameter table comprises the following steps:
S141: recording the total number, the minimum rank value and the maximum rank value of the outlines to be detected: the row values are the basis for distinguishing which row the contours to be ordered start, and the column values are the basis for distinguishing which contours start;
s142: determining the rows and columns of all outlines; if a contour spans at least two adjacent rows longitudinally, the contour belongs to the row in which the maximum row value falls;
S143: the contours of the same type are orderly ordered and numbered according to the rank value: among the similar contours, the contour with the smallest row and column value is the first contour, the contour with the smallest column value is the first contour of the row, and the contour with the largest column value is the last contour of the row;
The method of ordering contours in the original standard parameter table will be described in detail below in one embodiment:
Referring to fig. 2, as shown in fig. 2, the rectangular box is the outline to be sorted, and the number is the result after sorting. The method for reordering the contours to be detected will be described in detail below by taking the image in fig. 2 as an example: as shown in fig. 2, the contours in the picture are three rows and three columns from top to bottom and from left to right, the contour of the first column of the first row is the first contour and is also the first contour of the first row, and when sweeping the picture from top to bottom with one horizontal line, contour 1 is detected, at least one horizontal line B passes through contour 4 and contour 2 simultaneously, in this row, contour 1 is the beginning of the first row, contour 2 belongs to the first row, and contour 4 longitudinally spans the first row and the second row; here it is necessary to determine whether the contour 4 belongs to the first line or the second line, wherein the picture is scanned pixel by pixel from top to bottom with a horizontal line, the line value corresponding to the line is marked as the minimum line value of the rectangle when touching the rectangle, and the line value of the line is marked as the maximum line value of the rectangle when leaving the rectangle. Line a is the minimum line value of the profile 4, line D is the maximum line value of the profile 4, line C is the minimum line value of the profile 3, and since the minimum line value of the profile 3 is greater than the minimum line value of the profile 4 and smaller than the maximum line value of the profile 4, the maximum line value of the profile 4 is smaller than the maximum line value of the profile 3, so that it is determined that the profile 4 belongs to the second line, in which line the column value of the profile 3 is smaller than the column value of the profile 4 and the column value of the profile 4 is smaller than the column value of the profile 5, so that the profile 3 is the start of the second line; similarly, contour 6 is available as the beginning of the third row; after the starting contour of each row is obtained, judging the sequence numbers of other contours in the same row, wherein in the first row, the column value of the contour 2 is larger than that of the contour 1, and the contour is named as the contour 2; in the second row, it has been determined above that contour 4 is the ordered contour of the second row and its column value is greater than contour 3, so it is designated contour 4, and contour 5 has a column value greater than contour 4, so it is designated contour 5; similarly, the ordering of the contours 6, 7 can be obtained, and the contours to be detected can be reordered in the above manner.
S144: deleting the symbols and data representing the hole depth, the counter bore and the maximum entity requirement in the original standard parameter table, adding the symbols representing the length information, and in S33: fitting out the corresponding outline characteristics, measuring, and representing the length information by using an increased length information symbol;
After sorting and numbering, part of the parameter names and standard values need to be manually modified. Because n is a diameter symbol, x is a hole depth symbol, v is a counter bore symbol, and M is a maximum physical requirement in the GDT font, and because the vision measurement system in the invention is a 2D vision measurement system, depth information such as hole depth cannot be measured, the parameters x, M and v need to be manually removed, and the specific parameters of the groove are marked on a workpiece design drawing instead of a parameter table, the parameters of the groove need to be manually added into a table, wherein the length information of the groove is not expressed by letters in original parameters, and the invention adopts the combination of letter l and actual standard parameter values to express the standard value and be added into a standard parameter file.
S2: logging in an operating system to collect images;
the operating system is provided with an administrator interface and an operator interface, the main functions of the administrator interface are adding, deleting, modifying the authority of an administrator and the like for an internal account, the main functions of the operator interface are connecting with a camera, picking up pictures, displaying, measuring, creating templates, comparing data information, saving, deriving and the like, and the operator interface is logged when the contour to be detected is measured;
Before measuring the profile, the operator logs in to the operating system and creates an empty folder for the product to be tested, which serves as a location for storing the stored templates, standard parameter files and their parameter measurement result files, in which the standard parameter files created in step S1 and the measurement result data files in step S5 are stored.
When the measurement is carried out, in order to acquire the placing angle of the workpiece and standard parameter file information, a template is required to be created for the workpiece in advance so as to acquire the workpiece angle, matching condition and other information later; the created templates are stored in the created folders.
After logging in the operating system from the operator interface there is: s21: template operation, S22: connection camera, S23: three options for measurement are performed.
If templates are stored in the folder, the user may select S22: the camera option is connected, the industrial camera collects images and sends the collected images to the computer, the computer judges the type of the workpiece according to the collected images, the computer reads templates from the folder after judging successfully, the images are subjected to template matching, and then the step S23 option is selected and the step S3 is carried out.
If the folder does not store templates, after the user logs in the operating system, S21 is selected: and (3) template operation, namely opening a template operation interface, connecting a camera to acquire pictures, creating templates by using the acquired pictures, storing the created templates in the folders, returning to a system interface, and entering an S22 option.
Referring to fig. 4, the method for creating the template by using the acquired picture includes: the operator draws an angled rectangle in the image frame by using the image acquired by the industrial camera, selects the image area and the angle to be created into the template to form the template, and then saves the template into the folder so as to be used as the template to compare the subsequent images acquired by the option S22, thereby judging the type of the workpiece.
S3: measuring the contour to be detected in the acquired image:
S31: distinguishing the outline shape according to the roundness and the rectangularity of the sub-pixel outline;
The criteria for distinguishing the outline shape according to the roundness and the rectangularity of the subpixel outline are as follows: the shape of the roundness of the sub-pixel outline is in a circular shape, the shape of the rectangle of the sub-pixel outline is in a groove shape, and the shape of the rectangle of the sub-pixel outline is in a rounded rectangle;
S32: reordering the screened profiles of the same type: re-ordering and numbering the same types of contours by adopting the same method as the method for ordering contours in the original standard parameter table in the step S14;
s33: fitting out the corresponding contour features and measuring.
The method for fitting out the corresponding contour features and measuring comprises the following steps:
Sequentially fitting the shapes of the circular outlines of the sub-pixels with the roundness of [0.7,1.0] into circles according to the sequence of the circular outlines in the step S32, and recording the circle center coordinates and the radius of the circles to obtain the measurement result of the circular holes;
According to the sequence of the groove profile in the step S32, sequentially fitting the shape with the sub-pixel profile rectangle degree of [0.8,0.9] into a groove shape, wherein the groove shape hole consists of a rectangle and two semi-circles, fitting the groove shape profile into a circle and a straight line to obtain circle center and radius parameters, obtaining the minimum external rectangle of the groove shape, further obtaining the overall length of the groove shape, and obtaining the measurement result of the groove shape hole;
Sequentially fitting the shapes with the sub-pixel outline rectangularity of [0.92,0.99] into rounded rectangles according to the sorting of the rounded rectangles in the step S32 to obtain the minimum circumscribed rectangle of the rounded rectangles, and obtaining the length and the width of the rounded rectangles to obtain the measurement result of the rounded rectangular holes;
s4: comparing the actual value of the measurement result with the standard value in the standard parameter file: if the tolerance value is smaller than the tolerance value, outputting OK; otherwise output "NG".
The method for comparing the actual value of the measurement result with the standard value in the standard parameter file comprises the following steps: and fitting the workpiece with an angled rectangle to obtain a virtual intersection point of two lines at the left upper corner of the workpiece, recording the relative positions of each detection feature and the intersection point, and comparing and judging according to the size data of which the relative positions of the standard parameter files are consistent with the measured relative positions.
When the measurement results are compared with the standard parameter files, the result numbers after the measurement results are ordered are not necessarily the same as the standard parameter files, so that the measurement results need to be reordered. When the measuring system measures the diameter parameters of the workpiece, the position information is also recorded so as to be compared with the standard parameters. Because the standard parameter file location information is provided as a relative location with the upper left corner of the workpiece as the origin of the workpiece rather than the origin of the image. According to the invention, the workpiece is fitted by using an angled rectangle, then the virtual intersection point of the two edges closest to the origin is solved, and the relative positions of each detection feature and the intersection point are recorded. As shown in fig. 3, when assigning a value to a circular hole, the relative position of the center of the circle and the intersection point is used, the relative position of the center of the upper circular arc and the intersection point is used for a groove hole, and the relative position of the midpoint of the upper edge and the intersection point is used for a rounded rectangular hole as position information.
After obtaining the relative position parameter information in the standard parameter and the measurement result, the measurement system compares the standard parameter with the relative position parameter information in the measurement result one by one, and when the original position of the workpiece detection feature (a circular hole, a groove-shaped hole and a round rectangular hole) relative to the workpiece is the same as that of the standard parameter file, the standard value in the standard parameter file is written into a column of the standard value to be filled in the measurement result; the actual measured value is filled in a column of the actual value; performing difference operation on the standard value and the actual value to obtain an absolute value, outputting OK in a column of the measurement result to be filled if the absolute value is smaller than the tolerance, otherwise outputting NG;
S5: and (5) saving measurement result data: when the measurement result data is stored, the measurement result data file outputs an Excel form and a PDF file for storage. The measuring method of the slot hole size of the sheet metal workpiece is convenient for manual recording and reference, and PDF and Excel file formats are derived. The PDF file can avoid the problem of messy font codes and inconsistent formats of different devices; excel files facilitate manual pair statistics.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, or alternatives falling within the spirit and principles of the invention.

Claims (10)

1. The method for measuring the slot hole size of the sheet metal workpiece is characterized by comprising the following steps of:
s1: establishing a standard parameter file:
S11: the PRT.1 file of Pro/ENGINEER is transferred to a DWG file;
S12: reserving size table information of the DWG file and exporting the size table information into a CSV file;
s13: converting the CSV file into an Excel file to obtain an original standard parameter table;
s14: sequencing the outlines in the original standard parameter table to obtain a standard parameter file;
The method for sequencing the outlines in the original standard parameter table comprises the following steps:
S141: recording the total number, the minimum rank value and the maximum rank value of the outlines to be detected: the row values are the basis for distinguishing which row the contours to be ordered start, and the column values are the basis for distinguishing which contours start;
S142: determining the rows and columns of all outlines;
S143: the contours of the same type are orderly ordered and numbered according to the rank value: among the similar contours, the contour with the smallest row and column value is the first contour, the contour with the smallest column value is the first contour of the row, and the contour with the largest column value is the last contour of the row;
S2: logging in an operating system to collect images;
S3: measuring the contour to be detected in the acquired image:
S31: distinguishing the outline shape according to the roundness and the rectangularity of the sub-pixel outline;
S32: reordering the screened profiles of the same type: re-ordering and numbering the same types of contours by adopting the same method as the method for ordering contours in the original standard parameter table in the step S14;
S33: fitting out corresponding contour features and measuring;
S4: comparing the actual value of the measurement result with the standard value in the standard parameter file: if the tolerance value is smaller than the tolerance value, outputting OK; otherwise, outputting 'NG';
S5: and saving the measurement result data.
2. The method according to claim 1, wherein in step S142, if one contour spans at least two adjacent rows longitudinally, the contour belongs to the row in which the maximum row value falls.
3. The method for measuring the slot size of a sheet metal workpiece according to claim 1, wherein in step S143: after the contours of the same type are sequentially ordered and numbered according to the rank values, the method further comprises the step S144 of: deleting the symbols and data representing the hole depth, the counter bore and the maximum entity requirement in the original standard parameter table, adding the symbols representing the length information, and in S33: after fitting the corresponding profile features and measuring, the length information is symbolized with increased length information.
4. The method according to claim 1, wherein in step 31, the criterion for distinguishing the contour shape according to the roundness and the rectangle degree of the subpixel contour is: the shape of the roundness of the sub-pixel outline [0.7,1.0] is circular, the shape of the rectangle of the sub-pixel outline [0.8,0.9] is groove-shaped, and the shape of the rectangle of the sub-pixel outline [0.92,0.99] is round rectangle.
5. The method for measuring slot dimensions of sheet metal workpieces according to claim 4, wherein in step S33, the method for fitting and measuring the corresponding profile features comprises:
Sequentially fitting the shapes of the circular outlines of the sub-pixels with the roundness of [0.7,1.0] into circles according to the sequence of the circular outlines in the step S32, and recording the circle center coordinates and the radius of the circles to obtain the measurement result of the circular holes;
According to the sequence of the groove profile in the step S32, sequentially fitting the shape with the sub-pixel profile rectangle degree of [0.8,0.9] into a groove shape, wherein the groove shape hole consists of a rectangle and two semi-circles, fitting the groove shape profile into a circle and a straight line to obtain circle center and radius parameters, obtaining the minimum external rectangle of the groove shape, further obtaining the overall length of the groove shape, and obtaining the measurement result of the groove shape hole;
and (3) according to the sorting of the rounded rectangle in the step S32, sequentially fitting the shape with the sub-pixel outline rectangle degree of [0.92,0.99] into the rounded rectangle to obtain the minimum circumscribed rectangle of the rounded rectangle, and obtaining the length and the width of the rounded rectangle to obtain the measurement result of the rounded rectangular hole.
6. The method according to claim 1, wherein before measuring the contour, an operator logs in to an operating system and creates an empty folder for the product to be tested, which is used as a place for storing the saved templates, standard parameter files and parameter measurement result files thereof, and the standard parameter files created in step S1 and the measurement result data files in step S5 are stored in the folder.
7. The method for measuring the slot size of a sheet metal workpiece according to claim 6, wherein in step S2: after logging into the operating system, there are: s21: template operation, S22: connection camera, S23: three options for measurement are performed;
If templates are stored in the folder, the user may select S22: connecting camera options, acquiring images by the industrial camera, sending acquired pictures to a computer, judging the type of a workpiece by the computer according to the acquired pictures, reading templates from the folders after judging successfully, matching the templates with the images, selecting an S23 option and entering a step S3;
If the folder does not store templates, after the user logs in the operating system, S21 is selected: and (3) template operation, namely opening a template operation interface, connecting a camera to acquire a picture, creating a template by using the acquired picture, storing the created template in the folder, returning to a system interface, and entering an S22 option.
8. The method for measuring the slot size of a sheet metal workpiece according to claim 7, wherein the method for creating the template by using the acquired picture is as follows: the operator draws an angled rectangle in the image frame by using the image acquired by the industrial camera, selects the image area and the angle to be created into the template to form the template, and then saves the template into the folder so as to be used as the template to compare the subsequent images acquired by the option S22, thereby judging the type of the workpiece.
9. The method for measuring the slot size of the sheet metal workpiece according to claim 1, wherein in the step S4, the method for comparing the actual value of the measurement result with the standard value in the standard parameter file is as follows: and fitting the workpiece with an angled rectangle to obtain a virtual intersection point of two lines at the left upper corner of the workpiece, recording the relative positions of each detection feature and the intersection point, and comparing and judging according to the size data of which the relative positions of the standard parameter files are consistent with the measured relative positions.
10. The method for measuring the slot size of a sheet metal workpiece according to claim 1, wherein in step S5: when the measurement result data is stored, the measurement result data file outputs an Excel form and a PDF file for storage.
CN202410765779.XA 2024-06-14 2024-06-14 Method for measuring slot hole size of sheet metal workpiece Active CN118328897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410765779.XA CN118328897B (en) 2024-06-14 2024-06-14 Method for measuring slot hole size of sheet metal workpiece

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410765779.XA CN118328897B (en) 2024-06-14 2024-06-14 Method for measuring slot hole size of sheet metal workpiece

Publications (2)

Publication Number Publication Date
CN118328897A CN118328897A (en) 2024-07-12
CN118328897B true CN118328897B (en) 2024-08-09

Family

ID=91769748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410765779.XA Active CN118328897B (en) 2024-06-14 2024-06-14 Method for measuring slot hole size of sheet metal workpiece

Country Status (1)

Country Link
CN (1) CN118328897B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114972825A (en) * 2022-07-19 2022-08-30 天津七一二移动通信有限公司 Method for realizing automatic detection of MMI key icon matrix
CN116630266A (en) * 2023-05-23 2023-08-22 无锡市锡山区半导体先进制造创新中心 Ellipse detection method, computing equipment and storage medium for workpiece inner hole profile

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07117394B2 (en) * 1992-08-19 1995-12-18 エフセル・インターナショナル協同組合 Sheet metal processing inspection device
JP3923657B2 (en) * 1998-06-15 2007-06-06 大日本印刷株式会社 Diameter measurement method for circular holes
CN117537706A (en) * 2023-09-28 2024-02-09 三峡大学 Sheet metal hole positioning size detection method based on three-axis coordinate conversion and monocular vision fusion
CN117333458A (en) * 2023-10-10 2024-01-02 杭州深度视觉科技有限公司 Method and system for detecting irregular workpieces with holes based on contour difference

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114972825A (en) * 2022-07-19 2022-08-30 天津七一二移动通信有限公司 Method for realizing automatic detection of MMI key icon matrix
CN116630266A (en) * 2023-05-23 2023-08-22 无锡市锡山区半导体先进制造创新中心 Ellipse detection method, computing equipment and storage medium for workpiece inner hole profile

Also Published As

Publication number Publication date
CN118328897A (en) 2024-07-12

Similar Documents

Publication Publication Date Title
CN107609557B (en) Pointer instrument reading identification method
KR100785594B1 (en) Image process apparatus
CN104697476B (en) Roughness light cuts the automatic testing method and device of contour curve
US8428335B2 (en) Combining feature boundaries
CN106017313B (en) Edge detection deviation correction value calculation method, edge detection deviation correction method and device
CN109948135B (en) Method and equipment for normalizing image based on form characteristics
US7649545B2 (en) Inspection system and method
CN112381765A (en) Equipment detection method, device, equipment and storage medium based on artificial intelligence
CN116433584A (en) Surface defect detection method, system and storage medium for strip-shaped polishing template
CN118328897B (en) Method for measuring slot hole size of sheet metal workpiece
CN109148433B (en) Method and apparatus for determining dimensions of an integrated circuit device
JP4788475B2 (en) Image processing apparatus and image processing method
KR100602594B1 (en) System and method for recalculating analysis report of 3d scan data
CN108827197A (en) A kind of linear array industry CT homogeneous material dimension measurement method for reducing edge degradation and influencing
CN117537706A (en) Sheet metal hole positioning size detection method based on three-axis coordinate conversion and monocular vision fusion
CN117346652A (en) Device and method for detecting size of reinforced concrete unit element in real time based on machine vision
CN116880353A (en) Machine tool setting method based on two-point gap
CN115018735A (en) Fracture width identification method and system for correcting two-dimensional code image based on Hough transform
CN109084721B (en) Method and apparatus for determining a topographical parameter of a target structure in a semiconductor device
CN115511807A (en) Method and device for determining position and depth of groove
CN112184790B (en) Object size high-precision measurement method based on depth camera
CN110108209A (en) The measurement method and system of small-sized porous part
CN117308821B (en) Building decoration modeling precision inspection method and system based on scanner
CN118640796A (en) Dimension measuring method and related equipment
CN115984396A (en) Automatic cargo drawing generation method based on 3D structured light depth camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant