Bar count visual identification automatic calculation system and method

By combining stereo vision and dynamic threshold adjustment with structured light and geometric feature analysis, the problem of inaccurate counting in complex environments by traditional bar counting systems is solved, and high-precision and high-stability automatic calculation of bar counts is achieved, adapting to the automation needs of industrial production.

CN120852303APending Publication Date: 2025-10-28NANJING IRON & STEEL CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510900497.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Traditional bar counting methods rely on manual counting, which is inefficient and easily affected by human factors. Existing visual counting systems have difficulty accurately identifying bar boundaries under complex working conditions and cannot adapt to changes in image quality in different environments, resulting in counting errors and poor system stability.

Method used

A stereo vision acquisition unit is used to acquire three-dimensional point cloud data, and a structured light emitter is used to project coded structured light. The dynamic threshold adjustment unit is used to automatically adjust image segmentation according to environmental parameters. The geometric feature analysis unit is used to determine adhesion and separate rods, and the feature matching and clustering algorithms are used to calculate the number of rods.

Benefits of technology

The accuracy and stability of bar counting are improved, and the bar boundaries can be accurately identified under complex working conditions, adapting to different environmental changes, which significantly improves the reliability and accuracy of counting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852303A_ABST
    Figure CN120852303A_ABST
Patent Text Reader

Abstract

The invention discloses a bar count visual identification automatic calculation system and method, the system comprises a stereo visual acquisition unit, a dynamic threshold adjustment unit, a geometric feature analysis unit, a data processing module and a man-machine interaction unit, and the method comprises the following steps: S01, image acquisition and preprocessing; s02, adjusting an environment self-adaptive threshold value; s03, bar geometric feature extraction; s04, the number of bars is calculated; s05, outputting a result, displaying the bar count obtained by calculation on an interface of a man-machine interaction unit, and storing a counting result and related data in a database at the same time; the beneficial effects of the invention are that a conventional visual counting system usually only depends on two-dimensional image information, recognition errors are easy to occur under the conditions of bar adhesion, surface reflection and the like, the scheme constructs a stereoscopic vision system through an industrial camera to obtain three-dimensional point cloud data, image textures are enhanced in combination with coding structured light projected by a structured light emitter, and the recognition accuracy is improved. And the spatial position and surface depth information can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bar count identification, specifically to an automatic calculation system and method for visual recognition of bar count. Background Technology

[0002] In modern industrial production, bar stock is an important basic material and is widely used in construction, machinery manufacturing, automobiles and other fields. With the continuous improvement of production efficiency and quality requirements, the demand for automated counting in the bar stock production process is becoming increasingly urgent. Traditional bar stock counting methods mainly rely on manual counting, which is not only inefficient, but also easily affected by human factors, leading to counting errors, and is difficult to meet the needs of large-scale, continuous production.

[0003] In recent years, bar counting technology based on visual recognition has gradually become a research hotspot. Traditional visual counting systems typically employ two-dimensional image recognition technology, acquiring images of the bars through a camera and then using image processing algorithms to achieve counting. However, such systems have significant limitations: under complex working conditions such as bar stacking and adhesion, surface reflection, and changes in ambient lighting, two-dimensional images struggle to accurately distinguish bar boundaries, easily leading to missed or incorrect counts. Furthermore, image processing methods with fixed or manually adjusted thresholds cannot adapt to variations in image quality under different production environments, resulting in poor system stability. Moreover, single two-dimensional image information cannot provide spatial location and depth information of the bars, limiting the comprehensive perception of bar morphology. Therefore, developing a high-precision, highly stable, and adaptable visual recognition automatic counting system and method for bar counts is of great significance for improving the level of automation and production efficiency in industrial production. Summary of the Invention

[0004] The purpose of this invention is to solve the problems mentioned above, and therefore, to propose an automatic calculation system and method for visual recognition of bar count.

[0005] The objective of this invention can be achieved through the following technical solution: an automatic calculation system for the visual recognition of bar count, comprising:

[0006] The stereo vision acquisition unit is used to acquire parallax images of the end face of the bar, thereby constructing three-dimensional point cloud data;

