An automatic ball adding machine control system based on image recognition

By adopting multi-level intelligent image processing, YOLOv5 target detection and multi-target overlap de-occlusion analysis algorithm in the automatic ball adding machine, combined with the real-time dynamic compensation algorithm, the accuracy and control of traditional automatic ball adding machines in image processing and control are solved. Stability issues have been resolved and a more efficient ball-adding operation has been achieved.

CN118567295BActive Publication Date: 2024-10-29YANTAI XINHAI MINING MACHINERY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411059643.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-10-29
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

Traditional automatic ball adding machines face problems such as noise, lighting changes, multi-target overlap and occlusion in image processing, target recognition, path planning and real-time control, resulting in inaccurate image data processing, inaccurate control and poor adaptability.

Method used

An automatic ball adding machine control system based on image recognition is adopted, including image acquisition module, intelligent processing module, image recognition module, control algorithm module and monitoring feedback module. Through multi-level intelligent image processing algorithm, YOLOv5 target detection model and multi-target overlap The de-occlusion analysis algorithm, combined with the real-time dynamic compensation algorithm, optimizes the ball adding path and operation time.

Benefits of technology

It improves the accuracy of image recognition, ensures the accuracy of ball position and quantity statistics, reduces system delays and feedback instability, and improves the accuracy and stability of automatic ball addition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567295B_ABST
    Figure CN118567295B_ABST
Patent Text Reader

Abstract

The invention discloses an automatic ball adding machine control system based on image recognition, which relates to the field of automatic control technology, including a mechanical ball adding device and a controller, wherein the controller includes an image acquisition module, an intelligent processing module, an image recognition module, a control algorithm module and a mechanical ball adding module, and uses a multi-level intelligent image processing algorithm, and effectively improves the image quality through adaptive denoising, multi-dimensional contrast enhancement and multi-layer edge detection and segmentation, thereby improving the accuracy of image recognition, and removes noise while retaining the image edge through an adaptive denoising filter, and generates image data after intelligent processing; by acquiring the state data of the mechanical ball adding device in real time, comparing the planned path and the actual path data, obtaining the deviation and performing dynamic compensation adjustment. A real-time dynamic compensation algorithm is introduced, and through complex compensation amount calculation, system delay and feedback instability are reduced, and the stability of real-time adjustment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automatic control, and in particular relates to an automatic ball adding machine control system based on image recognition. Background Art

[0002] In the field of modern industrial automation and intelligent manufacturing, precise control and real-time adjustment of automation equipment are particularly important. As a typical automation equipment, the core task of the automatic ball adding machine is to realize the automatic detection, positioning and adding of balls through an efficient and precise control system. However, traditional automatic ball adding machines face many challenges in image processing, target recognition, path planning and real-time control, and innovative technical solutions are urgently needed to improve their performance and reliability.

[0003] Existing automatic ball adding machines usually rely on simple image processing and target detection algorithms, which often have difficulty coping with complex industrial environments. For example, noise, lighting changes, and multi-target overlap and occlusion in industrial environments will have a negative impact on the accuracy of image processing and target detection. In addition, traditional path planning algorithms have low computational efficiency in complex workspaces and it is difficult to generate the optimal path in real time. In actual operation, system delays and feedback instability also seriously affect the operating efficiency and accuracy of the automatic ball adding machine. However, the above technology has at least the following technical problems: in the control implementation of the automatic ball adding machine, the image data processing is not accurate enough, the control is not precise enough, and the adaptability is poor. Summary of the invention

[0004] The purpose of the present invention is to provide an automatic ball adding machine control system based on image recognition to solve the problems raised by the above background technology.

[0005] The present invention discloses an automatic ball adding machine control system based on image recognition, comprising a mechanical ball adding device and a controller, wherein the controller comprises an image acquisition module, an intelligent processing module, an image recognition module, a control algorithm module, a monitoring feedback module and a mechanical ball adding module; the image acquisition module captures real-time image data of a working area of ​​the mechanical ball adding device through a camera, and sends the real-time image data to the intelligent processing module; the intelligent processing module performs intelligent processing on the real-time image data to obtain the real-time image data after the intelligent processing, and sends the real-time image data after the intelligent processing to the image recognition module; the image recognition module performs recognition and analysis on the real-time image data after the intelligent processing to obtain the analysis result, recognizes the information data of the ball in the mechanical ball adding device based on the analysis result, and sends the information data to the control algorithm module; the control algorithm module calculates the ball adding path and operation time based on the ball information data, optimizes the ball adding path based on the real-time monitoring feedback of the monitoring feedback module, generates control instructions, and sends the control instructions to the mechanical ball adding module; the mechanical ball adding module performs the ball adding operation for the mechanical ball adding device according to the control instructions of the control algorithm module to realize automatic ball adding.

[0006] Furthermore, the controller includes a monitoring feedback module, which monitors the mechanical ball adding process in real time and obtains status data of the mechanical ball adding device through sensors. The status data of the mechanical ball adding device includes monitoring data of position, speed and acceleration. The monitoring data is sent to the control algorithm module as real-time monitoring data feedback for real-time adjustment.

[0007] Furthermore, the controller includes a fault diagnosis module, which monitors the operating status of each module and performs detection and diagnosis based on the operating status. When a fault is detected, a fault handling plan is generated, an alarm signal is triggered, the staff is notified, and a fault handling plan is provided.

[0008] Furthermore, the control steps of the controller are:

