Intelligent measurement method and measurement system for size of industrial part
By obtaining real-time images of industrial parts and calculating their dimensions in combination with part categories and reference heights, the problem of large errors in existing machine vision methods when measuring curved parts is solved, achieving higher accuracy and stability measurement effects.
Patent Information
- Application Number
- CN202411825777.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing machine vision methods have the problem of large measurement errors when measuring industrial parts with curved surfaces.
By obtaining a real-time image of the part to be tested, determining its front and top views, extracting the part profile, and calculating the length, width and height of the part in combination with the part category and reference height, achieving higher precision dimensional measurements.
It realizes higher precision dimensional measurement of industrial parts with curved surfaces, reduces measurement errors, and improves measurement efficiency and stability.
Smart Images

Figure CN119540218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of part size measurement, and in particular to an industrial part size intelligent measurement method and a measurement system. Background Art
[0002] With the rapid development of manufacturing technology, the dimensional accuracy requirements of industrial parts are getting higher and higher, and the dimensional measurement of industrial parts is a key step to ensure product quality and process accuracy. In traditional part dimensional measurement methods, it is usually dependent on manual measurement, such as using mechanical tools such as vernier calipers, micrometers and measuring instruments. However, when using mechanical tools for measurement, the traditional manual measurement method will inevitably cause the mechanical tools to touch the surface of industrial parts. If the operation is improper, it is easy to scratch the surface of industrial parts. At the same time, the manual measurement method requires a lot of time and energy from the measurement personnel, and the labor cost is too high. In addition, the manual measurement operation process is very cumbersome and time-consuming, and the efficiency is low when measuring in large quantities, which is difficult to meet the needs of automated production. In addition, manual measurement may also cause human errors, affecting the stability and consistency of the measurement results. In order to improve measurement efficiency and measurement stability, etc., a camera will be used to capture the image of the part, and then a machine vision method will be used to calculate the size of the industrial part. However, the existing machine vision method does not consider the situation where the part has a curved surface, so there is a problem of large measurement errors when measuring industrial parts with curved surfaces. Summary of the invention
[0003] The present invention provides an intelligent industrial part size measurement method and a measurement system to solve the problem of large measurement errors when measuring industrial parts with curved surfaces using existing machine vision methods.
[0004] In order to achieve the above object, the present invention is implemented by the following technical solutions: In a first aspect, the present invention provides an industrial parts dimension intelligent measurement method, comprising: Acquire a real-time image of the part to be measured, and determine a front view and a top view of the part to be measured based on the real-time image; Determine the part category of the part to be measured based on the front view and the top view, determine a front view region of interest in the front view, and determine a top view region of interest in the top view; Extracting the front view part contour based on the front view region of interest, and extracting the top view part contour based on the top view region of interest; Calculate the part height and reference height of the part to be measured according to the front view part outline and the part category, and calculate the part length and part width of the part to be measured by combining the top view part outline with the part category and the reference height; The part height, the part length and the part width are used as the size information of the part to be measured.
[0005] Optionally, determining the front view and the top view of the part to be measured based on the real-time image includes: Selecting a front view image taken at a front angle of view from the real-time image, and determining a front view center point of the part to be measured in the front view image; Based on the front view center point, the front view image is intercepted so that the position of the center point of the intercepted image corresponds to the position of the front view center point, and the intercepted image is used as the front view of the part to be measured; Selecting a top-view image taken at a top-down angle from the real-time image, and determining a top-down center point of the part to be measured in the top-view image; The top view image is intercepted based on the top view center point so that the position of the center point of the intercepted image corresponds to the position of the top view center point, and the intercepted image is used as the top view of the part to be measured.
[0006] Optionally, the extracting of the front view part contour based on the front view region of interest, and the extracting of the top view part contour based on the top view region of interest, comprises: Performing contour extraction on the front view region of interest to obtain all candidate contours in the front view, and calculating the areas of all candidate contours obtained from the front view and the area of the front view region of interest; Comparing the area of the candidate contour obtained in the front view with the area of the front view region of interest in sequence to obtain the duty ratio corresponding to the candidate contour of the front view, and comparing the duty ratio with a specified threshold value, if the duty ratio is less than the specified threshold value, the candidate contour is a non-part contour, and the candidate contour is deleted until the duty ratio obtained by comparing the area of the candidate contour obtained in the front view with the area of the front view region of interest is greater than or equal to the specified threshold value, and the candidate contour at this time is used as the front view part contour; Performing contour extraction on the region of interest of the top view to obtain all candidate contours in the top view, and calculating the areas of all candidate contours obtained from the top view and the area of the region of interest of the top view; The area of the candidate contour obtained in the top view is compared with the area of the region of interest of the top view in sequence to obtain the duty cycle corresponding to the candidate contour of the top view, and the duty cycle is compared with a specified threshold value. If the duty cycle is less than the specified threshold value, the candidate contour is a non-part contour, and the candidate contour is deleted until the duty cycle obtained by comparing the area of the candidate contour obtained in the top view with the area of the region of interest of the top view is found to be greater than or equal to the specified threshold value. At this time, the candidate contour is used as the part contour of the top view.
[0007] Optionally, the extracting of the front view part contour based on the front view region of interest, and the extracting of the top view part contour based on the top view region of interest, further includes: Selecting a corresponding preset front view shape and a preset top view shape based on the part category; The front view part contour and the top view part contour are respectively adjusted according to the preset front view shape and the preset top view shape to obtain an adjusted front view part contour and an adjusted top view part contour, and the adjusted front view part contour is used as the front view part contour of the part to be measured, and the adjusted top view part contour is used as the top view part contour of the part to be measured.
[0008] Optionally, the method further includes: Scaling the preset front view shape to the same pixel length as the front view part outline; Mapping the preset front view shape to the front view so that the preset front view shape coincides with the front view part contour; Traversing the points on the front view part contour in sequence, using KD-tree to calculate the shortest distance from the point to the preset front view shape, if the shortest distance is greater than a specified threshold, deleting the point from the front view contour, and obtaining the adjusted front view part contour after traversing; The points on the top view part contour are traversed in sequence, and the shortest distance from the point to the preset top view shape is calculated using KD-tree. If the shortest distance is greater than a specified threshold, the point is deleted from the top view contour. After traversal, the adjusted top view part contour is obtained.
[0009] Optionally, the calculating the part height and the reference height of the part to be measured according to the part contour of the front view and the part category includes: The front view part contour is processed to calculate the pixel width of the part to be measured at different heights, and the corresponding reference height calculation method is selected according to the part category to calculate the reference height of the part to be measured and the pixel value of the part height.
[0010] The reference height of the part and the real physical value of the part height are calculated based on the parameters obtained when the system is initialized.
[0011] Optionally, the calculating the part length and the part width of the part to be measured by combining the top view part outline with the part category and the reference height includes: Processing the top view part contour to obtain pixel values corresponding to the length and width of the part to be measured; The real physical values of the length and width of the part are calculated based on the parameters obtained when the system is initialized and the reference height.
[0012] In a second aspect, an embodiment of the present application provides an industrial parts dimension intelligent measurement system, comprising: System initialization module, used to calibrate the camera, adjust the camera posture, calculate the distance from the camera to the reference surface, and calculate system parameters; An image acquisition module, used to obtain a front view and a top view of the part to be tested acquired by a camera; The image preprocessing module is used to identify the part category according to the trained convolutional neural network model, determine the position of the part in the camera image, assist in adjusting the placement of the part, and process the part prediction frame identified by the convolutional neural network model to obtain the front view area of interest and the top view area of interest; The contour extraction module is used to extract the contours from the front view region of interest and the top view region of interest obtained by the image preprocessing module, and filter out the contours that are not part contours according to the duty cycle to obtain the part contours in the front view and the top view; The height processing module is used to process the part outline of the front view of the part to be tested, select the appropriate reference height calculation scheme according to the part category, and calculate the height of the part and the real physical value of the reference height in combination with the system parameters obtained when the system is initialized; The length and width calculation module is used to process the part contour of the top view of the part to be tested. According to the reference height obtained by the height processing module and the system parameters obtained when the system is initialized, the real physical values of the length and width of the part are calculated.
[0013] Beneficial effects: The intelligent industrial part size measurement method provided by the present invention can achieve higher-precision size measurement of some parts with curved surfaces, including measurement indicators such as length, width, and height, by introducing the concept of reference height; and a convolutional neural network model is added in the size measurement process to assist the contour extraction algorithm, which can not only filter non-part contours and reduce noise interference, but also identify the category of parts, thereby flexibly expanding the types of measurable parts of the system according to the part category; at the same time, the threshold in the contour screening algorithm uses a percentage instead of the previous fixed area value, which can achieve contour screening of parts of different sizes, and has stronger robustness and versatility.
[0014] It is further worth mentioning that after contour screening, the present invention also provides a contour adjustment algorithm to eliminate the influence of ambient light and uneven surface of parts on the recognition of part contour shape, so that the adjusted contour fits the edge of the part more closely, thereby allowing the system to have a higher anti-interference ability; in addition, the industrial part size intelligent measurement system provided by the present invention does not require the purchase of expensive professional equipment, but can use everyday cameras, so it is easy to deploy and promote. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic flow chart of the method for measuring part dimensions provided by the present invention; Figure 2 It is a structural schematic diagram of an image acquisition module of a part size measuring device provided by the present invention; Figure 3 It is a structural schematic diagram of the part size measuring device provided by the present invention; Figure 4 It is a checkerboard calibration plate used in the calibration process of the present invention; Figure 5 It is a structural diagram of an industrial part with a curved surface that can be measured by the present invention, wherein (a) is a three-dimensional structural diagram of the industrial part, (b) is a front view of the industrial part, and (c) is a top view of the industrial part; In the figure, 1. vertical camera; 2. horizontal camera; 3. retractable rod; 4. desktop reference line; 5. reference object for calibration. DETAILED DESCRIPTION
[0016] The technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the usual meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate quantity restrictions, but indicate the existence of at least one. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.
[0018] See also Figure 1-2 , 5, such as Figure 1 As shown, the embodiment of the present application provides an intelligent measurement method for industrial part size, and the part size measurement method at least includes the following steps: S100, two cameras capture images in real time, move the parts to a specific position according to the captured images, and collect the front view and top view of the parts to be tested.
[0019] Place the part flat on the table so that the lower surface of the part is parallel to the table. Input the image captured by the vertical camera into the trained convolutional neural network model to identify the category of the part, locate the part, and obtain the position of the object in the image. Move the center point of the part to the center point of the vertical camera according to the prompts in the camera image to obtain a top view of the part. Align the front surface of the part with the reference line 4 and make it perpendicular to the desktop, input the picture captured by the horizontal camera into the trained convolutional neural network model, locate the part, and obtain the position of the object in the picture. Adjust the telescopic rod 3 and move the position of the part on the reference line 4 at the same time. According to the prompts in the picture, move the part to the center point of the horizontal camera's picture to obtain the front view of the part.
[0020] S200, input the collected front view and top view into the trained convolutional neural network model, identify the part category and locate the position of the part in the image, and obtain the region of interest in the front view and top view respectively.
[0021] Input the regions of interest of the front view and top view obtained in the previous steps into the pre-trained Yolo model to identify the category of the part and the prediction box of the part in the picture. The center position of the obtained prediction box remains unchanged, and the length and width are expanded to 1.15 times; According to the enlarged part prediction frame, the front view and the top view are respectively intercepted to obtain the regions of interest of the front view and the top view.
[0022] S300, extracting contours of the regions of interest in the front view and the top view, filtering out non-part contours according to the duty cycle, and obtaining part contours in the front view and the top view; Perform grayscale processing and Gaussian filtering on the area of interest of the front view of the part, then extract edge points based on the Canny operator, then perform dilation and erosion operations on the edge points, and finally use Opencv's findContours function to find the object contour from the edge point image; Due to the influence of factors such as lighting and object material, some non-part contours may be identified in the picture. However, since the region of interest is captured in the previous steps, the area occupancy ratio of the non-part contour in the region of interest cannot be greater than 50%. The identified object contours are screened according to the area occupancy ratio, and the contours with an area occupancy ratio of less than 50% are deleted to obtain the part contours in the front view and top view.
[0023] S400, respectively adjusting the front view part contour and the top view part contour to obtain the adjusted front view part contour and the top view part contour; Due to the influence of factors such as lighting and part surface flatness, the identified part contour may not be very consistent with the actual shape of the part, and may be greatly distorted. However, if we know the approximate contour of the part in advance, we can make slight adjustments to the identified part contour toward that shape. This will not affect the size of the identified contour, and will also make the identified part contour shape more consistent with the actual shape of the part.
[0024] First, according to the identified part category, select the corresponding front view preset shape contour and top view preset shape contour of the part.
[0025] Calculate the pixel length of the identified front view part contour, scale the front view preset contour as a whole to be equal to its pixel length and map it to the front view, ensuring that the front view preset contour coincides with the center of the identified front view part contour.
[0026] Traverse each point on the identified front view part contour, use the KDtree algorithm to calculate the shortest distance from each point to the preset front view contour, and determine whether the distance is greater than the tolerable threshold. If it is greater than the threshold, delete the point from the identified front view contour. After the traversal is completed, the adjusted front view part contour is obtained.
[0027] Calculate the pixel length of the identified top view part contour, scale the top view preset contour as a whole to be equal to its pixel length and map it to the top view, ensuring that the top view preset contour coincides with the center of the identified top view part contour.
[0028] Traverse each point on the identified top view part contour, use the KDtree algorithm to calculate the shortest distance from each point to the preset top view contour, and determine whether the distance is greater than the tolerable threshold. If it is greater than the threshold, delete the point from the identified top view contour. After the traversal is completed, the adjusted top view part contour is obtained.
[0029] S500, processing the part contour of the front view to obtain the pixel width of the part at different heights, selecting the corresponding reference height calculation method according to the part category identified in the previous step, and calculating the real physical value of the part height and the reference height.
[0030] First, we need to have a parts database, which stores the part categories and the height, reference height, and length and width calculation methods corresponding to the part categories. When new parts need to be tested, we only need to expand the database. Process the contour in the front view of the part and use the minAreaRect function of the opencv library to obtain the minimum rectangle that can include the contour. The pixel height of the rectangle is also the pixel height of the part, denoted as H p ; From the bottom of the part outline, follow a certain step length (such as 3 pixels) to obtain the pixel width of the part at different heights. According to the part type determined in the previous step, select the corresponding reference height calculation method from the part database. The judgment standard for the part reference height mentioned in this example is the height with the largest pixel width. Therefore, after traversing the pixel widths of different heights according to this standard, the pixel value of the reference height of the part can be obtained, which is recorded as H. 1p ; Furthermore, according to the plane system parameter P2 along the reference line 4 perpendicular to the desktop obtained when the system is initialized, according to the formula The actual physical values of the part height and reference height are calculated and recorded as H r and H 1r ; S600. According to the identified part category, a corresponding length and width calculation method is selected to process the part outline in the top view, and the real physical values of the length and width of the part are calculated in combination with the reference height calculated in the above steps.
[0031] Process the outline of the part in the top view, and use the minAreaRect function of the opencv library to obtain the minimum rectangle that can include the outline of the part. The length and width of the rectangle represent the pixel length and pixel width of the part, which are recorded as L and p and W p ; Select the corresponding length and width calculation method in the parts database according to the type of part. For example, the length and width calculation method of the part mentioned in this example is to use the reference height as the plane height of the part top view contour for calculation. According to the formula and Calculate the real physical value L of the length and width of the object r and W r .
[0032] See also Figure 2-4 ,like Figure 3 As shown, the embodiment of the present application provides an industrial parts size intelligent system, including: System initialization module 210: used to calibrate the camera, adjust the camera posture, calculate the distance from the camera to the reference surface, and calculate some system parameters; Image acquisition module 220: used to obtain the front view and top view of the part to be tested acquired by the camera; Image preprocessing module 230: used to identify the part category according to the trained convolutional neural network model, determine the position of the part in the camera image, assist in adjusting the position of the part, identify the part prediction frame according to the convolutional neural network model and process it to obtain the region of interest in the front view and the top view; Contour extraction module 240: used to extract contours from the region of interest obtained by the image preprocessing module, and filter out non-part contours according to the duty cycle to obtain the contours of the part in the front view and the top view; Height processing module 250: used to process the outline in the front view of the part, select a suitable reference height calculation scheme according to the part category, and calculate the height of the part and the real physical value of the reference height in combination with the system parameters obtained when the system is initialized; Length and width calculation module 260: used to process the outline of the part in the top view, and calculate the real physical value of the length and width of the part based on the reference height obtained by the height processing module and the system parameters obtained when the system is initialized.
[0033] The system initialization module calibrates the camera, adjusts the camera posture, and calculates the distance from the camera to the reference surface, including: Place the chessboard calibration board horizontally on the desktop, fix the vertical camera chessboard vertical calibration board, input the vertical camera picture into the image preprocessing module, calibrate the camera according to Zhang Zhengyou calibration method, calculate the normal vector size of the camera relative to the chessboard plane, if it is less than the specified threshold, it is considered that the vertical camera is perpendicular to the desktop, otherwise continue to adjust the posture of the vertical camera until the vertical camera is perpendicular to the desktop, and the vertical camera posture calibration is completed. The chessboard calibration board is as follows Figure 4 shown.
[0034] Next, place the chessboard calibration board vertically on the table along reference line 4, place the horizontal camera vertically on the chessboard calibration board, input the picture of the horizontal camera into the image preprocessing module, calibrate the camera according to Zhang Zhengyou calibration method, calculate the size of the normal vector of the camera relative to the chessboard plane, if it is less than the specified threshold, it is considered that the horizontal camera is parallel to the table, otherwise continue to adjust the posture of the horizontal camera until the horizontal camera is parallel to the table, and the horizontal camera posture calibration is completed.
[0035] Figure 2 The middle reference object 5 is composed of two upper and lower cubes, the side length of the lower cube is 4 cm, and the side length of the upper cube is 2 cm.
[0036] Next, place the reference object 5 vertically on the tabletop so that the lower surface of the reference object 5 is parallel to the tabletop, observe the image in the vertical camera, and move the center of the reference object 5 to the center of the vertical camera image according to the prompt. The pixel side lengths of the upper and lower cubes in the image are processed and calculated respectively, and the ratio of the pixel side lengths of the upper and lower cubes is obtained, which is recorded as K1. Assuming that the distance from the vertical camera to the tabletop is D1, the formula can be obtained according to the perspective principle of the camera: , further deduced that The distance D1 from the vertical camera to the desktop is calculated according to the formula.
[0037] Assume that the product of the real physical value represented by each pixel on the desktop plane and its distance to the camera is P1, and the side length pixel value of the upper plane of the upper cube in the vertical camera is L1. According to the perspective principle of the camera, the parameters of the vertical camera can be obtained: .
[0038] Next, place the bottom of reference object 5 horizontally on the table along reference line 4, so that the lower surface of reference object 5 is perpendicular to the table and intersects with reference line 4. Observe the picture in the horizontal camera and move the center of reference object 5 to the center of the horizontal camera picture according to the prompt. Calculate the pixel side lengths of the upper cube and the lower cube in the picture respectively, and get the ratio of the pixel side lengths, which is recorded as K2. Assuming the distance from the horizontal camera to the table is D2, the formula can be obtained , further deduced that The distance D2 from the horizontal camera to the plane perpendicular to the desktop along the reference line 4 is calculated according to the formula.
[0039] Suppose the product of the real physical value represented by each pixel point on the plane perpendicular to the desktop along the reference line 4 and its distance to the camera is P2, and the side length pixel value of the upper plane of the upper cube in the vertical camera is L2. According to the perspective principle of the camera, the parameters of the horizontal camera can be obtained. .
[0040] The system is initialized and the distance D1 from the vertical camera to the desktop, the distance D2 from the horizontal camera to the plane perpendicular to the desktop along the reference line 4, the system parameter P1 on the desktop plane and the system parameter P2 on the plane perpendicular to the desktop along the reference line 4 are obtained.
[0041] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. An intelligent measurement method for industrial parts size, characterized in that: include: Acquire a real-time image of the part to be measured, and determine a front view and a top view of the part to be measured based on the real-time image; Determine the part category of the part to be measured based on the front view and the top view, determine a front view region of interest in the front view, and determine a top view region of interest in the top view; Extracting the front view part contour based on the front view region of interest, and extracting the top view part contour based on the top view region of interest; Calculate the part height and reference height of the part to be measured according to the front view part outline and the part category, and calculate the part length and part width of the part to be measured by combining the top view part outline with the part category and the reference height; The part height, the part length and the part width are used as the size information of the part to be measured.
2. The intelligent measurement method for industrial parts size according to claim 1 is characterized in that: Determining the front view and the top view of the part to be measured based on the real-time image includes: Selecting a front view image taken at a front angle of view from the real-time image, and determining a front view center point of the part to be measured in the front view image; Based on the front view center point, the front view image is intercepted so that the position of the center point of the intercepted image corresponds to the position of the front view center point, and the intercepted image is used as the front view of the part to be measured; Selecting a top-view image taken at a top-down angle from the real-time image, and determining a top-down center point of the part to be measured in the top-view image; The top view image is intercepted based on the top view center point so that the position of the center point of the intercepted image corresponds to the position of the top view center point, and the intercepted image is used as the top view of the part to be measured.
3. The intelligent measurement method for industrial parts size according to claim 1 is characterized in that: The extracting of the front view part contour based on the front view region of interest, and the extracting of the top view part contour based on the top view region of interest, comprises: Performing contour extraction on the front view region of interest to obtain all candidate contours in the front view, and calculating the areas of all candidate contours obtained from the front view and the area of the front view region of interest; Comparing the area of the candidate contour obtained in the front view with the area of the front view region of interest in sequence to obtain a first duty cycle corresponding to the candidate contour of the front view, and comparing the first duty cycle with a specified threshold value. If the first duty cycle is less than the specified threshold value, the candidate contour is a non-part contour, and the candidate contour is deleted until the first duty cycle obtained by comparing the area of the candidate contour obtained in the front view with the area of the front view region of interest is found to be greater than or equal to the specified threshold value, and the candidate contour at this time is used as the front view part contour; Performing contour extraction on the region of interest of the top view to obtain all candidate contours in the top view, and calculating the areas of all candidate contours obtained from the top view and the area of the region of interest of the top view; The areas of the candidate contours obtained in the top view are compared with the areas of the regions of interest of the top view in sequence to obtain a second duty cycle corresponding to the candidate contours of the top view, and the second duty cycle is compared with a specified threshold value. If the second duty cycle is less than the specified threshold value, the candidate contour is a non-part contour, and the candidate contour is deleted until a second duty cycle obtained by comparing the areas of the candidate contours obtained in the top view with the areas of interest of the top view is found to be greater than or equal to the specified threshold value, and the candidate contour at this time is used as the part contour of the top view.
4. The intelligent measurement method for industrial parts size according to claim 3 is characterized in that: The extracting of the front view part contour based on the front view region of interest, and the extracting of the top view part contour based on the top view region of interest, further comprises: Selecting a corresponding preset front view shape and a preset top view shape based on the part category; The front view part contour and the top view part contour are respectively adjusted according to the preset front view shape and the preset top view shape to obtain an adjusted front view part contour and an adjusted top view part contour, and the adjusted front view part contour is used as the front view part contour of the part to be measured, and the adjusted top view part contour is used as the top view part contour of the part to be measured.
5. The intelligent measurement method for industrial parts size according to claim 4 is characterized in that: The method further comprises: Scaling the preset front view shape to the same pixel length as the front view part outline; Mapping the preset front view shape to the front view so that the preset front view shape coincides with the front view part contour; Traversing the points on the front view part contour in sequence, using KD-tree to calculate the shortest distance from the point to the preset front view shape, if the shortest distance is greater than a specified threshold, deleting the point from the front view contour, and obtaining the adjusted front view part contour after traversing; The points on the top view part contour are traversed in sequence, and the shortest distance from the point to the preset top view shape is calculated using KD-tree. If the shortest distance is greater than a specified threshold, the point is deleted from the top view contour. After traversal, the adjusted top view part contour is obtained.
6. The intelligent measurement method for industrial parts size according to claim 1 is characterized in that: The step of calculating the part height and the reference height of the part to be measured according to the part contour of the front view and the part category comprises: The front view part contour is processed to calculate the pixel width of the part to be measured at different heights, and the corresponding reference height calculation method is selected according to the part category to calculate the reference height of the part to be measured and the pixel value of the part height. The reference height of the part and the real physical value of the part height are calculated based on the parameters obtained when the system is initialized.
7. The intelligent measurement method for industrial parts size according to claim 1 is characterized in that: The step of calculating the part length and the part width of the part to be measured by combining the top view part outline with the part category and the reference height comprises: Processing the top view part contour to obtain pixel values corresponding to the length and width of the part to be measured; The real physical values of the length and width of the part are calculated based on the parameters obtained when the system is initialized and the reference height.
8. An intelligent measurement system for industrial parts dimensions, characterized in that: include: System initialization module, used to calibrate the camera, adjust the camera posture, calculate the distance from the camera to the reference surface, and calculate system parameters; An image acquisition module, used to obtain a front view and a top view of the part to be tested acquired by a camera; The image preprocessing module is used to identify the part category according to the trained convolutional neural network model, determine the position of the part in the camera image, assist in adjusting the placement of the part, and process the part prediction frame identified by the convolutional neural network model to obtain the front view area of interest and the top view area of interest; A contour extraction module is used to extract contours from the front view region of interest and the top view region of interest obtained by the image preprocessing module, and to filter out contours that are not part contours according to the duty cycle, so as to obtain the part contours in the front view and the part contours in the top view; The height processing module is used to process the part outline of the front view of the part to be tested, select the appropriate reference height calculation scheme according to the part category, and calculate the height of the part and the real physical value of the reference height in combination with the system parameters obtained when the system is initialized; The length and width calculation module is used to process the part contour of the top view of the part to be tested. According to the reference height obtained by the height processing module and the system parameters obtained when the system is initialized, the real physical values of the length and width of the part are calculated.
Citation Information
Patent Citations
Imaging measurement method for size of shaft-type small part
CN111047588A
Precision hole part geometrical characteristic detection method and system based on machine vision
CN111862037A
Part detection device based on machine vision
CN112782184A
Workpiece size measurement method and system based on machine vision
CN114791265A
Part size high-precision measurement method based on machine vision
CN115096206A