[0007] The dynamic threshold adjustment unit is used to acquire real-time monitored ambient light intensity and temperature data, and automatically adjust the image segmentation based on the environmental threshold mapping table;

[0008] The geometric feature analysis unit is used to obtain the outline of the bar in the image, calculate the geometric feature parameters of the bar based on the outline, determine whether the bars are stuck together, and perform preliminary separation processing on the stuck bars.

[0009] The data processing module is used to receive data from stereo vision acquisition, dynamic threshold adjustment unit, and geometric feature analysis unit, and to calculate the number of bars using a counting algorithm based on feature matching and cluster analysis.

[0010] The human-computer interaction unit provides a visual interface to display real-time bar counting results.

[0011] Furthermore, the stereo vision acquisition unit is composed of two industrial cameras, a structured light emitter, and a point cloud module. The two industrial cameras are used to capture images of the bar from different perspectives, the structured light emitter is used to project coded structured light onto the surface of the bar, and the point cloud module is used to construct three-dimensional point cloud data.

[0012] Furthermore, the dynamic threshold adjustment unit includes a light sensor, a temperature sensor, and a threshold adjuster. The light sensor monitors the ambient light intensity in real time, the temperature sensor monitors the temperature data of the production environment, and the threshold adjuster automatically adjusts the image segmentation threshold parameters based on the environmental parameters collected by the sensors and a pre-set environmental threshold mapping table.

[0013] Furthermore, the specific method for constructing the 3D point cloud data is as follows:

[0014] By baseline calibration and stereo calibration, the spatial geometric relationship between the two cameras is established. Baseline calibration determines the distance and relative position between the optical centers of the two cameras, while stereo calibration obtains the intrinsic and extrinsic parameters of the cameras. Based on the principle of triangulation, the transformation relationship between three-dimensional spatial coordinates and two-dimensional image coordinates is established, providing a mathematical model for calculating parallax images.

[0015] After acquiring dual-view images of the bar using an industrial camera, the images are first distorted based on the camera's intrinsic parameters to eliminate errors caused by lens distortion. Then, a stereo matching algorithm is used to find corresponding points in the left and right images. Combining the baseline distance and the camera's intrinsic and extrinsic parameters in the mathematical model, the disparity of the corresponding points is calculated using the triangulation formula. The disparity information of all pixels is integrated to generate a disparity image, which can intuitively reflect the three-dimensional point cloud data of the bar surface.

[0016] Furthermore, the trigonometric distance measurement formula is as follows:

[0017] ;

[0018] in, The distance between the optical centers of the two cameras is the baseline distance, and the camera focal length is... The difference in the x-coordinate of a point between the left and right images is _____. Parallax, the distance from the point to the camera plane is... The formula for calculating disparity can be derived as follows: .

[0019] This invention also provides a method for automatically calculating the number of bars using visual recognition, the method being as follows:

[0020] S01: Image acquisition and preprocessing. The structured light emitter projects coded structured light onto the bar. Two industrial cameras simultaneously acquire images of the bar end face. The acquired images are then preprocessed by grayscale conversion and noise reduction.

[0021] S02: Environmental adaptive threshold adjustment. The light and temperature sensors in the dynamic threshold adjustment unit collect environmental parameters in real time and automatically adjust the threshold of image segmentation according to the environmental threshold mapping table.

[0022] S03: Bar geometry feature extraction. The geometry feature analysis unit performs edge detection on the preprocessed image, obtains geometric feature parameters, and determines whether the bars are stuck together by analyzing the distance and angle relationship between the contours. If there is sticking, a prompt is generated.

[0023] S04: Bar count calculation. The data processing module matches the extracted bar geometric feature parameters with the standard bar feature library. Using the feature clustering algorithm, bars with similar features are clustered into one class, and each class represents one bar, thereby calculating the number of bars.

[0024] S05: Output the results. Display the calculated number of bars on the interface of the human-machine interaction unit, and store the counting results and related data in the database.

[0025] Furthermore, the preliminary separation process of the adhered rods specifically involves:

[0026] First, the connection points and overlapping areas between the adhesive rod profiles are analyzed to determine the specific location of the adhesion. By calculating the number of intersections, the location of the intersections, and the area of ​​the overlapping parts, a topological model of the adhesion area is constructed.

[0027] Based on the topology model, a heuristic algorithm is used to plan the separation path. The narrowest region of the overlapping contour is found as the separation starting point, and the separation path is gradually expanded outward along this region to minimize the damage to the original contour of the bar. During the path planning process, based on the geometric characteristics of the bar, the path that will not damage the integrity of a single bar is selected first.

[0028] Based on the planned separation path, the adhered rods are segmented using an image segmentation algorithm.

[0029] Furthermore, the geometric feature parameters include the bar profile, and the calculation of roundness and the ratio of the major axis to the minor axis.

[0030] Furthermore, the data in the database is organized using a periodic deletion method, and is automatically deleted when the data retention time exceeds a set time.

[0031] Furthermore, the database adds a timestamp when recording the counting results, and users can add explanatory words to the counting results through the database.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] Traditional visual counting systems typically rely solely on two-dimensional image information, which can easily lead to recognition errors in situations such as stick adhesion and surface reflection. This solution constructs a stereo vision system using an industrial camera to acquire three-dimensional point cloud data. Combined with coded structured light projected by a structured light emitter to enhance image texture, it can not only acquire the planar contour information of the stick but also its spatial position and surface depth information. This multi-dimensional information fusion enables the system to more accurately identify the boundaries of the sticks and distinguish between different sticks under complex working conditions, such as stick stacking and adhesion, and surface reflection interference, significantly improving the accuracy and reliability of counting.

[0034] Most visual counting systems on the market currently use fixed thresholds or simple manual threshold adjustment, which are difficult to adapt to changes in lighting, temperature, and other environmental conditions. This solution uses lighting and temperature sensors to collect environmental parameters in real time and utilizes a pre-established environmental threshold mapping table to achieve dynamic adaptive adjustment of image segmentation. This method can automatically optimize image processing parameters according to real-time changes in the environment without manual intervention, ensuring good image segmentation results under different environmental conditions. This, in turn, guarantees the stability and accuracy of bar counting and effectively solves the problem of environmental factors affecting the performance of visual recognition systems. Attached Figure Description

[0035] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0036] Figure 1 This is a diagram illustrating the composition of an automatic calculation system for the number of bars by visual recognition according to the present invention.

[0037] Figure 2 This is a flowchart of an automatic calculation method for the number of bars by visual recognition according to the present invention. Detailed Implementation

[0038] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Please see Figure 1 As shown, a visual recognition automatic calculation system for bar count includes:

[0040] The stereo vision acquisition unit is used to acquire parallax images of the end face of the bar, thereby constructing three-dimensional point cloud data;

[0041] The stereo vision acquisition unit is composed of two industrial cameras, a structured light emitter, and a point cloud module working together.

[0042] Regarding the placement of the industrial cameras and structured light emitters, the two industrial cameras are installed at an angle directly above the bar conveyor line. The determination of the angle needs to consider multiple factors. For example, in scenarios with bar size (diameter < 10mm) and conveyor speed (≤ 0.5m / s), the angle can be set to 30°-45° to ensure sufficient parallax range. When the bar size (diameter > 50mm) and conveyor speed (≥ 2m / s) are used, the angle is expanded to 60°-75°. The structured light emitter adopts the golden triangle positioning method and is installed above the perpendicular bisector of the line connecting the two industrial cameras. The vertical distance from the midpoint of the line connecting the cameras is 1 / 3 of the vertical distance from the industrial camera to the bar conveyor line. This position can ensure that the projected coded structured light uniformly covers the surface of the bar, forming clear feature stripes, and can also avoid occlusion with the shooting angle of the industrial cameras, effectively eliminating imaging blind spots and significantly improving the stability and recognition accuracy of the visual recognition system.

[0043] By baseline calibration and stereo calibration, the spatial geometric relationship between the two cameras is established. Baseline calibration determines the distance and relative position between the optical centers of the two cameras, while stereo calibration obtains the intrinsic parameters (such as focal length and distortion coefficient) and extrinsic parameters (such as rotation and translation matrices) of the cameras. Based on the principle of triangulation, the transformation relationship between three-dimensional spatial coordinates and two-dimensional image coordinates is established, providing a mathematical model for calculating disparity images.