[0009] S1, capturing real-time image data of the working area of ​​the mechanical ball adding device, performing intelligent processing on the real-time image data, and obtaining real-time image data after intelligent processing; the capturing uses a camera to capture the image of the working area of ​​the mechanical ball adding device in real time to obtain real-time image data, and uses a multi-level intelligent image processing algorithm to perform intelligent processing on the real-time image data to generate image data after intelligent processing, so as to improve the accuracy of image recognition; the multi-level intelligent image processing algorithm includes adaptive denoising, multi-dimensional contrast enhancement and multi-layer edge detection and segmentation;

[0010] S2, performing recognition and analysis on the real-time image data after intelligent processing to obtain analysis results, and identifying information data of the balls in the mechanical ball adding device based on the analysis results;

[0011] S3, calculating the ball adding path and operation time based on the ball information data, and obtaining the status data of the mechanical ball adding device at the same time, optimizing the ball adding path as real-time monitoring feedback, generating control instructions based on the optimized ball adding path, and the mechanical ball adding device performs the ball adding operation according to the control instructions to realize automatic ball adding;

[0012] The adaptive denoising process is to process the real-time image data using a nonlinear adaptive denoising filter. The filter removes noise while retaining the image edge. The formula is as follows:

[0013]

[0014] in, Represents the pixel value of the real-time image; represents the pixel coordinates of the image, is the horizontal coordinate of the image, indicating the position of the pixel in the width direction of the image. Is the vertical coordinate of the image, indicating the position of the pixel in the height direction of the image. Corresponding to a pixel point in the image, locate the specific position in the image; represents the pixel value of the denoised image, is the denoising strength coefficient, which controls the degree of suppression of high-frequency components; is the edge preservation coefficient, which is used to enhance the image edge; is a high-order smoothing coefficient that suppresses high-frequency noise; and Respectively represent the images in and The gradient in direction, and Respectively represent the images in and The second-order difference in direction, and Respectively represent the images in and The third-order difference in direction.

[0015] Furthermore, the multidimensional contrast enhancement uses a multidimensional contrast enhancement algorithm to process the denoised image data. The multidimensional contrast enhancement algorithm dynamically adjusts the contrast according to the local and global statistical characteristics of the image. The implementation process is as follows:

[0016] Calculate the mean and standard deviation in the local window around each pixel, expressed as and , the formula is as follows,

[0017]

[0018]

[0019] in, So is the local window centered on is the number of pixels in the local window, which can be set according to the specific implementation scenario and is not limited here. is the denoised image at position The pixel value of is the position index of the local window;

[0020] Combine local and global contrast adjustments to perform contrast enhancement on the denoised data to obtain an enhanced image , the implementation formula is as follows,

[0021]

[0022] in, is the pixel value of the denoised image; is the pixel value of the image after contrast enhancement; is a small constant to prevent division by zero errors, is the enhancement factor, which is used to adjust the intensity of the contrast. and are the global mean and standard deviation of the image, providing a baseline for contrast enhancement. is the global contrast adjustment factor.

[0023] Furthermore, the multi-layer edge detection and segmentation process is performed on the multi-dimensional contrast enhanced image using a multi-layer edge detection and segmentation algorithm. The implementation process is as follows:

[0024] Perform edge detection on the enhanced image through multi-scale Gaussian kernel and calculate the multi-scale edge strength , the formula is as follows,

[0025]

[0026] in, It is The gradient of the Gaussian kernel of the layer, It is Layer Gaussian kernel function;

[0027]

[0028] It is The standard deviation of the Gaussian kernel of the layer, The calculation formula is,

[0029]

[0030] in Gaussian kernel function exist The partial derivative in the direction, exist rate of change in direction; Gaussian kernel function exist The partial derivative in the direction, exist rate of change in direction; represents a unit vector, direction; represents a unit vector, direction; It is a convolution operation; Represents the number of Gaussian kernel layers used in multi-scale edge detection, that is, the number of Gaussian kernels of different scales.

[0031] Furthermore, the edge strength is normalized to obtain an edge strength map for image segmentation. ,

[0032]

[0033] in, and are the minimum and maximum values ​​of the edge strength, respectively.

[0034] Use the existing threshold segmentation algorithm to segment the edge intensity map used for image segmentation Perform image segmentation to obtain intelligently processed image data.

[0035] Furthermore, the real-time image data after intelligent processing is subjected to reasoning analysis using a pre-trained YOLOv5 target detection model to identify the balls in the image and obtain information data of each ball, including the position and quantity;

[0036] In order to avoid multiple target overlap or occlusion, which may lead to inaccurate ball position data or incorrect number statistics, a multi-target overlap de-occlusion analysis algorithm is introduced. The multi-target overlap de-occlusion analysis algorithm solves the problem of multiple target overlap or occlusion through a complex multi-stage processing process, including spatial projection analysis, cross-correlation optimization, dynamic morphological segmentation and boundary reconstruction. The implementation process is as follows:

[0037] After implementing preliminary target detection through the pre-trained YOLOv5 target detection model, the intelligently processed image is inferred to identify the balls in the image, and the position information and confidence score of each ball are obtained; according to the confidence threshold, the low-confidence detection results are filtered out, and only the high-confidence ball position information is retained as the preliminary recognition result; after obtaining the preliminary recognition result, it is used as the processing data of the multi-target overlapping de-occlusion analysis algorithm;

[0038] Enhance the separation between balls, make overlapping balls easier to distinguish in high-dimensional space, project the position information of the balls into high-dimensional space, and separate the overlapping areas through the projection of high-dimensional space; the formula is as follows,

[0039]

