Control algorithm and system for adjusting blowing of spray valve based on shape and dead pixel position
Through the image analysis and identification module, the object shape and location of the bad point are obtained, the blowing position and parameters of the spray valve are calculated, and the blowing time of the spray valve is dynamically adjusted, which solves the problem of inaccurate blowing of the spray valve in the existing color sorting machine, and realizes the accurate removal of heterochromatic particles and the protection of good products.
Patent Information
- Application Number
- CN202510386525.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
AI Technical Summary
The blowing time of the spray valve in the existing color sorting machine is fixed or limited to adjust, resulting in larger materials not being able to fall into the waste outlet or smaller materials being blown too far, and the removal is inaccurate.
Through the image analysis and identification module, the shape characteristics and bad point positions of the object are obtained, the blowing position and parameters of the spray valve are calculated, the blowing time of the spray valve is dynamically adjusted, and the calculation error is compensated.
The accurate removal of heterochromatic particles is achieved, the error removal of good products is reduced, and the accuracy and efficiency of the blowing valve are improved.
Smart Images

Figure CN120243487A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of color sorter control, and particularly to a control algorithm and system for adjusting the air blowing of a spray valve based on the shape and the position of a bad point. Background Art
[0002] A color sorter is a device that automatically sorts out different-color particles in granular materials according to the differences in the optical properties of the materials, and uses photoelectric detection technology. At present, color sorters are used in the fields of bulk material or packaged industrial products and food quality inspection and grading. In the existing color sorters, the rejection device can reject the materials with bad points and different-color materials. The rejection device is an existing device, which performs rejection by blowing air. However, the blowing time of the existing color sorters is mostly fixed or limitedly adjustable. For some larger materials, too short blowing time may cause the materials to fail to fall into the waste outlet. For some smaller materials, too long blowing time may cause the materials to be blown too far. Summary of the Invention
[0003] In view of the deficiencies of the existing technology, the present invention provides the following technical solutions:
[0004] A control algorithm for adjusting the air blowing of a spray valve based on the shape and the position of a bad point, comprising the following steps:
[0005] S10: Analyze the image of the falling object through an image analysis module, and obtain the image information of the object.
[0006] S20: Identify the image information through an image recognition module, obtain the shape characteristics and the position of the bad point of the object, and obtain the position to be rejected of the object and the offset distance of the centroid point relative to the center point of the circumscribed rectangle according to the shape characteristics and the position of the bad point.
[0007] S30: Determine the air blowing position of the spray valve according to the position to be rejected and the offset distance, adjust the air blowing parameters according to the air blowing position of the spray valve, and perform the rejection operation.
[0008] As an improvement of the above technical solution, the step S10 includes the following steps:
[0009] S11: Collect the image of the real-time falling object through a camera module.
[0010] S12: Perform preprocessing on the collected image.
[0011] S13: Analyze the difference information between the object and the background through the image analysis module, separate the foreground color and the background color, and obtain the image information of the object.
[0012] As an improvement of the above technical solution, the preprocessing in the step S12 at least includes: denoising operation of the image, contrast enhancement operation, and white balance correction operation.
[0013] As an improvement of the above technical solution, step S20 includes the following steps:
[0014] S21: Obtain the shape features of the object through edge detection and contour extraction algorithms, and obtain the characteristic parameters of the object according to the shape features.
[0015] S22: Obtain the positions of the defective points in the object through color recognition algorithms.
[0016] S23: Obtain the positions to be removed of the object according to the characteristic parameters of the object and the positions of the defective points in the object.
[0017] S24: Obtain the coordinates of the centroid point of the object relative to the object, and calculate the offset distance of the centroid point relative to the center point of the circumscribed rectangle.
[0018] As an improvement of the above technical solution, the characteristic parameters of the object in step S23 at least include: the size, area, circumscribed rectangle, center point, perimeter, and curvature of the object.
[0019] As an improvement of the above technical solution, step S30 includes the following steps:
[0020] S31: Calculate the nozzles within the range where the object is located according to the obtained center point of the circumscribed rectangle and the coordinates of the centroid point.
[0021] S32: Obtain the offset and the coordinates of the nozzles corresponding to the nozzle action in the horizontal coordinate direction according to the horizontal coordinate direction and the Euclidean distance, determine the spray valves for performing actions according to preset conditions, and calculate the offset of the object in the vertical coordinate direction with respect to the nozzles according to the offset obtained according to the vertical coordinate direction and the Euclidean distance.
[0022] S33: Calculate the delay time of the spray valves according to the number of spray valves in the horizontal coordinate direction and the offset of the object with respect to the nozzles in the vertical coordinate direction.
[0023] S34: Determine the blowing time according to the type of defective points or the shape of the object.
[0024] As an improvement of the above technical solution, when determining the blowing time in step S34, it is necessary to dynamically adjust the blowing time to compensate for the errors in the calculation process.
[0025] As an improvement of the above technical solution, the compensated blowing time depends on the following formula:
[0026] T = T0 + M * S + N * W
[0027] Among them, T is the actual execution time of the spray valve, T0 is the preset basic blowing time of the spray valve, M is a coefficient related to the area and length of the object, S is the area of the object, N is a coefficient related to the curvature of the object, and W is the degree of curvature of the object.
[0028] A control system for adjusting the blowing of the spray valve based on the shape and the position of bad points operates using the control algorithm for adjusting the blowing of the spray valve based on the shape and the position of bad points as described in the foregoing technical solution, and includes:
[0029] An image acquisition module for acquiring an image of the object during falling.
[0030] An image analysis module for performing image analysis on the falling object and obtaining the image information of the object.
[0031] An image recognition module for recognizing the image information and obtaining the shape characteristics and the position of bad points of the object.
[0032] A storage module for storing preset information and data during the working process.
[0033] A controller for calculating based on the input data and sending a control signal to the corresponding module.
[0034] As an improvement of the above technical solution, the image acquisition module acquires the image of the object during falling by continuously shooting with a high-definition resolution camera.
[0035] Advantages of the present invention:
[0036] Through the cooperation of the image analysis module and the image recognition module, it is possible to realize real-time acquisition of high-definition images of the falling object, then analyze the shape and the position of bad points of the object, calculate the position of the rejection point according to the position information of the bad points, and dynamically adjust the blowing parameters of the spray valve to ensure that the object to be rejected can be accurately rejected and the good products are misrejected as little as possible. Description of the Drawings
[0037] Figure 1 It is a schematic diagram of obtaining the image information of the object after separating the image of the present invention.
[0038] Figure 2 It is a principle block diagram of a control system for adjusting the blowing of the spray valve based on the shape and the position of bad points of the present invention. Detailed Embodiments
[0039] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0040] In the existing color sorter, the rejection device can reject materials with bad points and different-color materials. The rejection device is an existing device, which performs rejection by blowing air. However, the blowing time of most existing color sorters is fixed or limitedly adjustable. For some larger materials, too short a blowing time may cause the materials to fail to fall into the waste outlet. For some smaller materials, too long a blowing time may cause the materials to be blown too far.
[0041] To solve the above problems, the following embodiments are provided:
[0042] Embodiment 1
[0043] Provide a control algorithm for adjusting the blowing of the spray valve based on the shape and the position of the bad point, including the following steps:
[0044] S10: Analyze the image of the falling object through an image analysis module and obtain the image information of the object.
[0045] First, collect and analyze the falling object, and convert the entity into image information that can be read by a computer. Specifically, the step S10 includes the following steps:
[0046] S11: Collect the image of the real-time falling object through a camera module.
[0047] Usually, a high-definition resolution camera can be used to collect the image of the falling object in real time. Usually, image shooting and collection operations can be performed in ways such as high-speed continuous shooting. After the collection is completed, step S13 is executed.
[0048] S12: Preprocess the collected image.
[0049] Among them, the preprocessing in the step S12 at least includes: image denoising operation, contrast enhancement operation, and white balance correction operation.
[0050] Through these operations, the image is restored, and the original color of the image is restored as much as possible. After the preprocessing is completed, step S13 is executed.
[0051] S13: Analyze the difference information between the object and the background through the image analysis module, separate the foreground color and the background color, and obtain the image information of the object.
[0052] Since there may be various influencing images in the image, the foreground color and background color of the object are separated through the difference information between the object and the background, so as to obtain the object saliency map, and the image information of the object is obtained from the saliency map, specifically as Figure 1 shown. After completing the acquisition and extraction of information, step S20 is executed for image analysis operations.
[0053] S20: Identify the image information through the image recognition module, obtain the shape features of the object and the positions of the bad points, and obtain the positions to be removed of the object and the offset distance of the centroid point relative to the center point of the circumscribed rectangle according to the shape features and the positions of the bad points.
[0054] By identifying the shape features of the image and the positions of the bad points, calculate the positions to be removed of the object and the offset distance of the centroid point relative to the specific center point of the outside, providing preliminary data preparation for the calculation of the blowing position of the spray valve. Specifically, the step S20 includes the following steps
[0055] S21: Obtain the shape features of the object through the edge detection and contour extraction algorithms, and obtain the characteristic parameters of the object according to the shape features.
[0056] Identify the main shape features of the object by detecting the edges and perform contour extraction operations, so as to extract the shape features of the object. In this process, the characteristic parameters of the object can be read synchronously. These characteristic parameters usually include: the size, area, circumscribed rectangle, center point, perimeter, and curvature of the object. After completing the feature identification.
[0057] S22: Obtain the positions of the bad points in the object through the color recognition algorithm.
[0058] After the previous image segmentation and recognition, the features in the image will be more obvious. For the positions of the bad points, they are usually contaminated by some garbage and dirt, which will lead to the situation that the color of this position is usually inconsistent with the surrounding colors. In this case, the positions of the bad points can be directly identified by color recognition.
[0059] S23: Obtain the positions to be removed of the object according to the characteristic parameters of the object and the positions of the bad points in the object.
[0060] After completing the identification of these parameters, determine the positions to be removed. After determination, the offset situation of the centroid point can be further determined. Specifically, execute step S24.
[0061] S24: Obtain the coordinates of the centroid point of the object relative to the object, and calculate the offset distance of the centroid point relative to the center point of the circumscribed rectangle.
[0062] After obtaining the offset distance, it is necessary to determine the blowing position of the spray valve based on these parameters, and step S30 also needs to be executed based on this.
[0063] S30: Determine the blowing position of the spray valve according to the position to be removed and the offset distance, adjust the blowing parameters according to the blowing position of the spray valve, and perform the removal operation.
[0064] Specifically, the step S30 includes the following steps:
[0065] S31: Calculate the nozzles in the range where the object is located according to the obtained center point of the circumscribed rectangle and the coordinates of the centroid point.
[0066] First, determine which nozzle or nozzles the position it is in can spray to. After determining the nozzles, then judge the blowing conditions according to the specific situation.
[0067] S32: Obtain the offset and the coordinates of the corresponding nozzle in the horizontal coordinate direction of the nozzle movement according to the horizontal coordinate direction and the Euclidean distance, determine the spray valve to perform the action according to the preset conditions, and calculate the offset of the object in the vertical coordinate direction of the nozzle according to the offset obtained from the vertical coordinate direction and the Euclidean distance.
[0068] Determine the corresponding nozzle coordinates in the nozzle movement direction by determining the offsets in the horizontal and vertical coordinates, that is, the coordinate situation in the possible spraying direction of the nozzle, and determine the offset situation with the vertical coordinate, so as to further control the spray valve that can spray.
[0069] S33: Calculate the delay time of the spray valve according to the number of spray valves in the horizontal coordinate direction and the offset of the object relative to the nozzle in the vertical coordinate direction.
[0070] S34: Determine the blowing time according to the type of bad point or the shape of the object.
[0071] In the previous calculations, they are all relatively direct calculation methods. It is also necessary to perform compensation calculations based on these to improve the calculation accuracy. That is, when determining the blowing time in step S34, it is necessary to dynamically adjust the blowing time to compensate for the errors in the calculation process. The specific compensation method is shown in the following formula:
[0072] T = T0 + M * S + N * W
[0073] Among them, T is the actual execution time of the spray valve, T0 is the preset basic blowing time of the spray valve, M is the coefficient related to the area and length of the object, S is the area of the object, N is the coefficient related to the curvature of the object, and W is the degree of curvature of the object.
[0074] Adjust the actual execution time of the spray valve by compensation to improve the spraying accuracy of the spray valve and achieve the function of accurately blowing away different-color particles.
[0075] Embodiment 2
[0076] To cooperate with Embodiment 1, a control system for adjusting the air blowing of the spray valve based on the shape and the position of the defective points is also provided, which operates using the control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the defective points as described in Embodiment 1, and includes: an image acquisition module, an image analysis module, an image recognition module, a storage module, and a controller.
[0077] Among them, the image acquisition module is used to acquire the image of the object when it is falling; the image analysis module is used to perform image analysis on the falling object and obtain the image information of the object; the image recognition module is used to recognize the image information and obtain the shape characteristics and the position of the defective points of the object; the storage module is used to store the preset information and the data during the working process; the controller is used to calculate according to the input data and send control signals to the corresponding modules.
[0078] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A control algorithm for adjusting the air blowing of a spray valve based on the shape and the position of defective points, characterized in that, It includes the following steps: S10: Analyze the image of the falling object through the image analysis module and obtain the image information of the object; S20: Identify the image information through the image recognition module, obtain the shape features of the object and the positions of the defective points, and obtain the positions to be removed of the object and the offset distance of the centroid point relative to the center point of the circumscribed rectangle according to the shape features and the positions of the defective points; S30: Determine the blowing positions of the spray valves according to the positions to be removed and the offset distance, adjust the blowing parameters according to the blowing positions of the spray valves, and perform the removal operation.
2. The control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the bad pixel according to claim 1, wherein: The step S10 includes the following steps: S11: Collect the image of the real-time falling object through the camera module; S12: Preprocess the collected image; S13: Analyze the difference information between the object and the background through the image analysis module, separate the foreground color and the background color, and obtain the image information of the object.
3. The control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the defective pixel according to claim 2, wherein: The preprocessing in the step S12 includes at least: denoising operation of the image, contrast enhancement operation, white balance correction operation.
4. The control algorithm for adjusting the blowing of the spray valve based on the shape and the position of the defective pixel according to claim 1, characterized in that: The step S20 includes the following steps: S21: Obtain the shape features of the object through the edge detection and contour extraction algorithms, and obtain the characteristic parameters of the object according to the shape features; S22: Obtain the positions of the defective points in the object through the color recognition algorithm; S23: Obtain the positions to be removed of the object according to the characteristic parameters of the object and the positions of the defective points in the object; S24: Obtain the coordinates of the centroid point of the object relative to the object, and calculate the offset distance of the centroid point relative to the center point of the circumscribed rectangle.
5. The control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the defective pixel according to claim 4, wherein: The characteristic parameters of the object in the step S23 include at least: the size, area, circumscribed rectangle, center point, perimeter, and curvature of the object.
6. The control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the dead pixel according to claim 4, wherein: The step S30 includes the following steps: S31: Calculate the nozzles in the range where the object is located according to the obtained center point of the circumscribed rectangle and the centroid point coordinates; S32: Obtain the offset amount and the coordinates of the nozzles corresponding to the nozzle action in the horizontal coordinate direction according to the horizontal coordinate direction and the Euclidean distance, determine the spray valves to perform the action according to the preset conditions, and calculate the offset amount of the object in the vertical coordinate direction relative to the nozzles according to the offset amount obtained according to the vertical coordinate direction and the Euclidean distance; S33: Calculate the delay time of the spray valves according to the number of spray valves in the horizontal coordinate direction and the offset amount of the object relative to the nozzles in the vertical coordinate direction; S34: Determine the blowing time according to the type of the defective points or the shape of the object.
7. The control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the defective pixel according to claim 6, wherein: When determining the blowing time in the step S34, it is necessary to dynamically adjust the blowing time to compensate for the errors in the calculation process.
8. The control algorithm for adjusting the air blowing of the spray valve based on the shape and the position of the defective pixel according to claim 7, characterized in that: The compensated blowing time depends on the following formula: T = T0 + M * S + N * W where T is the actual execution time of the spray valve, T0 is the preset basic blowing time of the spray valve, M is the coefficient related to the area and length of the object, S is the area of the object, N is the coefficient related to the curvature of the object, and W is the curvature of the object.
9. A control system for adjusting the air blowing of a spray valve based on the shape and the position of defective points, which operates by using the control algorithm for adjusting the air blowing of a spray valve based on the shape and the position of defective points as described in any one of claims 1-8, characterized in that, It includes: An image acquisition module for collecting the image of the object when it is falling; An image analysis module for analyzing the image of the falling object and obtaining the image information of the object; An image recognition module for identifying the image information and obtaining the shape features of the object and the positions of the defective points; A storage module for storing the preset information and the data during the working process; A controller, which is used to perform calculations based on input data and send control signals to corresponding modules.
10. The control system for adjusting the air blowing of the spray valve based on the shape and the position of the defective pixel according to claim 9, wherein: The image acquisition module continuously captures images of the object during its fall using a high-definition resolution camera.
Citation Information
Cited By
System and method for identifying materials based on 3D
CN121244575A