[0044] After acquiring dual-view images of the bar using an industrial camera, the images are first distorted based on the camera's intrinsic parameters to eliminate errors caused by lens distortion. Then, a stereo matching algorithm is used to find corresponding points in the left and right images. Combining the baseline distance and parameters in the mathematical model (camera intrinsic parameters (focal length, distortion coefficient), extrinsic parameters (rotation matrix, translation matrix), the disparity of the corresponding points is calculated using the triangulation formula. Finally, the disparity information of all pixels is integrated to generate a disparity image, which can intuitively reflect the three-dimensional point cloud data of the bar surface.

[0045] The trigonometric distance measurement formula is as follows: ; The distance between the optical centers of the two cameras is the baseline distance, and the camera focal length is... The difference in the x-coordinate of a point between the left and right images is _____. Parallax, the distance from the point to the camera plane is... The formula for calculating disparity can be derived as follows: ;

[0046] In actual calculations, the baseline distance is first obtained through stereo calibration. and Combined with the depth information of spatial points Substituting into the above formula yields the disparity of the corresponding point. Finally, the parallax information of all pixels is integrated to generate a parallax image, which can intuitively reflect the three-dimensional morphology information of the bar surface, providing an accurate data basis for subsequent bar count identification and size measurement.

[0047] The structured light emitter projects coded structured light onto the surface of the rod, forming feature stripes with geometric patterns on the surface of the rod. These stripes are superimposed on the natural texture of the rod surface to enhance the texture contrast of the image. By analyzing the deformation and distribution of the stripes, the 3D point cloud data is further optimized to improve the recognition accuracy of the rod's shape and position information, and effectively avoid recognition errors caused by the smooth surface and uniform texture of the rod.

[0048] The optimization of 3D point cloud data involves extracting the coded stripes formed by structured light from the acquired images. Since the 3D morphology of the bar surface causes deformation of the structured light stripes, the deformation parameters of the stripes, including the curvature and offset, are calculated by comparing the pre-defined stripe shape with the stripe shape in the actual captured image. By statistically analyzing the distribution density and spacing variation of the stripes in different regions, the geometric features of the bar surface are further inferred. For example, areas where the stripe spacing does not exceed a threshold correspond to the protruding parts of the bar surface, while areas where the spacing exceeds the threshold represent depressions. Combining the triangulation principle, these distribution patterns are combined with the parallax information in the dual-view images to correct and supplement the original 3D point cloud data. The depth information and geometric features obtained from the structured light stripe analysis are fused with the 3D point cloud data calculated based on the dual-view images. A weighted average algorithm is used to comprehensively consider the reliability and accuracy of different data sources, and each point in the 3D point cloud data is recalculated and adjusted to improve the recognition accuracy of the bar shape and position information, effectively avoiding recognition errors caused by the smooth surface and uniform texture of the bar.

[0049] Traditional visual counting systems typically rely solely on two-dimensional image information, which can easily lead to recognition errors in situations such as stick adhesion and surface reflection. This solution constructs a stereo vision system using an industrial camera to acquire three-dimensional point cloud data. Combined with coded structured light projected by a structured light emitter to enhance image texture, it can not only acquire the planar contour information of the stick but also its spatial position and surface depth information. This multi-dimensional information fusion enables the system to more accurately identify the boundaries of the sticks and distinguish between different sticks under complex working conditions, such as stick stacking and adhesion, and surface reflection interference, significantly improving the accuracy and reliability of counting.

[0050] A dynamic threshold adjustment unit is used to automatically adjust image segmentation in conjunction with an environmental threshold mapping table;

[0051] This unit includes a light sensor, a temperature sensor, and a threshold regulator. The light sensor monitors the ambient light intensity in real time, and the temperature sensor monitors the temperature data of the production environment. Environmental factors (such as changes in light intensity and temperature fluctuations) can significantly affect image quality, thereby interfering with the segmentation and feature extraction of the bar image by the stereo vision acquisition unit. The threshold regulator automatically adjusts the image segmentation threshold parameters based on the environmental parameters collected by the sensor and a pre-set environmental threshold mapping table. The environmental threshold mapping table is as follows.