[0040] in, It is The projection point of a ball in the high-dimensional space represents the position of the target in the high-dimensional space; It is The weights of the projection dimensions, It is A projection function; It is the number of projection dimensions used for high-dimensional projection. By increasing the projection dimension , can better separate and distinguish overlapping targets; Indicates The horizontal coordinate of the ball on the image plane, indicating the position of the ball in the width direction of the image; Respectively represent The vertical coordinate of the ball on the image plane, indicating the position of the ball in the height direction of the image;

[0041] In order to further determine the overlapping area, the following formula is used to calculate the cross-correlation coefficient between each pair of projection points. The cross-correlation coefficient is used to determine the degree of overlap between two projection points.

[0042]

[0043] in, It is and The cross-correlation coefficient of the projection points measures the correlation between two projection points; and is the projection point and The corresponding image intensity value, and is the projection point and The corresponding image intensity mean; Represents the pixel coordinates of the image after projection into high-dimensional space;

[0044] According to the empirical method, a cross-correlation coefficient threshold is preset, and its value range is (-1, 1). The cross-correlation coefficients less than the threshold are filtered out, and the cross-correlation coefficients greater than or equal to the threshold are retained to obtain the retained cross-correlation coefficients;

[0045] The image area of ​​each projection point is weighted based on the retained cross-correlation coefficient to increase the significance of the overlapping area, and then the overlapping area is extracted through the clustering algorithm;

[0046] After determining the overlapping areas, dynamic morphological segmentation is performed on the highly correlated areas to further separate the overlapping targets. The formula is as follows:

[0047]

[0048] in, yes The morphological segmentation result at the moment, is the initial recognized image, yes The structural element at a moment is a key component in morphological operations, used to define the shape and size of dilation and erosion operations, and is adjusted according to specific application scenarios and image features; represents the expansion operation, Indicates corrosion operation;

[0049] In order to ensure the accurate positioning of the target, Laplace transform is used to reconstruct the boundary of the target. The formula is as follows:

[0050]

[0051] in, It is the image after Laplace transformation, which indicates the boundary information of the image and is also the target position data after boundary reconstruction; represents the coordinate position in the image after Laplace transformation, is The second-order partial derivative in the direction reflects the position of the target in the image. Boundary changes in direction, is The second-order partial derivative in the direction reflects the position of the target in the image. Boundary changes in direction; combining two second-order partial derivatives, Laplace transform The boundary changes of the image in all directions are calculated to reconstruct and enhance the boundary information of the target in the image;

[0052] After reconstructing the boundary of the target, the position of the ball is corrected according to the following formula:

[0053]

[0054] in, It is the corrected The position of the ball, is the initial identified location, is the position correction coefficient, which represents the adjustment parameter in the correction process and is used to control the amplitude of the correction; It is and The Euclidean distance of the two balls in the image plane is used to measure the spatial relationship between the two balls;

[0055] Through position correction, the accuracy of the ball's position data is ensured, and through quantity statistics, the precise number of balls is obtained, and finally the ball's information data is obtained.

[0056] Furthermore, the path planning is performed using Dijkstra algorithm based on the ball information data structure and the working space and kinematic model of the mechanical ball adding device, and the total length of the ball adding path is calculated according to the path planning result, and the operation time is calculated according to the total length and the speed of the mechanical ball adding device;

[0057] The state data of the mechanical ball adding device is obtained in real time through sensors, including monitoring data such as position, speed and acceleration, and the real-time state data is compared with the state data of the mechanical ball adding device executed according to the path planning to obtain deviations, such as position deviation and speed deviation. The existing PID control algorithm is used to adjust the deviation according to the deviation, and the path and speed of the mechanical ball adding device are adjusted to obtain an optimized path. A control instruction is generated based on the optimized ball adding path, and the mechanical ball adding device performs the ball adding operation according to the control instruction to realize automatic ball adding;

[0058] When adjusting the path and speed of the mechanical ball adding device in real time, a real-time dynamic compensation algorithm is introduced. The real-time dynamic compensation algorithm reduces the delay and feedback instability of the automatic mechanical ball adding device control system by introducing a dynamic compensation mechanism, and improves the stability of the real-time adjustment. The implementation process is as follows:

[0059] The delay of the automatic mechanical ball adding device control system is calculated by the sensor that obtains the status data of the mechanical ball adding device in real time and the working frequency of the controller in the mechanical ball adding device. The formula is:

[0060]

[0061] in, is the sensor sampling frequency; is the controller operating frequency; It is a delay;

[0062] Compare the real-time monitoring data with the planned path data, calculate the deviation, obtain the deviation of position, speed and acceleration, and make dynamic compensation adjustments based on the deviation. The compensation formula is as follows:

[0063] For location,

[0064]

[0065] in, It is the current moment Delay Position compensation amount when is the position deviation; , , are the proportional, integral and differential coefficients of the PID controller; is the logarithmic compensation coefficient; is the square root compensation coefficient;

[0066] For speed,

[0067]

[0068] in, is the speed deviation; It is the current moment Delay Speed ​​compensation when

[0069] For acceleration,

[0070]

[0071] in, is the acceleration variance; It is the current moment Delay The acceleration compensation amount when

[0072] Adjust the current control instruction according to the calculated compensation amount, and generate an adjusted control instruction, including optimized position, speed and operation time data;

[0073]

[0074]

[0075]

[0076] in, , , For the current Position, velocity and acceleration instructions in the control instructions at each moment;

[0077] Finally, according to the optimized control instructions, the path and speed of the mechanical ball adding device are adjusted, the ball adding operation is performed, and automatic ball adding is realized.

[0078] The beneficial effects of the technical solution of the present invention are:

[0079] 1. Using multi-level intelligent image processing algorithms, the image quality is effectively improved through the combination of adaptive denoising, multi-dimensional contrast enhancement, and multi-layer edge detection and segmentation, thereby improving the accuracy of image recognition. The adaptive denoising filter removes noise while retaining the image edge, generating intelligently processed image data.

[0080] 2. Using the pre-trained YOLOv5 target detection model for image analysis, the position and number of balls can be quickly and accurately identified. The introduced multi-target overlapping de-occlusion analysis algorithm solves the problem of multi-target overlapping and occlusion through multi-stage processing, ensuring the accuracy of the ball position information and quantity statistics.

[0081] 3. By acquiring the status data of the mechanical ball adding device in real time, including position, speed and acceleration, the planned path and actual path data are compared, the deviation is calculated and dynamic compensation adjustment is performed. The real-time dynamic compensation algorithm is introduced, and through complex compensation calculation, the system delay and feedback instability are reduced, and the stability of real-time adjustment is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 This is a structural diagram of a control system of an automatic ball adding machine based on image recognition according to the present invention;

[0083] Figure 2 This is a control step diagram of an automatic ball adding machine control system based on image recognition described in the present invention. DETAILED DESCRIPTION

[0084] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all 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.

[0085] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0086] The following is a detailed description of a specific solution of an automatic ball adding machine control system based on image recognition provided by the present invention in conjunction with the accompanying drawings.

[0087] Refer to the attached Figure 1 , which shows an automatic ball adding machine control system based on image recognition provided by an embodiment of the present invention, including a mechanical ball adding device and a controller, wherein the controller includes an image acquisition module, an intelligent processing module, an image recognition module, a control algorithm module, a monitoring feedback module and a mechanical ball adding module; the image acquisition module captures real-time image data of the working area of ​​the mechanical ball adding device through a camera, and sends the real-time image data to the intelligent processing module; the intelligent processing module performs intelligent processing on the real-time image data to obtain real-time image data after intelligent processing, and sends the real-time image data after intelligent processing to the image recognition module; the image recognition module performs recognition and analysis on the real-time image data after intelligent processing to obtain analysis results, and recognizes information data of balls in the mechanical ball adding device based on the analysis results, which may include position, quantity, etc., and sends the information data to the control algorithm module; the control algorithm module calculates the ball adding path and operation time based on the ball information data, optimizes the ball adding path based on the real-time monitoring feedback of the monitoring feedback module, and generates control instructions, and sends the control instructions to the mechanical ball adding module; the mechanical ball adding module performs ball adding operation for the mechanical ball adding device according to the control instructions of the control algorithm module to realize automatic ball adding.

[0088] The controller includes a monitoring feedback module, which monitors the mechanical ball adding process in real time and obtains status data of the mechanical ball adding device through sensors. The status data of the mechanical ball adding device includes monitoring data of position, speed and acceleration. The monitoring data is sent to the control algorithm module as real-time monitoring data feedback for real-time adjustment.

[0089] The controller includes a fault diagnosis module, which monitors the operating status of each module and performs detection and diagnosis based on the operating status. When a fault is detected, a fault handling plan is generated, an alarm signal is triggered, the staff is notified, and a fault handling plan is provided.

[0090] Refer to the attached Figure 2 , the control steps of the controller are:

[0091] S1, capturing real-time image data of the working area of ​​the mechanical ball adding device, performing intelligent processing on the real-time image data, and obtaining real-time image data after intelligent processing; the capturing uses a camera to capture the image of the working area of ​​the mechanical ball adding device in real time to obtain real-time image data, and uses a multi-level intelligent image processing algorithm to perform intelligent processing on the real-time image data to generate image data after intelligent processing, so as to improve the accuracy of image recognition; the multi-level intelligent image processing algorithm includes adaptive denoising, multi-dimensional contrast enhancement and multi-layer edge detection and segmentation;

[0092] S2, performing recognition and analysis on the real-time image data after intelligent processing to obtain analysis results, and identifying information data of the balls in the mechanical ball adding device based on the analysis results;

[0093] S3, calculating the ball adding path and operation time based on the ball information data, and obtaining the status data of the mechanical ball adding device at the same time, optimizing the ball adding path as real-time monitoring feedback, generating control instructions based on the optimized ball adding path, and the mechanical ball adding device performs the ball adding operation according to the control instructions to realize automatic ball adding;

[0094] The adaptive denoising process is to process the real-time image data using a nonlinear adaptive denoising filter. The filter removes noise while retaining the image edge. The formula is as follows:

[0095]

[0096] in, Represents the pixel value of the real-time image; represents the pixel coordinates of the image, is the horizontal coordinate of the image, indicating the position of the pixel in the width direction of the image. Is the vertical coordinate of the image, indicating the position of the pixel in the height direction of the image. Corresponding to a pixel point in the image, locate the specific position in the image; represents the pixel value of the denoised image, is the denoising strength coefficient, which controls the degree of suppression of high-frequency components; is the edge preservation coefficient, which is used to enhance the image edge; is a high-order smoothing coefficient that suppresses high-frequency noise; and Respectively represent the images in and The gradient in direction, and Respectively represent the images in and The second-order difference in direction, and Respectively represent the images in and The third-order difference in direction.

[0097] The multidimensional contrast enhancement uses a multidimensional contrast enhancement algorithm to process the denoised image data. The multidimensional contrast enhancement algorithm dynamically adjusts the contrast according to the local and global statistical characteristics of the image. The implementation process is as follows:

[0098] Calculate the mean and standard deviation in the local window around each pixel, expressed as and , the formula is as follows,

[0099]

[0100]

[0101] in, So is the local window centered on is the number of pixels in the local window, which can be set according to the specific implementation scenario and is not limited here. is the denoised image at position The pixel value of is the position index of the local window;

[0102] Combine local and global contrast adjustments to perform contrast enhancement on the denoised data to obtain an enhanced image , the implementation formula is as follows,

[0103]

[0104] in, is the pixel value of the denoised image; is the pixel value of the image after contrast enhancement; is a small constant to prevent division by zero errors, is the enhancement factor, which is used to adjust the intensity of the contrast. and are the global mean and standard deviation of the image, providing a baseline for contrast enhancement. is the global contrast adjustment factor.

[0105] The multi-layer edge detection and segmentation process is performed on the multi-dimensional contrast enhanced image using a multi-layer edge detection and segmentation algorithm. The implementation process is as follows:

[0106] Perform edge detection on the enhanced image through multi-scale Gaussian kernel and calculate the multi-scale edge strength , the formula is as follows,

[0107]

[0108] in, It is The gradient of the Gaussian kernel of the layer, It is Layer Gaussian kernel function;

[0109]

[0110] It is The standard deviation of the Gaussian kernel of the layer, The calculation formula is,

[0111]

[0112] in Gaussian kernel function exist The partial derivative in the direction, exist rate of change in direction; Gaussian kernel function exist The partial derivative in the direction, exist rate of change in direction; represents a unit vector, direction; represents a unit vector, direction; It is a convolution operation; It represents the number of layers of Gaussian kernels used in multi-scale edge detection, that is, the number of Gaussian kernels of different scales, which can be set according to the specific implementation scenario and is not limited here.

[0113] The edge strength is normalized to obtain an edge strength map for image segmentation. ,

[0114]

[0115] in, and are the minimum and maximum values ​​of the edge strength, respectively.

[0116] Use the existing threshold segmentation algorithm to segment the edge intensity map used for image segmentation Perform image segmentation to obtain intelligently processed image data.

[0117] The real-time image data after intelligent processing is analyzed by reasoning using a pre-trained YOLOv5 target detection model to identify the balls in the image and obtain information data of each ball, including the position and quantity;

[0118] In order to avoid multiple target overlap or occlusion, which may lead to inaccurate ball position data or incorrect number statistics, a multi-target overlap de-occlusion analysis algorithm is introduced. The multi-target overlap de-occlusion analysis algorithm solves the problem of multiple target overlap or occlusion through a complex multi-stage processing process, including spatial projection analysis, cross-correlation optimization, dynamic morphological segmentation and boundary reconstruction. The implementation process is as follows:

[0119] After implementing preliminary target detection through the pre-trained YOLOv5 target detection model, the intelligently processed image is inferred to identify the balls in the image, and the position information and confidence score of each ball are obtained; according to the confidence threshold, the low-confidence detection results are filtered out, and only the high-confidence ball position information is retained as the preliminary recognition result; after obtaining the preliminary recognition result, it is used as the processing data of the multi-target overlapping de-occlusion analysis algorithm;

[0120] Enhance the separation between balls, make overlapping balls easier to distinguish in high-dimensional space, project the position information of the balls into high-dimensional space, and separate the overlapping areas through the projection of high-dimensional space; the formula is as follows,

[0121]

[0122] in, It is The projection point of a ball in the high-dimensional space represents the position of the target in the high-dimensional space; It is The weights of the projection dimensions, It is a projection function (such as a polynomial function); It is the number of projection dimensions used for high-dimensional projection. By increasing the projection dimension , can better separate and distinguish overlapping targets, and is set according to the specific implementation scenario, which is not limited here; Indicates The horizontal coordinate of the ball on the image plane, indicating the position of the ball in the width direction of the image; Respectively represent The vertical coordinate of the ball on the image plane, indicating the position of the ball in the height direction of the image;

[0123] In order to further determine the overlapping area, the following formula is used to calculate the cross-correlation coefficient between each pair of projection points. The cross-correlation coefficient is used to determine the degree of overlap between two projection points.

[0124]

[0125] in, It is and The cross-correlation coefficient of the projection points measures the correlation between two projection points; and is the projection point and The corresponding image intensity value, and is the projection point and The corresponding image intensity mean; Represents the pixel coordinates of the image after projection into high-dimensional space;

[0126] According to the empirical method, a cross-correlation coefficient threshold is preset, and its value range is (-1, 1). The cross-correlation coefficients less than the threshold are filtered out, and the cross-correlation coefficients greater than or equal to the threshold are retained to obtain the retained cross-correlation coefficients;

[0127] The image area of ​​each projection point is weighted based on the retained cross-correlation coefficient to increase the significance of the overlapping area, and then the overlapping area is extracted through the clustering algorithm;

[0128] After determining the overlapping areas, dynamic morphological segmentation is performed on the highly correlated areas to further separate the overlapping targets. The formula is as follows:

[0129]

[0130] in, yes The morphological segmentation result at the moment, is the initial recognized image, yes The structural element at a moment is a key component in morphological operations, used to define the shape and size of dilation and erosion operations, and is adjusted according to specific application scenarios and image features; represents the expansion operation, Indicates corrosion operation;

[0131] In order to ensure the accurate positioning of the target, Laplace transform is used to reconstruct the boundary of the target. The formula is as follows:

[0132]

