Stacked steel plate counting method and system based on machine vision
Based on machine vision -based stacking steel plate counting methods, using line array cameras and light source scanning steel plate end -surface images, combined with gray and texture characteristics for image processing, to achieve accurate counting of irregular shapes on the edge of the steel plate, solving the counting count in existing technology Problems with insufficient accuracy and stability.
Patent Information
- Application Number
- CN202411374948.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art There are problems in the counting of stacked steel plates with high reflection problems in the imaging of steel plate end surfaces and irregular shapes of steel plate edges leading to insufficient counting accuracy and stability.
Adopt a stacking steel plate counting method based on machine vision, scan the steel plate surface image from the bottom to top through the line array camera and light sources, combined with gray and texture characteristics to locate the steel plate area, formed, enhanced and edge detection, and use Fourier analysis to analyze the analysis of Fourier analysis The peak detection algorithm implements accurate counting.
Effectively solve the problem of high reflection and edge of steel plates, and improve the efficiency, accuracy and stability of steel plate counting.
Smart Images

Figure CN119379615A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of machine vision and instrumentation, and in particular to a method and system for counting stacked steel plates based on machine vision. Background Art
[0002] Thin metal sheets, such as cold-rolled steel sheets and galvanized steel sheets, are widely used in the automotive and home appliance industries. The thickness of a single steel sheet is in the range of 0.5 to 2.3 mm. After the steel sheet is cut or punched and broken into shape, it is stacked, stored and packaged. Although the steel sheet punching or cutting equipment has a counting function, in cases such as specification switching and the rejection of defective steel sheets due to unqualified quality inspection, there is a problem that the number of stacked steel sheets is inconsistent with the number recorded by the cutting and punching equipment. Therefore, additional counting is required before the steel sheets are packaged.
[0003] At present, the commonly used methods for measuring the number of stacked steel plates at home and abroad are: manual counting and photoelectric signal counting. Manual counting includes direct counting method, which is inefficient and prone to errors due to subjective factors; another method is weighing or height measurement, which has high requirements on the thickness and gap uniformity of the steel plate, otherwise the counting error will be large. Photoelectric signal counting includes ultrasonic detection method, which is limited by the penetration ability of sound waves and the measurement range; another method is visual imaging measurement, which is easily affected by the high reflection of the end face of the steel plate and the irregular edges formed during the stamping and cutting process of the steel plate, and the counting accuracy and stability need to be further improved. Summary of the invention
[0004] In order to overcome the deficiencies in the above-mentioned prior art, the purpose of the present invention is to provide a stacked steel plate counting method and system based on machine vision, which can solve the current problem of high reflection of steel plate end surface imaging, adapt to the irregular shape of the steel plate edge, and realize accurate and stable steel plate counting.
[0005] The technical solution adopted by the present invention is as follows:
[0006] The stacked steel plate counting method based on machine vision includes the following steps:
[0007] S1: Side image acquisition of stacked steel plates: The linear array camera and light source scan from bottom to top to obtain a complete end face image of the steel plate;
[0008] S2: Steel plate area interception: After collecting the steel plate image, the upper and lower boundaries of the steel plate area are located using the grayscale and texture features of the steel plate image, and the steel plate area is intercepted to reduce the interference of the background environment on subsequent counting;
[0009] S3: Steel plate image processing: denoising, contrast enhancement, and upper and lower edge detection of the steel plate area image;
[0010] S4: Steel plate counting: The steel plate edge image is projected along the edge direction. The projection result shows a periodic waveform, and the peak position is the candidate position of the steel plate edge. The projection result is analyzed by Fourier to obtain the approximate thickness of the steel plate, and then the thickness information is integrated into the peak detection algorithm to achieve accurate counting of steel plates.
[0011] In a further embodiment, step S1 comprises the following steps:
[0012] S11: Set the appropriate scanning frequency of the linear array camera according to the encoding pulse frequency to ensure that a single steel plate covers more than 10 pixels;
[0013] S12: setting the expected grayscale value of the steel plate area and obtaining the optimal exposure value through the adaptive exposure algorithm;
[0014] S13: The linear array camera scans and forms an image from bottom to top. After the camera reaches the highest point, it resets and returns to the starting point.
[0015] In a further embodiment, step S2 includes the following steps:
[0016] S21: Calculate the image grayscale derivative from the top and bottom of the image respectively to obtain the candidate positions of the top and bottom of the steel plate area. The calculation method is as follows:
[0017] The top gradient calculation formula is Gt(i) = I(i,j) - I(i+1,j)
[0018] The bottom gradient calculation formula is Gd(rows-i)=I(rows-i,j)-I(rows-i-1,j)
[0019] Where I(i,j) represents the grayscale value of the image at the i-th and j-th columns, and rows is the total number of rows in the image;
[0020] If Gt or Gd is greater than a certain threshold, it is a candidate position for the top and bottom of the steel plate area.
[0021] S22: In order to suppress the interference of background foreign objects, the repetitive texture characteristics of the steel plate stack are used. The candidate position obtained in the previous step is used as the starting point to detect whether there are more than N consecutive candidate points with similar spacing. If so, this candidate position is judged as the real steel plate boundary. Otherwise, the identification is repeated from the next candidate point until the real boundary is found.
[0022] In a further embodiment, step S3 comprises the following steps:
[0023] S31: Use Gaussian filter to denoise the steel plate image and filter out the burr and speckle noise of the steel plate;
[0024] S32: Use the local contrast enhancement method to increase the contrast between the steel plate and the gap area and enhance the edge of the steel plate;
[0025] S33: Use edge operators to detect the upper and lower edges of the steel plate respectively, and select edges with better edge quality based on the edge detection results.
[0026] Upper edge detection operator:
[0027] Lower edge detection operator:
[0028] After threshold processing is performed on the edge detection results, they are projected along the edge direction and statistically analyzed. The specific analysis method is: summing the peak-valley differences, and the edge result corresponding to the larger sum is used for the subsequent counting step.
[0029] In a further embodiment, step S4 comprises the following steps:
[0030] S41: Accumulate and project the edge image along the edge direction, perform Fourier analysis on the projection result, locate the frequency at the highest frequency spectrum energy, and thus calculate the approximate thickness of the steel plate;
[0031] S42: Perform peak detection on the projection results to obtain candidate points of the steel plate edge, and then integrate the steel plate thickness information to eliminate candidate points whose adjacent candidate points have a distance less than a first preset value, and perform interpolation operations on adjacent candidate points whose distance is greater than a second preset value. After the above detection and correction operations, the accurate number of steel plates and their edge coordinate positions can be obtained.
[0032] Another technical solution of the present invention is: a stacked steel plate counting system based on machine vision, based on the above-mentioned stacked steel plate counting method based on machine vision, including an imaging module and a data processing control module, wherein the imaging module is used to collect the end surface image of the stacked steel plate, and the data processing control module receives the image data transmitted by the imaging module, performs image processing and outputs the result.
[0033] A further solution also includes a power module, a transmission module, and a human-computer interaction module. The power module provides power for the equipment; the transmission module drives the imaging module to scan and reset from bottom to top; the human-computer interaction module is used for user input operations and result visualization display output, as well as counting result verification and confirmation operations.
[0034] A further solution further includes a mobile platform, which at least carries the imaging module and the transmission module.
[0035] In a further solution, the imaging module is used for scanning and imaging the end faces of stacked steel plates, and the imaging module includes a camera, a light source and a polarizer.
[0036] In a further scheme, the imaging module, transmission module, human-computer interaction module are electrically connected to the data processing control module, and are controlled and information processed by the data processing control module; the data processing control module sends the start counting command received by the human-computer interaction module to the imaging module, drives the transmission module to drive the imaging module to scan and collect images, and the data processing control module processes the graphics and displays the counting results on the human-computer interaction interface.
[0037] The beneficial effects of the present invention are:
[0038] Compared with the existing steel plate counting scheme based on visual methods, the present invention eliminates the problem of local overexposure of the image caused by the high reflection of the steel plate through the coordinated use of light source and polarizer pair. At the same time, through mutual detection and verification of the upper and lower edges of the steel plate, it can adapt to the irregular situation of the steel plate edge, thereby improving the efficiency, accuracy and stability of steel plate counting.
[0039] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 It is a structural schematic diagram of a stacked steel plate counting system provided in an embodiment of the present invention.
[0042] Figure 2 The schematic diagram of the stacked steel plate counting system according to the embodiment of the present invention is shown in FIG.
[0043] Reference numerals: imaging module 1, linear array camera 1.1, light source 1.2, transmission module 2, data processing and control module 3, industrial computer 3.1, mobile platform 4, stacked steel plate 5, human-computer interaction module 6, power supply module 7. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0045] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0046] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0047] This embodiment provides a method and system for counting stacked steel plates based on machine vision, which solves the current problem of high reflectivity in steel plate end surface imaging, can adapt to the irregular shape of the steel plate edge, and accurately and stably realize steel plate counting.
[0048] The stacked steel plate counting method based on machine vision provided in this embodiment comprises the following steps:
[0049] Step S1: Acquisition of side image of stacked steel plates: Use the lead screw transmission mechanism to drive the linear array camera and light source to scan from bottom to top to obtain a complete end face image of the steel plate. The specific steps are as follows:
[0050] S11: Set the appropriate scanning frequency of the linear array camera according to the encoding pulse frequency to ensure that a single steel plate covers more than 10 pixels;
[0051] S12: setting the expected grayscale value of the steel plate area and obtaining the optimal exposure value through the adaptive exposure algorithm;
[0052] S13: Start the motor and drive the lead screw to complete the scanning imaging of the linear array camera from bottom to top. After the camera reaches the highest point, the limit switch is triggered, and the motor is automatically driven to reverse, so that the camera and light source are reset to the starting point;
[0053] Step S2: Steel plate area interception: After the steel plate image is collected, the upper and lower boundaries of the steel plate area are located using the grayscale and texture features of the steel plate image, and the steel plate area is intercepted to reduce the interference of the background environment on subsequent counting. The specific steps are as follows:
[0054] S21: Calculate the image grayscale derivative from the top and bottom of the image respectively to obtain the candidate positions of the top and bottom of the steel plate area. The calculation method is as follows:
[0055] The top gradient calculation formula is: Gt(i) = I(i,j) - I(i+1,j)
[0056] The bottom gradient calculation formula is: Gd(rows-i)=I(rows-i,j)-I(rows-i-1,j) where I(i,j) represents the image grayscale value at the i-th and j-th columns, and rows is the total number of rows in the image;
[0057] If Gt or Gd is greater than a certain threshold, it is the candidate position of the top and bottom of the steel plate area;
[0058] S22: In order to suppress the interference of background foreign matter, the repeated texture characteristics of the stacked steel plates are used, and the candidate position obtained in the previous step is used as the starting point to detect whether there are more than N consecutive candidate points with similar spacing. If so, this candidate position is judged as the real steel plate boundary, otherwise, the next candidate point is repeatedly identified until the real boundary is found; the value of N is determined according to the actual application scenario, and in this embodiment, N is set to 10;
[0059] Step S3: steel plate image processing: denoising, contrast enhancement, and upper and lower edge detection of the steel plate area image. The specific steps are as follows:
[0060] S31: Use Gaussian filter to denoise the steel plate image and filter out the burr and speckle noise of the steel plate;
[0061] S32: Use the local contrast enhancement method to increase the contrast between the steel plate and the gap area and enhance the edge of the steel plate;
[0062] S33: Use edge operators to detect the upper and lower edges of the steel plate respectively, and select edges with better edge quality based on the edge detection results.
[0063] Upper edge detection operator:
[0064] Lower edge detection operator:
[0065] After threshold processing is performed on the edge detection results, they are projected along the edge direction and statistically analyzed. The specific analysis method is: summing the peak-valley differences, and the edge result corresponding to the larger sum is used for the subsequent counting step;
[0066] Step S4: Steel plate counting: The steel plate edge image is projected along the edge direction. The projection result shows a periodic waveform, and the peak position is the candidate position of the steel plate edge. In order to improve the counting accuracy and robustness, the projection result is used to obtain the approximate thickness of the steel plate using Fourier analysis, and then the thickness information is integrated into the peak detection algorithm to achieve accurate counting of the steel plates. The specific steps are as follows:
[0067] S41: Accumulate and project the edge image along the edge direction, perform Fourier analysis on the projection result, locate the frequency at the highest frequency spectrum energy, and thus calculate the approximate thickness of the steel plate;
[0068] S42: Perform peak detection on the projection results to obtain candidate points of the steel plate edge, and then integrate the steel plate thickness information to eliminate candidate points whose adjacent candidate points have a distance less than a first preset value, and perform interpolation operations on adjacent candidate points whose distance is greater than a second preset value. After the above detection and correction operations, the accurate number of steel plates and their edge coordinate positions can be obtained; the first preset value and the second preset value are determined according to the actual application scenario. In this embodiment, the first preset value is 0.8 times the thickness of the steel plate, and the second preset value is 1.8 times the thickness of the steel plate.
[0069] like Figure 1 , Figure 2 As shown, this embodiment also provides a stacked steel plate counting system based on machine vision, based on the above-mentioned stacked steel plate counting method based on machine vision, including 5 modules, namely imaging module 1, data processing control module 3, power module 7, transmission module 2, and human-computer interaction module 6. The imaging module is used to collect the end face image of the stacked steel plate; the data processing control module is used to process human-computer interaction, motor control, image processing and other operations. In one embodiment, the data processing control module adopts an industrial computer 3.1; the power module provides power for the equipment; the transmission module can adopt a variety of reciprocating transmission structures. In this embodiment, a screw transmission module is used to drive the imaging module to scan and return from bottom to top; the human-computer interaction module is used for user input operation and result visualization display output, as well as counting result verification and confirmation operation.
[0070] In this embodiment, the imaging module is used for scanning and imaging the end faces of the stacked steel plates. The imaging module comprises a linear array camera 1.1 (including a lens), a light source 1.2 and a polarizing film. The use of the polarizing film can effectively eliminate high reflections.
[0071] In this embodiment, the human-computer interaction module is used for user operation, information input, device information reading and visual display of counting results, which can be achieved through the display: user operation is to start the counting operation; information input is the steel plate model information; device information reading is historical data browsing; the visual display of counting results is the number of steel plates and the result graph display of marking the steel plate edges and recording the number on the original steel plate image, and at the same time, the user result confirmation operation is provided.
[0072] In this embodiment, the data processing control module is used for the control and information processing of the imaging module, the screw transmission module, and the human-computer interaction module. The data processing control module sends the start counting command received by the human-computer interaction module to the imaging module, drives the screw transmission module to drive the camera and the light source to scan and collect images, and after the scanning is completed, the obtained image is displayed on the human-computer interaction interface; after the counting operation is completed, the data processing control module displays the counting result on the human-computer interaction interface.
[0073] In order to facilitate moving to the vicinity of each stacked steel plate 5, this embodiment integrates part or all of the above-mentioned imaging module, data processing control module, power supply module, transmission module, and human-computer interaction module into the mobile platform 4. In one embodiment, the imaging module and the data processing control module are integrated on the mobile platform. In another embodiment, the above five modules are all integrated on the mobile platform. In one embodiment, the mobile platform is a portable trolley.
[0074] The stacked steel plate counting system uses a linear array camera to scan and obtain a complete and clear end face image of the stacked steel plates. It also proposes a method for denoising and enhancing steel plate images and mutual verification of upper and lower edge detection. It combines Fourier spectrum analysis to obtain the thickness of the steel plates. Finally, the thickness information is integrated into the peak detection algorithm to mark the edge position of the steel plates and count the number of steel plates.
[0075] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A stacked steel plate counting method based on machine vision, characterized in that: The following steps are involved: S1: Side image acquisition of stacked steel plates: The linear array camera and light source scan from bottom to top to obtain a complete end face image of the steel plate; S2: Steel plate area interception: After collecting the steel plate image, the upper and lower boundaries of the steel plate area are located using the grayscale and texture features of the steel plate image, and the steel plate area is intercepted to reduce the interference of the background environment on subsequent counting; S3: Steel plate image processing: denoising, contrast enhancement, and upper and lower edge detection of the steel plate area image; S4: Steel plate counting: The steel plate edge image is projected along the edge direction. The projection result shows a periodic waveform, and the peak position is the candidate position of the steel plate edge. The projection result is analyzed by Fourier to obtain the approximate thickness of the steel plate, and then the thickness information is integrated into the peak detection algorithm to achieve accurate counting of steel plates.
2. The method for counting stacked steel plates based on machine vision according to claim 1, characterized in that: The step S1 comprises the following steps: S11: Set the appropriate scanning frequency of the linear array camera according to the encoding pulse frequency to ensure that a single steel plate covers more than 10 pixels; S12: setting the expected grayscale value of the steel plate area and obtaining the optimal exposure value through the adaptive exposure algorithm; S13: The linear array camera scans and forms an image from bottom to top. After the camera reaches the highest point, it resets and returns to the starting point.
3. The stacked steel plate counting method based on machine vision according to claim 1 is characterized in that: The step S2 comprises the following steps: S21: Calculate the image grayscale derivative from the top and bottom of the image respectively to obtain the candidate positions of the top and bottom of the steel plate area. The calculation method is as follows: The top gradient calculation formula is Gt(i) = I(i,j) - I(i+1,j) The bottom gradient calculation formula is Gd(rows-i)=I(rows-i,j)-I(rows-i-1,j) Where I(i,j) represents the grayscale value of the image at the i-th and j-th columns, and rows is the total number of rows in the image; If Gt or Gd is greater than a certain threshold, it is a candidate position for the top and bottom of the steel plate area. S22: In order to suppress the interference of background foreign objects, the repetitive texture characteristics of the steel plate stack are used. The candidate position obtained in the previous step is used as the starting point to detect whether there are more than N consecutive candidate points with similar spacing. If so, this candidate position is judged as the real steel plate boundary. Otherwise, the identification is repeated from the next candidate point until the real boundary is found.
4. The method for counting stacked steel plates based on machine vision according to claim 1, characterized in that: The step S3 comprises the following steps: S31: Use Gaussian filter to denoise the steel plate image and filter out the burr and speckle noise of the steel plate; S32: Use the local contrast enhancement method to increase the contrast between the steel plate and the gap area and enhance the edge of the steel plate; S33: Use edge operators to detect the upper and lower edges of the steel plate respectively, and select edges with better edge quality based on the edge detection results. Upper edge detection operator: Lower edge detection operator: After threshold processing is performed on the edge detection results, they are projected along the edge direction and statistically analyzed. The specific analysis method is: summing the peak-valley differences, and the edge result corresponding to the larger sum is used for the subsequent counting step.
5. The method for counting stacked steel plates based on machine vision according to claim 1, characterized in that: The step S4 comprises the following steps: S41: Accumulate and project the edge image along the edge direction, perform Fourier analysis on the projection result, locate the frequency at the highest frequency spectrum energy, and thus calculate the approximate thickness of the steel plate; S42: Perform peak detection on the projection results to obtain candidate points of the steel plate edge, and then integrate the steel plate thickness information to eliminate candidate points whose adjacent candidate points have a distance less than a first preset value, and perform interpolation operations on adjacent candidate points whose distance is greater than a second preset value. After the above detection and correction operations, the accurate number of steel plates and their edge coordinate positions can be obtained.
6. A stacked steel plate counting system based on machine vision, based on the stacked steel plate counting method based on machine vision according to any one of claims 1 to 5, characterized in that: It includes an imaging module and a data processing control module, wherein the imaging module is used to collect images of the end faces of stacked steel plates, and the data processing control module receives image data transmitted by the imaging module, performs image processing and outputs the results.
7. The stacked steel plate counting system based on machine vision according to claim 6 is characterized in that: It also includes a power module, a transmission module, and a human-computer interaction module. The power module provides power for the equipment; the transmission module drives the imaging module to scan and reset from bottom to top; the human-computer interaction module is used for user input operations and result visualization display output, as well as counting result verification and confirmation operations.
8. The machine vision-based stacked steel plate counting system according to claim 7, characterized in that: It also includes a mobile platform, which at least carries the imaging module and the transmission module.
9. The machine vision-based stacked steel plate counting system according to claim 7, characterized in that: The imaging module is used for scanning and imaging the end faces of stacked steel plates, and the imaging module comprises a camera, a light source and a polarizing plate.
10. The machine vision-based stacked steel plate counting system according to claim 7, characterized in that: The imaging module, transmission module, and human-computer interaction module are electrically connected to the data processing control module, and are controlled and information processed by the data processing control module; the data processing control module sends the start counting command received by the human-computer interaction module to the imaging module, drives the transmission module to drive the imaging module to scan and collect images, and the data processing control module processes the graphics and displays the counting results on the human-computer interaction interface.
Citation Information
Patent Citations
Steel plate counting method based on hough transform
CN101241083A
Plate counting system and method based on machine vision
CN113255869A
Machine vision counting measurement method based on polarization degree distribution
CN114943715A
Vision-based steel plate stacking and counting method and system
CN115471673A
Cited By
Conveyor belt bottle cap counting method and system based on machine vision
CN122510320A