[0052]

[0053] For example, when the ambient light intensity drops to 80 Lux, according to the "light intensity < 100 Lux" rule in the table, the threshold regulator will automatically reduce the image segmentation base threshold by 20% to ensure that the edges and contours of the rod can still be accurately identified; when the ambient temperature rises to 45℃, the threshold regulator will compensate for the threshold deviation caused by thermal noise according to the "temperature > 40℃" rule.

[0054] The dynamic threshold adjustment unit plays an auxiliary role in the stereo vision acquisition module. Before constructing 3D point cloud data, it automatically adjusts the image segmentation based on a pre-set environmental threshold mapping table. This mechanism ensures that the stereo vision acquisition module can obtain accurate image segmentation results under different environmental conditions, avoids image quality degradation due to changes in environmental factors, and thus ensures the accuracy and reliability of 3D point cloud data construction, providing a stable data foundation for subsequent bar count identification and size measurement.

[0055] Most visual counting systems on the market currently use fixed thresholds or simple manual threshold adjustment, which are difficult to adapt to changes in lighting, temperature, and other environmental conditions. This solution uses lighting and temperature sensors to collect environmental parameters in real time and utilizes a pre-established environmental threshold mapping table to achieve dynamic adaptive adjustment of image segmentation. This method can automatically optimize image processing parameters according to real-time changes in the environment without manual intervention, ensuring good image segmentation results under different environmental conditions. This, in turn, guarantees the stability and accuracy of bar counting and effectively solves the problem of the impact of environmental factors on the performance of the visual recognition system.

[0056] The geometric feature analysis unit is used to obtain the outline of the bar in the image, calculate the geometric feature parameters of the bar based on the outline, determine whether the bars are stuck together, and perform preliminary separation processing on the stuck bars.

[0057] For the preprocessed bar image, the bar contour is obtained through an edge detection algorithm. Based on the contour, the geometric feature parameters of the bar, such as roundness, ratio of major axis to minor axis, perimeter, and area, are calculated. At the same time, the topological relationship between the contours is used to determine whether the bars are stuck together, and the stuck bars are initially separated.

[0058] First, the connection points and overlapping areas between the adhesive rod contours are analyzed to determine the specific location of the adhesion. By calculating the number of intersections, the location of intersections, and the area of ​​the overlapping parts, a topological model of the adhesive region is constructed. Based on the topological model, a heuristic algorithm is used to plan the separation path, such as finding the narrowest region of the overlapping contours as the starting point for separation, and gradually expanding the separation path outward along this region to minimize damage to the original contours of the rods. During the path planning process, the geometric characteristics of the rods are considered, and paths that will not damage the integrity of individual rods are prioritized. According to the planned separation path, an image segmentation algorithm is used to segment the adhesive rods.

[0059] The data processing module is used to receive image data from the stereo vision acquisition module, environmental parameters and threshold data from the dynamic threshold adjustment unit, and bar feature data from the geometric feature analysis unit, and to calculate the number of bars using a counting algorithm based on feature matching and cluster analysis.

[0060] The human-computer interaction unit provides a visual interface to display real-time bar counting results.

[0061] Please see Figure 2 As shown, the present invention also provides an automatic calculation method for the number of bars by visual recognition, the method comprising:

[0062] Image acquisition and preprocessing: The structured light emitter projects coded structured light onto the bar, and two industrial cameras simultaneously acquire images of the bar end face. The acquired images are then preprocessed by grayscale conversion and noise reduction.

[0063] Environmental adaptive threshold adjustment: The light and temperature sensors in the dynamic threshold adjustment unit collect environmental parameters in real time and automatically adjust the threshold for image segmentation according to the environmental threshold mapping table;