[0133] in, It is the image after Laplace transformation, which indicates the boundary information of the image and is also the target position data after boundary reconstruction; represents the coordinate position in the image after Laplace transformation, is The second-order partial derivative in the direction reflects the position of the target in the image. Boundary changes in direction, is The second-order partial derivative in the direction reflects the position of the target in the image. Boundary changes in direction; combining two second-order partial derivatives, Laplace transform The boundary changes of the image in all directions are calculated to reconstruct and enhance the boundary information of the target in the image;

[0134] After reconstructing the boundary of the target, the position of the ball is corrected according to the following formula:

[0135]

[0136] in, It is the corrected The position of the ball, is the initial identified location, is the position correction coefficient, which represents the adjustment parameter in the correction process and is used to control the amplitude of the correction; It is and The Euclidean distance of the two balls in the image plane is used to measure the spatial relationship between the two balls;

[0137] Through position correction, the accuracy of the ball's position data is ensured, and through quantity statistics, the precise number of balls is obtained, and finally the ball's information data is obtained.

[0138] The path planning is performed using Dijkstra algorithm based on the ball information data structure and the working space and kinematic model of the mechanical ball adding device, and the total length of the ball adding path is calculated according to the path planning result, and the operation time is calculated according to the total length and the speed of the mechanical ball adding device;

[0139] The state data of the mechanical ball adding device is obtained in real time through sensors, including monitoring data such as position, speed and acceleration, and the real-time state data is compared with the state data of the mechanical ball adding device executed according to the path planning to obtain deviations, such as position deviation and speed deviation. The existing PID control algorithm is used to adjust the deviation according to the deviation, and the path and speed of the mechanical ball adding device are adjusted to obtain an optimized path. A control instruction is generated based on the optimized ball adding path, and the mechanical ball adding device performs the ball adding operation according to the control instruction to realize automatic ball adding;

[0140] When adjusting the path and speed of the mechanical ball adding device in real time, system delay and feedback instability may occur. To solve the above problems, a real-time dynamic compensation algorithm is introduced. The real-time dynamic compensation algorithm reduces the delay and feedback instability of the automatic mechanical ball adding device control system by introducing a dynamic compensation mechanism, and improves the stability of real-time adjustment. The implementation process is as follows:

[0141] The delay of the automatic mechanical ball adding device control system is calculated by the sensor that obtains the status data of the mechanical ball adding device in real time and the working frequency of the controller in the mechanical ball adding device. The formula is:

[0142]

[0143] in, is the sensor sampling frequency; is the controller operating frequency; It is a delay;

[0144] Compare the real-time monitoring data with the planned path data, calculate the deviation, obtain the deviation of position, speed and acceleration, and make dynamic compensation adjustments based on the deviation. The compensation formula is as follows:

[0145] For location,

[0146]

[0147] in, It is the current moment Delay Position compensation amount when is the position deviation; , , are the proportional, integral and differential coefficients of the PID controller; is the logarithmic compensation coefficient; is the square root compensation coefficient;

[0148] For speed,

[0149]

[0150] in, is the speed deviation; It is the current moment Delay Speed ​​compensation when

[0151] For acceleration,

[0152]

[0153] in, is the acceleration variance; It is the current moment Delay The acceleration compensation amount when

[0154] Adjust the current control instruction according to the calculated compensation amount, and generate an adjusted control instruction, including optimized position, speed and operation time data;

[0155]

[0156]

[0157]

[0158] in, , , For the current Position, velocity and acceleration instructions in the control instructions at each moment;

[0159] Finally, according to the optimized control instructions, the path and speed of the mechanical ball adding device are adjusted, the ball adding operation is performed, and automatic ball adding is realized.

[0160] The operating status of each module is collected in real time through sensors, and fault detection and diagnosis are performed based on the operating status using expert experience and existing machine learning algorithms (such as support vector machines). When a fault is detected, a fault handling plan is generated, an alarm signal is triggered, the staff is notified, and a fault handling plan is provided.

[0161] The order of the embodiments of the invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0162] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0163] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. An automatic ball adding machine control system based on image recognition, including a mechanical ball adding device and a controller, It is characterized in that The controller includes an image acquisition module, an intelligent processing module, an image recognition module, a control algorithm module, a monitoring feedback module and a mechanical ball adding module; the image acquisition module captures real-time image data of the working area of ​​the mechanical ball adding device through a camera, and sends the real-time image data to the intelligent processing module; the intelligent processing module performs intelligent processing on the real-time image data to obtain the real-time image data after intelligent processing, and sends the real-time image data after intelligent processing to the image recognition module; the image recognition module performs recognition and analysis on the real-time image data after intelligent processing to obtain the analysis result, recognizes the information data of the ball in the mechanical ball adding device based on the analysis result, and sends the information data to the control algorithm module; the control algorithm module calculates the ball adding path and operation time based on the ball information data, optimizes the ball adding path based on the real-time monitoring feedback of the monitoring feedback module, generates control instructions, and sends the control instructions to the mechanical ball adding module; the mechanical ball adding module performs the ball adding operation for the mechanical ball adding device according to the control instructions of the control algorithm module to realize automatic ball adding; The control steps of the controller are: S1, capturing real-time image data of the working area of ​​the mechanical ball adding device, performing intelligent processing on the real-time image data, and obtaining real-time image data after intelligent processing; the capturing uses a camera to capture the image of the working area of ​​the mechanical ball adding device in real time to obtain real-time image data, and uses a multi-level intelligent image processing algorithm to perform intelligent processing on the real-time image data to generate image data after intelligent processing, so as to improve the accuracy of image recognition; the multi-level intelligent image processing algorithm includes adaptive denoising, multi-dimensional contrast enhancement and multi-layer edge detection and segmentation; S2, performing recognition and analysis on the real-time image data after intelligent processing to obtain analysis results, and identifying information data of the balls in the mechanical ball adding device based on the analysis results; S3, calculating the ball adding path and operation time based on the ball information data, and obtaining the status data of the mechanical ball adding device at the same time, optimizing the ball adding path as real-time monitoring feedback, generating control instructions based on the optimized ball adding path, and the mechanical ball adding device performs the ball adding operation according to the control instructions to realize automatic ball adding; The adaptive denoising process is to process the real-time image data using a nonlinear adaptive denoising filter. The filter removes noise while retaining the image edge. The formula is as follows: ; in, Represents the pixel value of the real-time image; represents the pixel coordinates of the image, is the horizontal coordinate of the image, indicating the position of the pixel in the width direction of the image. Is the vertical coordinate of the image, indicating the position of the pixel in the height direction of the image. Corresponding to a pixel point in the image, locate the specific position in the image; represents the pixel value of the denoised image, is the denoising strength coefficient, which controls the degree of suppression of high-frequency components; is the edge preservation coefficient, which is used to enhance the image edge; is a high-order smoothing coefficient that suppresses high-frequency noise; and Respectively represent the images in and The gradient in direction, and Respectively represent the images in and The second-order difference in direction, and Respectively represent the images in and The third-order difference in direction; The path planning is performed using Dijkstra algorithm based on the ball information data structure and the working space and kinematic model of the mechanical ball adding device, and the total length of the ball adding path is calculated according to the path planning result, and the operation time is calculated according to the total length and the speed of the mechanical ball adding device; The state data of the mechanical ball adding device is obtained in real time through sensors, including monitoring data such as position, speed and acceleration, and the real-time state data is compared with the state data of the mechanical ball adding device executed according to the path planning to obtain deviations, such as position deviation and speed deviation. The existing PID control algorithm is used to adjust the deviation according to the deviation, and the path and speed of the mechanical ball adding device are adjusted to obtain an optimized path. A control instruction is generated based on the optimized ball adding path, and the mechanical ball adding device performs the ball adding operation according to the control instruction to realize automatic ball adding; When adjusting the path and speed of the mechanical ball adding device in real time, a real-time dynamic compensation algorithm is introduced. The real-time dynamic compensation algorithm reduces the delay and feedback instability of the automatic mechanical ball adding device control system by introducing a dynamic compensation mechanism, and improves the stability of the real-time adjustment. The implementation process is as follows: The delay of the automatic mechanical ball adding device control system is calculated by the sensor that obtains the status data of the mechanical ball adding device in real time and the working frequency of the controller in the mechanical ball adding device. The formula is: ; in, is the sensor sampling frequency; is the controller operating frequency; It is a delay; Compare the real-time monitoring data with the planned path data, calculate the deviation, obtain the deviation of position, speed and acceleration, and make dynamic compensation adjustments based on the deviation. The compensation formula is as follows: For location, ; in, It is the current moment Delay Position compensation amount when ; is the position deviation; , , are the proportional, integral and differential coefficients of the PID controller; is the logarithmic compensation coefficient; is the square root compensation coefficient; For speed, ; in, is the speed deviation; It is the current moment Delay Speed ​​compensation when For acceleration, ; in, is the acceleration variance; It is the current moment Delay The acceleration compensation amount when Adjust the current control instruction according to the calculated compensation amount, and generate an adjusted control instruction, including optimized position, speed and operation time data; ; ; ; in, , , For the current Position, velocity and acceleration instructions in the control instructions at each moment; Finally, according to the optimized control instructions, the path and speed of the mechanical ball adding device are adjusted, the ball adding operation is performed, and automatic ball adding is realized.

2. According to claim 1, an automatic ball adding machine control system based on image recognition, It is characterized in that The controller includes a monitoring feedback module, which monitors the mechanical ball adding process in real time and obtains status data of the mechanical ball adding device through sensors. The status data of the mechanical ball adding device includes monitoring data of position, speed and acceleration. The monitoring data is sent to the control algorithm module as real-time monitoring data feedback for real-time adjustment.

3. According to claim 1, an automatic ball adding machine control system based on image recognition, It is characterized in that The controller includes a fault diagnosis module, which monitors the operating status of each module and performs detection and diagnosis based on the operating status. When a fault is detected, a fault handling plan is generated, an alarm signal is triggered, the staff is notified, and a fault handling plan is provided.

4. According to claim 1, an automatic ball adding machine control system based on image recognition, It is characterized in that The multidimensional contrast enhancement uses a multidimensional contrast enhancement algorithm to process the denoised image data. The multidimensional contrast enhancement algorithm dynamically adjusts the contrast according to the local and global statistical characteristics of the image. The implementation process is as follows: Calculate the mean and standard deviation in the local window around each pixel, expressed as and , the formula is as follows, ; ; in, So is the local window centered on is the number of pixels in the local window, which can be set according to the specific implementation scenario and is not limited here. is the denoised image at position The pixel value of is the position index of the local window; Combine local and global contrast adjustments to perform contrast enhancement on the denoised data to obtain an enhanced image , the implementation formula is as follows, ; in, is the pixel value of the denoised image; is the pixel value of the image after contrast enhancement; is a small constant to prevent division by zero errors, is the enhancement factor, which is used to adjust the contrast intensity. and are the global mean and standard deviation of the image, providing a baseline for contrast enhancement. is the global contrast adjustment factor.