[0064] Bar geometry feature extraction: The geometry feature analysis unit performs edge detection on the preprocessed image to obtain the bar profile, calculates the roundness and major-minor axis ratio geometric feature parameters, and determines whether the bars are stuck by analyzing the distance and angle relationship between the profiles. If sticking is present, a prompt is generated.

[0065] Bar count calculation: The data processing module matches the extracted bar geometric feature parameters with the standard bar feature library, and uses a feature clustering algorithm to cluster bars with similar features into one class, with each class representing one bar, thereby calculating the number of bars.

[0066] Output results: The calculated number of bars is displayed on the interface of the human-computer interaction unit, and the counting results and related data are stored in the database.

[0067] Example 1:

[0068] Taking a steel plant's bar production line as an example, two industrial cameras are installed directly above the bar conveyor line. Since the bar diameter is 20mm and the conveying speed is 1m / s, the included angle of the cameras is set to 45°. The structured light emitter is installed above the perpendicular bisector of the line connecting the two cameras, and the vertical distance from the midpoint of the line connecting the cameras is 1 / 3 of the vertical distance from the industrial camera to the bar conveyor line.

[0069] Baseline calibration and stereo calibration were performed using a calibration board to determine the optical center distance and relative position of the two cameras, and to obtain the camera's intrinsic parameters (focal length, distortion coefficients) and extrinsic parameters (rotation and translation matrices). A mathematical model was then constructed based on the principle of triangulation.

[0070] When the bar enters the acquisition area along the conveyor line, two industrial cameras simultaneously capture end face images. First, the image distortion is corrected according to the camera intrinsic parameters. Then, the corresponding point is found using a stereo matching algorithm. Combining the baseline distance and mathematical model parameters, the disparity is calculated using the triangulation distance formula to generate a disparity image. At the same time, the structured light emitter projects coded structured light. The stripes are extracted using image segmentation and edge detection algorithms. The stripe deformation and distribution are analyzed to optimize the three-dimensional point cloud data.

[0071] The light sensor detects that the ambient light intensity is 80 Lux. The dynamic threshold adjustment unit automatically reduces the image segmentation base threshold by 20% according to the ambient threshold mapping table to ensure accurate identification of the bar edge and contour.

[0072] The geometric feature analysis unit performs edge detection on the preprocessed image to obtain the bar profile, calculates geometric feature parameters, and determines that the bars are not bonded. The data processing and control module matches the extracted geometric feature parameters with the standard bar feature library, calculates the number of bars using a feature clustering algorithm, and displays the results on the human-computer interaction unit interface.

[0073] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A visual recognition automatic calculation system for the number of bar strands, characterized in that, include: The stereo vision acquisition unit is used to acquire parallax images of the end face of the bar, thereby constructing three-dimensional point cloud data; The dynamic threshold adjustment unit is used to acquire real-time monitored ambient light intensity and temperature data, and automatically adjust the image segmentation based on the environmental threshold mapping table; The geometric feature analysis unit is used to obtain the outline of the bar in the image, calculate the geometric feature parameters of the bar based on the outline, determine whether the bars are stuck together, and perform preliminary separation processing on the stuck bars. The data processing module is used to receive data from stereo vision acquisition, dynamic threshold adjustment unit, and geometric feature analysis unit, and to calculate the number of bars using a counting algorithm based on feature matching and cluster analysis. The human-computer interaction unit provides a visual interface to display real-time bar counting results.

2. The bar count visual recognition automatic calculation system according to claim 1, characterized in that, The stereo vision acquisition unit consists of two industrial cameras, a structured light emitter, and a point cloud module. The two industrial cameras are used to capture images of the bar from different perspectives. The structured light emitter is used to project coded structured light onto the surface of the bar. The point cloud module is used to construct three-dimensional point cloud data.

3. The bar count visual recognition automatic calculation system according to claim 1, characterized in that, The dynamic threshold adjustment unit includes a light sensor, a temperature sensor, and a threshold adjuster. The light sensor monitors the ambient light intensity in real time, the temperature sensor monitors the temperature data of the production environment, and the threshold adjuster automatically adjusts the image segmentation threshold parameters based on the environmental parameters collected by the sensors and a pre-set environmental threshold mapping table.