5. According to claim 4, an automatic ball adding machine control system based on image recognition, It is characterized in that The multi-layer edge detection and segmentation process is performed on the multi-dimensional contrast enhanced image using a multi-layer edge detection and segmentation algorithm. The implementation process is as follows: Perform edge detection on the enhanced image using a multi-scale Gaussian kernel and calculate the multi-scale edge strength , the formula is as follows, ; in, It is The gradient of the Gaussian kernel of the layer, It is Layer Gaussian kernel function; ; It is The standard deviation of the Gaussian kernel of the layer, The calculation formula is, ; in Gaussian kernel function exist The partial derivative in the direction, exist rate of change in direction; Gaussian kernel function exist The partial derivative in the direction, exist rate of change in direction; represents a unit vector, direction; represents a unit vector, direction; It is a convolution operation; Represents the number of Gaussian kernel layers used in multi-scale edge detection, that is, the number of Gaussian kernels of different scales.

6. According to claim 5, an automatic ball adding machine control system based on image recognition, It is characterized in that The edge strength is normalized to obtain an edge strength map for image segmentation. , ; in, and are the minimum and maximum values ​​of edge strength, respectively; Use the existing threshold segmentation algorithm to segment the edge intensity map used for image segmentation Perform image segmentation to obtain intelligently processed image data.

7. According to claim 1, an automatic ball adding machine control system based on image recognition, It is characterized in that The real-time image data after intelligent processing is analyzed by reasoning using a pre-trained YOLOv5 target detection model to identify the balls in the image and obtain information data of each ball, including the position and quantity; In order to avoid multiple target overlap or occlusion, which may lead to inaccurate ball position data or incorrect number statistics, a multi-target overlap de-occlusion analysis algorithm is introduced. The multi-target overlap de-occlusion analysis algorithm solves the problem of multiple target overlap or occlusion through a complex multi-stage processing process, including spatial projection analysis, cross-correlation optimization, dynamic morphological segmentation and boundary reconstruction. The implementation process is as follows: After implementing preliminary target detection through the pre-trained YOLOv5 target detection model, the intelligently processed image is inferred to identify the balls in the image and obtain the position information and confidence score of each ball. According to the confidence threshold, the low-confidence detection results are filtered out, and only the high-confidence ball position information is retained as the preliminary recognition result. After obtaining the preliminary recognition result, it is used as the processing data of the multi-target overlapping de-occlusion analysis algorithm. Enhance the separation between balls, make overlapping balls easier to distinguish in high-dimensional space, project the position information of the balls into high-dimensional space, and separate the overlapping areas through the projection of high-dimensional space; the formula is as follows, ; in, It is The projection point of a ball in the high-dimensional space represents the position of the target in the high-dimensional space; It is The weights of the projection dimensions, It is A projection function; It is the number of projection dimensions used for high-dimensional projection. By increasing the projection dimension , can better separate and distinguish overlapping targets; Indicates The horizontal coordinate of the ball on the image plane, indicating the position of the ball in the width direction of the image; Respectively represent The vertical coordinate of the ball on the image plane, indicating the position of the ball in the height direction of the image; In order to further determine the overlapping area, the following formula is used to calculate the cross-correlation coefficient between each pair of projection points. The cross-correlation coefficient is used to determine the degree of overlap between two projection points. ; in, It is and The cross-correlation coefficient of the projection points measures the correlation between two projection points; and is the projection point and The corresponding image intensity value, and is the projection point and The corresponding image intensity mean; Represents the pixel coordinates of the image after projection into high-dimensional space; According to the empirical method, a cross-correlation coefficient threshold is preset, and its value range is (-1, 1). The cross-correlation coefficients less than the threshold are filtered out, and the cross-correlation coefficients greater than or equal to the threshold are retained to obtain the retained cross-correlation coefficients; The image area of ​​each projection point is weighted based on the retained cross-correlation coefficient to increase the significance of the overlapping area, and then the overlapping area is extracted through the clustering algorithm; After determining the overlapping areas, dynamic morphological segmentation is performed on the highly correlated areas to further separate the overlapping targets. The formula is as follows: ; in, yes The morphological segmentation result at the moment, is the initial recognized image, yes The structural element at a moment is a key component in morphological operations, used to define the shape and size of dilation and erosion operations, and is adjusted according to specific application scenarios and image features; represents the expansion operation, Indicates corrosion operation; In order to ensure the accurate positioning of the target, Laplace transform is used to reconstruct the boundary of the target. The formula is as follows: ; in, It is the image after Laplace transformation, which indicates the boundary information of the image and is also the target position data after boundary reconstruction; represents the coordinate position in the image after Laplace transformation, is The second-order partial derivative in the direction reflects the boundary change of the target in the image in the 𝑥 direction. is The second-order partial derivative in the direction reflects the position of the target in the image. Boundary changes in direction; combining two second-order partial derivatives, Laplace transform The boundary changes of the image in all directions are calculated to reconstruct and enhance the boundary information of the target in the image; After reconstructing the boundary of the target, the position of the ball is corrected according to the following formula: ; in, It is the corrected The position of the ball, is the initial identified location, is the position correction coefficient, which represents the adjustment parameter in the correction process and is used to control the amplitude of the correction; It is and The Euclidean distance of the two balls in the image plane is used to measure the spatial relationship between the two balls; Through position correction, the accuracy of the ball's position data is ensured, and through quantity statistics, the precise number of balls is obtained, and finally the ball's information data is obtained.

Citation Information

Patent Citations

  • Automatic adding method and system of grinding body and terminal equipment

    CN114037756A

  • Packaging mechanical arm control system

    CN118386258A