4. The automatic calculation system for the number of bar strands based on visual recognition according to claim 1, characterized in that, The specific method for constructing the 3D point cloud data is as follows: By baseline calibration and stereo calibration, the spatial geometric relationship between the two cameras is established. Baseline calibration determines the distance and relative position between the optical centers of the two cameras, while stereo calibration obtains the intrinsic and extrinsic parameters of the cameras. Based on the principle of triangulation, the transformation relationship between three-dimensional spatial coordinates and two-dimensional image coordinates is established, providing a mathematical model for calculating parallax images. After acquiring dual-view images of the bar using an industrial camera, the images are first distorted based on the camera's intrinsic parameters to eliminate errors caused by lens distortion. Then, a stereo matching algorithm is used to find corresponding points in the left and right images. Combining the baseline distance and the camera's intrinsic and extrinsic parameters in the mathematical model, the disparity of the corresponding points is calculated using the triangulation formula. The disparity information of all pixels is integrated to generate a disparity image, which can intuitively reflect the three-dimensional point cloud data of the bar surface.

5. The bar count visual recognition automatic calculation system according to claim 4, characterized in that, The trigonometric distance measurement formula is: ; in, The distance between the optical centers of the two cameras is the baseline distance, and the camera focal length is... The difference in the x-coordinate of a point between the left and right images is _____. Parallax, the distance from the point to the camera plane is... The formula for calculating disparity can be derived as follows: .

6. A method for automatically calculating the number of bars using visual recognition, characterized in that, The method is as follows: S01: Image acquisition and preprocessing. The structured light emitter projects coded structured light onto the bar. Two industrial cameras simultaneously acquire images of the bar end face. The acquired images are then preprocessed by grayscale conversion and noise reduction. S02: Environmental adaptive threshold adjustment. The light and temperature sensors in the dynamic threshold adjustment unit collect environmental parameters in real time and automatically adjust the threshold of image segmentation according to the environmental threshold mapping table. S03: Bar geometry feature extraction. The geometry feature analysis unit performs edge detection on the preprocessed image, obtains geometric feature parameters, and determines whether the bars are stuck together by analyzing the distance and angle relationship between the contours. If there is sticking, a prompt is generated. S04: Bar count calculation. The data processing module matches the extracted bar geometric feature parameters with the standard bar feature library. Using the feature clustering algorithm, bars with similar features are clustered into one class, and each class represents one bar, thereby calculating the number of bars. S05: Output the results. Display the calculated number of bars on the interface of the human-machine interaction unit, and store the counting results and related data in the database.

7. The method for automatically calculating the number of bars by visual recognition according to claim 6, characterized in that, The preliminary separation process of the adhered rods specifically involves: First, the connection points and overlapping areas between the adhesive rod profiles are analyzed to determine the specific location of the adhesion. By calculating the number of intersections, the location of the intersections, and the area of ​​the overlapping parts, a topological model of the adhesion area is constructed. Based on the topology model, a heuristic algorithm is used to plan the separation path. The narrowest region of the overlapping contour is found as the separation starting point, and the separation path is gradually expanded outward along this region to minimize the damage to the original contour of the bar. During the path planning process, based on the geometric characteristics of the bar, the path that will not damage the integrity of a single bar is selected first. Based on the planned separation path, the adhered rods are segmented using an image segmentation algorithm.

8. The method for automatically calculating the number of bars by visual recognition according to claim 6, characterized in that, The geometric feature parameters include the bar profile, and the calculation of roundness and the ratio of the major axis to the minor axis.

9. The method for automatically calculating the number of bars by visual recognition according to claim 6, characterized in that, The data in the database is organized using a periodic deletion method, and is automatically deleted when the data retention time exceeds a set time.

10. The method for automatically calculating the number of bars by visual recognition according to claim 6, characterized in that, The database adds a timestamp when recording counting results, and users can add explanatory words to the counting results through the database.

Citation Information

Cited By

  • Method and system for identifying number of wire cores of single-terminal wire

    CN121564305A

  • A single-terminal wire core number recognition method and system

    CN121564305B

  • Bar discharging temperature intelligent sorting method and system

    CN121580354A