Equipment and method for treating livestock feed particles

By analyzing the video data of the feed pellet machine, combining the clarity and grayscale differences of boundary pixel points, and adjusting the filter window size, the problems of uneven particle size and poor image quality produced by the feed pellet machine are solved, and more accurate processing quality evaluation and video data clarity improvement are achieved.

CN119648574AActive Publication Date: 2025-03-18SHENZHEN XINJINGYI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510179584.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-03-18
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

When processing forage, the existing feed pellet machines will cause uneven sizes of the processed particles, too rough surfaces, and affect the image quality, which will make it difficult to accurately evaluate the processing quality due to the influence of raw material quality, operating conditions, equipment technical parameters and environmental factors.

Method used

By obtaining the video data of the feed pellet machine discharge port, the motion of the connecting domain and center of mass of the feed pellet in each frame of image is analyzed, and the degree of boundary pixel points is determined by noise is determined, thereby adjusting the filter window size of the bilateral filter, image enhancement, and improving the clarity of the video data.

Benefits of technology

Through image processing technology, the processing quality of the feed pellet machine can be more accurately evaluated, which improves the clarity and accuracy of the video data, and helps optimize the operating status and processing effect of the feed pellet machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648574A_ABST
    Figure CN119648574A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to a device and method for livestock feed particle processing, and the method comprises the steps: obtaining connected domains representing feed particles in each frame of image of video data, and the movement distance and movement direction of the mass center of each connected domain; according to the motion distance and the motion direction of the centroid of the connected domain, determining the clear degree of each connected domain boundary pixel point; the degree of noise influence on noise pixel points and the boundary pixel points of each connected domain is determined by combining the clearness of the boundary pixel points of the connected domain and the gray difference between the boundary pixel points and surrounding pixel points, and the adjustment coefficient of the size of a filtering window of the boundary pixel points of the connected domain is determined according to the degree of noise influence on the boundary pixel points. And determining a final filtering window size according to the adjustment coefficient, and processing the image. According to the invention, by adjusting the size of the filtering window, the effect of denoising the image by using the bilateral filter is improved, and the video quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a device and method for processing livestock feed particles. Background Art

[0002] Animal husbandry material processing equipment plays an important role in modern animal husbandry. They not only improve breeding efficiency, but also contribute to environmental protection and sustainable use of resources. Animal husbandry material processing equipment includes feed pellet machines, feed mixers, automatic feeders, etc. For the animal husbandry industry, if winter comes, sufficient forage must be prepared, but directly storing forage will take up a lot of space, because straw forage is fluffy and takes up a lot of space. If it is not prevented, it will become a breeding ground for rodents, which will spoil the food and spread diseases, which is not worth the loss. The use of feed pellet machines can process and press the forage into pellets, effectively reducing the space occupied by forage. During the use of feed pellet machines, it may be affected by raw material quality, operating conditions, equipment technical parameters, environmental factors, etc., resulting in uneven size of processed particles and too rough particle surface. By obtaining and analyzing the processed feed particle images at the discharge outlet, it can assist in judging the operating status or processing quality of the feed pellet machine.

[0003] When the feed pellet machine is running, there will be some grass dust at the discharge port, which will affect the quality of the acquired image, and the movement speed of the particles is relatively fast. These factors will affect the image quality, especially the inaccurate boundaries of the connected domain representing the feed particles. When using a bilateral filter to denoise the image, the size of the filter window will affect the denoising result of the image, resulting in inaccurate video information, which in turn leads to poor livestock material processing effects. Summary of the invention

[0004] The invention provides a device and a method for processing livestock feed particles to solve the existing problems.

[0005] The device and method for processing livestock feed particles of the present invention adopt the following technical scheme: One embodiment of the present invention provides a method for processing livestock feed pellets, the method comprising the following steps: Get video data of the feed pellet machine outlet; Obtain the connected domains representing feed particles in each frame of the video data and the movement distance and movement direction of the centroid of each connected domain; determine the clarity of the boundary pixels of each connected domain according to the movement distance and movement direction of the centroid of the connected domain; determine the degree to which the boundary pixels of each connected domain are affected by noise by combining the clarity of the boundary pixels of the connected domain and the grayscale difference between the boundary pixels and the surrounding pixels; According to the degree of influence of noise on the boundary pixels, the adjustment coefficient of the filter window size of the connected domain boundary pixels is determined. According to the adjustment coefficient of the filter window size, the final filter window size is determined, and each frame of the image is enhanced to obtain the enhanced video data of the feed pellet machine outlet.

[0006] Furthermore, the specific calculation method of the clarity of the boundary pixel points of each connected domain is as follows: In the formula, Indicates Frame image The first connected domain The clarity of the boundary pixels; Indicates Frame image The movement direction of the centroid of the connected domain is The centroid of the a-th connected domain to the a-th connected domain The minimum angle between the squares of the boundary pixels; Indicates Frame image The moving direction of the centroid of the connected domain is Frame image and The minimum angle in the frame image; Indicates Frame image The movement distance of the centroid of a connected domain; is the default value; Represents an exponential function with a natural constant as base.

[0007] Furthermore, the specific method of determining the degree to which the boundary pixels of each connected domain are affected by noise is as follows: Get the The minimum circumscribed rectangle of a connected domain, according to The clarity of each boundary pixel point of the connected domain and the distance from each boundary pixel point to the corresponding side of the minimum circumscribed rectangle of the connected domain are calculated for the first The minimum circumscribed rectangle of the connected domain is expanded to obtain the Update rectangles of connected domains; According to The grayscale difference between each pixel and the surrounding pixels in the update rectangle of the connected domain is used to determine the The initial possibility that each pixel in the update rectangle of the connected domain belongs to the noise; According to The initial possibility that each pixel in the update rectangle of the connected domain belongs to the noise is determined to determine the noise pixel; According to The number of noise pixels in the update rectangle of the connected domain and the area of ​​the update rectangle are obtained. The dust concentration in the updated rectangle of the connected domain; Get the The noise pixels in the update rectangle of the connected domain are The distance between the boundary pixels of the connected domain and the The dust concentration in the updated rectangle of the connected domain, The initial possibility that the pixels in the updated rectangle of the connected domain belong to the noise is determined to determine the extent to which the boundary pixels are affected by the noise.

[0008] Furthermore, the The minimum circumscribed rectangle of the connected domain is expanded to obtain the The updated rectangle of a connected domain includes the following specific methods: No. The extension distance of each side of the minimum circumscribed rectangle of a connected domain is expressed as: In the formula, Indicates The extension distance of the first side of the minimum circumscribed rectangle of a connected domain; Indicates The number of boundary pixels of a connected domain; Indicates The first connected domain From the boundary pixel to the The shortest distance of the first side of the minimum circumscribed rectangle of a connected domain; Indicates The first connected domain The clarity of the boundary pixels; Indicates the preset The basic distance for the extension of the first side of the minimum circumscribed rectangle of a connected domain; represents the linear normalization function; Indicates rounding down; According to the above formula, we can get The expansion distance of each side of the minimum circumscribed rectangle of the connected domain is calculated, and the first Each side of the minimum circumscribed rectangle of the connected domain is extended, and the rectangle formed by extending each extended side is recorded as The updated rectangle of the connected component.

[0009] Furthermore, the specific method of determining the noise pixel point includes: Set the Each pixel in the update rectangle of the connected domain is the center and the size is The window as the first The grayscale contrast range of each pixel in the update rectangle of the connected domain; Get the The update rectangle of the connected domain The grayscale difference between a pixel and all the pixels in its grayscale comparison range is sorted by size, and the smallest pixel with the preset number threshold is selected. The mean of the values ​​is denoted as ,use Indicates The update rectangle of the connected domain The initial possibility that a pixel belongs to noise is When the normalized value of is greater than a preset threshold, the Pixels are recorded as noise pixels.

[0010] Further, the obtaining The dust concentration in the updated rectangle of a connected domain is calculated, including the following specific methods: According to The number of noise pixels in the update rectangle of the connected domain and the The area of ​​the update rectangle of the connected domain determines the The dust concentration in the updated rectangle of the connected domain is The area of ​​the updated rectangle of the connected domain is equal to the area of ​​the The dust concentration in the updated rectangle of the connected domain is inversely proportional.

[0011] Furthermore, the specific calculation method for determining the degree to which the boundary pixel point is affected by noise is: In the formula, Indicates The first connected domain The degree to which each boundary pixel is affected by noise; Indicates The dust concentration in the updated rectangle of the connected domain; Indicates The number of noise pixels in the update rectangle of the connected domain; Indicates The update rectangle of the connected domain The initial probability that the pixel belongs to noise; Indicates The update rectangle of the connected domain Noise pixels to The distance between the boundary pixels; No. The first connected domain The initial possibility that the boundary pixels belong to noise; represents the linear normalization function.

[0012] Furthermore, the specific calculation method of the adjustment coefficient of the filter window size of the connected domain boundary pixel point is: In the formula, Indicates The first connected domain The adjustment coefficient of the filter window size for each boundary pixel; Indicates The first connected domain The clarity of the boundary pixels; Indicates The first connected domain The degree to which the boundary pixels are affected by noise.

[0013] Furthermore, the final filtering window size is determined by: According to The first connected domain The adjustment coefficient of the filter window size of the boundary pixel point is determined The adjustment value of the filter window for each boundary pixel on the connected domain and the size of the final filter window; When The first connected domain When the adjustment value of the filter window of the boundary pixel is an even number, the size of the final filter window is expressed as: When The first connected domain When the adjustment value of the filter window of the boundary pixel point is an odd number, the size of the final filter window is expressed as: In the formula, Indicates The first connected domain The filter window size for each boundary pixel; Indicates The first connected domain The adjustment coefficient of the filter window size for each boundary pixel; Indicates The first connected domain The adjustment value of the filter window of the boundary pixel points; Indicates the minimum side length of the preset filtering window; Indicates the preset original filter window size using bilateral filter; Indicates rounding down.

[0014] A device for processing livestock feed particles, the device comprising an image processor and a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any one of the methods for processing livestock feed particles are implemented.

[0015] The beneficial effects of the technical solution of the present invention are as follows: according to the movement distance and movement direction of the centroid of the connected domain, the clarity of the boundary pixels of each connected domain is determined, and the influence of noise on the boundary pixels can be determined. Combined with the clarity of the boundary pixels of the connected domain and the grayscale difference between the boundary pixels and the surrounding pixels, the degree to which the boundary pixels of each connected domain are affected by noise is determined, which helps to determine the adjustment coefficient of the filter window size of the boundary pixels of the connected domain. According to the degree of influence of noise and the clarity of the boundary pixels, the adjustment coefficient of the filter window size of the boundary pixels is determined, thereby determining the final filter window size, enhancing each frame of the image, and obtaining clearer video data of the feed pellet machine outlet after enhancement. The enhanced video data can provide better support and assistance for the evaluation of the processing quality of the feed pellet machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 The present invention is a flowchart of the steps of a method for processing livestock feed pellets. DETAILED DESCRIPTION

[0018] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the equipment and method for livestock feed pellet processing proposed by the present invention, its specific implementation, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0019] 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.

[0020] The specific scheme of the method for processing livestock feed particles provided by the present invention is described in detail below with reference to the accompanying drawings.

[0021] See also Figure 1 , which shows a flow chart of a method for processing livestock feed pellets provided by one embodiment of the present invention, the method comprising the following steps: Step S001: Acquire video data of the feed pellet machine outlet.

[0022] It should be noted that in order to analyze the feed pellet image, it is first necessary to obtain the video data of the feed pellet machine outlet.

[0023] Specifically, the specific process of obtaining the video data of the feed pellet machine discharge port is as follows: install a camera at the upper end of the feed pellet machine discharge port, shoot the movement of feed particles at the discharge outlet within a period of time after the feed pellet machine starts running, and adjust the angle to ensure that the camera can capture the movement of all particles at the feed pellet machine discharge port, and transmit the captured video data to the data center. Each shooting lasts 15 minutes.

[0024] It should be noted that the shooting duration can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0025] So far, the video data of the feed pellet machine outlet is obtained through the above method.

[0026] Step S002: Obtain the connected domain representing the feed particles in each frame of the video data and the movement distance and movement direction of the centroid of each connected domain; determine the clarity of the boundary pixels of each connected domain according to the movement distance and movement direction of the centroid of the connected domain; and determine the degree to which the boundary pixels of each connected domain are affected by noise in combination with the clarity of the boundary pixels of the connected domain and the grayscale difference between the boundary pixels and the surrounding pixels.

[0027] It should be noted that when using a bilateral filter to denoise each frame of an image, the size of the filter window will affect the denoising result and image details. A larger filter window can contain more neighborhood pixels and can better remove noise, but for small textures and edges, over-smoothing will occur, causing loss of image details. A smaller filter window can better retain image details and textures, but it cannot denoise well. Since there will be feed particles in motion in each frame of the video data, and the movement of the feed particles will produce blurred trajectories, and some dust carried on the surface of the feed particles will float at the discharge port, resulting in different importance of pixels at different positions in the image, so it is necessary to adjust the filter window size of the bilateral filter according to the clarity of the boundary pixels of different connected domains to improve the image denoising effect.

[0028] Step (2.1), obtaining the connected domain representing the feed particles in each frame of the video data and the movement distance and movement direction of the centroid of each connected domain.

[0029] Specifically, for each frame of the acquired video data, a segmentation neural network is used to identify the background area and feed particles in each frame of the video data of the feed pellet machine outlet, and obtain connected domains representing feed particles in different frame images.

[0030] The relevant content of the segmentation neural network is as follows: The segmentation neural network used in this embodiment is the Mask R-CNN neural network; the data set used is each frame of the video data of the feed pellet machine outlet. Mask R-CNN is a well-known technology, and the specific method is not introduced here. The full name of Mask R-CNN in Chinese is "Mask Region-based Convolutional Neural Network", and the full name in English is "Mask Region-based Convolutional Neural Network".

[0031] The pixels that need to be segmented are divided into two categories, that is, the labeling process of the training set is as follows: single-channel semantic label, the corresponding position pixel belongs to the background area is labeled as 0, and the connected domain belonging to the feed particle is labeled as 1.

[0032] The task of the network is classification, so the loss function used is the cross entropy loss function.

[0033] The background area and the feed particle connected area in the enhanced image are obtained by segmentation neural network. This process is a well-known technology and the specific method will not be introduced here.

[0034] Because of the influence of particle movement speed and dust at the discharge port, the connected domain boundary of the obtained feed particles will not be completely accurate. Therefore, for each connected domain, its center of mass is obtained, and the CamShift algorithm (Continuously Adaptive Mean-Shift) is used to track each center of mass to obtain the movement distance and direction of each center of mass. This is a well-known technology.

[0035] The specific method for obtaining the moving distance and moving direction of each centroid is: taking the position coordinates of the centroid of the connected domain of the same feed particle from the first Frame image to The distance and direction of the frame image are used as the The movement distance and direction of the centroid of the connected domain in the frame image.

[0036] It should be noted that when the connected domain of feed particles is When the connected domain does not exist in the frame, the connected domain is not analyzed, and the information of the connected domain can be obtained in other frame images of the video data.

[0037] Step (2.2), according to the movement distance and movement direction of the centroid of the connected domain, determine the clarity of each connected domain boundary pixel.

[0038] It should be noted that in the process of feed particle movement, due to its fast movement speed, a blurred trajectory generated by the movement of feed particles will appear in each frame of the acquired particle movement video. The blurred trajectory will also show different degrees of blur due to the movement of the particles. At the front end of the movement direction, the particles first arrive and begin to leave traces on the image. At this time, due to the initial contact and because the particles instantly reach the initial position of the field of view, it is more likely to form a clear edge, that is, a strong edge; at the back end of the movement direction, the particles may have stayed at this position for a period of time before leaving, so the trajectory will become blurred due to the continuous movement of the particles, that is, a weak edge. At the discharge port, the feed particles will collide with each other during the movement, thereby changing the movement trajectory and direction of the feed particles. When the movement direction of the feed particles changes greatly, the movement trajectory will also change greatly, resulting in an increase in the degree of motion blur in the image. Therefore, according to the movement characteristics of the feed particles at the discharge port, the clarity of each boundary pixel on the connected domain is determined.

[0039] Specifically, Frame image as an example, according to The frame image The direction of motion of the centroid of the connected domain, The frame image The centroid of the connected domain to the The first connected domain The direction of the boundary pixel, The moving direction of the centroid of the connected domain is Frame image and The minimum angle in the frame image, The centroid of the connected domain is Frame and The movement distance of the frame is determined Frame image The first connected domain The clarity of the boundary pixels.

[0040] As an example, Frame image The first connected domain The clarity of the boundary pixels can be expressed as: In the formula, Indicates Frame image The first connected domain The clarity of the boundary pixels; Indicates Frame image The movement direction of the centroid of the connected domain is The centroid of the connected domain to the The first connected domain The minimum angle between the directions of the boundary pixels; Indicates Frame image The moving direction of the centroid of the connected domain is Frame image and The minimum angle in the frame image; Indicates Frame image The movement distance of the centroid of a connected domain; is the default value; Represents an exponential function with a natural constant as base.

[0041] It should be noted that according to the characteristics of motion blur, The smaller the value, the Frame image The first connected domain The greater the clarity of the boundary pixels, the smaller the clarity; The smaller the value, the Frame image The first connected domain The smaller the change in the motion direction of the first boundary pixel, the The smaller the change in the motion direction of the connected domain is, the clearer the pixel point is. The larger the value of .

[0042] It should be noted that this embodiment The value is 180, which can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0043] Step (2.3) combines the clarity of the connected domain boundary pixels and the grayscale difference between the boundary pixels and the surrounding pixels to determine the degree to which the boundary pixels of each connected domain are affected by noise.

[0044] It should be noted that the clarity of the connected domain boundary pixels determined according to the movement direction characteristics of the connected domain centroid only takes into account the movement of the feed particles. However, at the discharge port of the feed pellet machine, there will be floating feed particle surface and unprocessed feed dust, which will also affect the clarity of the connected domain boundary pixels in the image. Therefore, it is necessary to determine the impact of dust on the clarity of the connected domain boundary pixels.

[0045] Specifically, The first Take the connected domain as an example, first, get the The minimum circumscribed rectangle of a connected domain, according to The clarity of each boundary pixel point of the connected domain and the distance from each boundary pixel point to the corresponding side of the minimum circumscribed rectangle of the connected domain are calculated for the first The minimum circumscribed rectangle of the connected domain is expanded to obtain the The updated rectangle of the connected region.

[0046] No. The extension distance of each side of the minimum circumscribed rectangle of a connected domain can be expressed as: In the formula, Indicates The extension distance of the first side of the minimum circumscribed rectangle of a connected domain; Indicates The number of boundary pixels of a connected domain; Indicates The first connected domain From the boundary pixel to the The shortest distance of the first side of the minimum circumscribed rectangle of a connected domain; Indicates The first connected domain The clarity of the boundary pixels; Indicates the preset The basic distance for the extension of the first side of the minimum circumscribed rectangle of a connected domain; Represents a linear normalization function, which is used to normalize the data values ​​to scope; Indicates rounding down.

[0047] It should be noted that this embodiment The value of is 5, which can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0048] It should be noted that The first connected domain The smaller the clarity of the boundary pixels, The smaller the value of is, the more blurred the boundary pixel point is, and the larger the extension distance of the minimum circumscribed rectangle side corresponding to the boundary pixel point should be. The first connected domain From the boundary pixel to the The smaller the distance between the first side of the minimum circumscribed rectangle of a connected domain, that is, The smaller the value of , the larger the extension distance of the minimum circumscribed rectangle corresponding to the boundary pixel point should be, corresponding to The larger the value of The value is rounded down.

[0049] According to the above formula, we can get The expansion distance of each side of the minimum circumscribed rectangle of the connected domain is calculated, and the first Each side of the minimum circumscribed rectangle of the connected domain is extended, and the rectangle formed by extending each extended side is recorded as The updated rectangle of the connected component.

[0050] Then, set the Each pixel in the update rectangle of the connected domain is the center and the size is The window as the first The grayscale contrast range of each pixel in the update rectangle of the connected domain is determined, and the The grayscale difference between each pixel in the update rectangle of a connected domain and all the pixels in its grayscale comparison range.

[0051] It should be noted that is the preset window side length. The value of is 5, which can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0052] No. The update rectangle of the connected domain The pixel point and its grayscale comparison range The grayscale difference of pixels can be expressed as: In the formula, Indicates The update rectangle of the connected domain The pixel point and its grayscale comparison range Grayscale difference of pixels; Indicates The update rectangle of the connected domain The gray value of each pixel; Indicates The update rectangle of the connected domain The grayscale contrast range of the pixel The gray value of each pixel; Indicates taking the absolute value.

[0053] It should be noted that the greater the grayscale difference between the boundary pixel and each pixel in the grayscale comparison range, that is, The larger the value of , the greater the grayscale difference between the pixel and its surrounding pixels, and the greater the possibility that the boundary pixel belongs to noise.

[0054] Get the The update rectangle of the connected domain The grayscale difference between a pixel and all pixels in its grayscale comparison range is sorted by size and the smallest pixel is selected. The mean of the values ​​is denoted as ,use Indicates The update rectangle of the connected domain The initial probability that a pixel belongs to noise.

[0055] It should be noted that is a preset quantity threshold. The value of is 5, which can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0056] It should be noted that the grayscale difference between noise pixels and surrounding pixels is large, while the grayscale values ​​of non-noise pixels and some of their surrounding pixels are similar and the difference is small. The larger the value of The update rectangle of the connected domain The more pixels there are, the more likely they are noise pixels.

[0057] use The normalization function will The value is normalized to Within the range, The update rectangle of the connected domain The normalized value of is greater than the preset threshold The pixels are recorded as noise pixels.

[0058] It should be noted that this embodiment The value of is 0.6, which can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0059] From this we get The number of noise pixels in the rectangle is updated by the connected domain, according to The number of noise pixels in the update rectangle of the connected domain and the area of ​​the update rectangle are determined. The dust concentration within the updated rectangle of the connected domain.

[0060] No. The dust concentration within the updated rectangle of a connected domain can be expressed as: In the formula, Indicates The dust concentration in the updated rectangle of the connected domain; Indicates The number of noise pixels in the update rectangle of the connected domain; Indicates The area of ​​the updated rectangle of the connected component.

[0061] It should be noted that When the area of ​​the update rectangle of a connected domain is constant, the more noise pixels there are, The larger the The larger the dust concentration in the updated rectangle of the connected domain, the greater the dust concentration in the updated rectangle.

[0062] Then, get the Each noise pixel in the update rectangle of the connected domain is updated to the The first connected domain The distance between the boundary pixels is Each noise pixel in the update rectangle of the connected domain is updated to the The first connected domain The distance between the boundary pixels, The dust concentration in the updated rectangle of the connected domain, The initial possibility that the pixel points in the update rectangle of the connected domain belong to the noise is determined. The first connected domain The degree to which the boundary pixels are affected by noise.

[0063] No. The first connected domain The degree to which a boundary pixel is affected by noise can be expressed as: In the formula, Indicates The first connected domain The degree to which each boundary pixel is affected by noise; Indicates The dust concentration in the updated rectangle of the connected domain; Indicates The number of noise pixels in the update rectangle of the connected domain; Indicates The update rectangle of the connected domain The initial probability that the pixel belongs to noise; Indicates The update rectangle of the connected domain Noise pixels to The distance between the boundary pixels; No. The first connected domain The initial possibility that the boundary pixels belong to noise; Represents a linear normalization function, which is used to normalize the data values ​​to scope.

[0064] It should be noted that Indicates All noise pixels in the update rectangle of the connected domain are The first connected domain The correlation degree of the boundary pixels is The larger the value, the All noise pixels in the update rectangle of the connected domain are The more relevant the boundary pixels are, the The greater the degree to which the boundary pixel is affected by noise, the The larger the value of .

[0065] So far, the degree to which the boundary pixels of the connected domain are affected by noise is obtained through the above method.

[0066] Step S003: According to the degree to which the boundary pixels are affected by noise, the adjustment coefficient of the filter window size of the connected domain boundary pixels is determined, and the final filter window size is determined according to the adjustment coefficient of the filter window size, and each frame of the image is enhanced to obtain the enhanced video data of the feed pellet machine outlet.

[0067] Firstly, the adjustment coefficient of the filter window size of the connected domain boundary pixel points is determined according to the degree to which each boundary pixel point of the connected domain is affected by noise and the clarity.

[0068] No. The first connected domain The adjustment coefficient of the filter window size for each boundary pixel can be expressed as: In the formula, Indicates The first connected domain The adjustment coefficient of the filter window size for each boundary pixel; Indicates The first connected domain The clarity of the boundary pixels; Indicates The first connected domain The degree to which the boundary pixels are affected by noise.

[0069] It should be noted that the clearer the pixel points on the boundary of the connected domain are, the more likely they are pixels on a strong edge. Conversely, the more likely they are pixels on a weak edge. For pixels on a strong edge, a smaller filter window should be assigned to better preserve the clarity and details of the connected domain boundary. Therefore, the adjustment coefficient of the filter window should be smaller, that is, The value of is small. On the contrary, for the pixel points on the weak edge, a larger filter window should be assigned, corresponding to the larger filter window size adjustment coefficient. According to the above formula, the clarity of each boundary image on each connected domain after point correction is obtained.

[0070] Then, according to the adjustment coefficient of the filter window size of each boundary pixel point on the connected domain, the adjustment value of the filter window of each boundary pixel point on the connected domain and the size of the final filter window are determined.

[0071] Specifically, when The first connected domain When the adjustment value of the filter window of the boundary pixel is an even number, the size of the final filter window can be expressed as: When The first connected domain When the adjustment value of the filter window of the boundary pixel point is an odd number, the size of the final filter window can be expressed as: In the formula, Indicates The first connected domain The filter window size for each boundary pixel; Indicates The first connected domain The adjustment coefficient of the filter window size for each boundary pixel; Indicates The first connected domain The adjustment value of the filter window of the boundary pixel points; Indicates the minimum side length of the preset filtering window; Indicates the preset original filter window size using bilateral filter; Indicates rounding down.

[0072] It should be noted that this embodiment The value of is 3. The value of is 9, which can be adjusted according to actual conditions and is not specifically limited in this embodiment.

[0073] It should be noted that the clearer the boundary pixel is, the stronger the pixel is on the edge, and vice versa. For the pixel on the strong edge, a larger filtering window should be given to it to better preserve the edge clarity and details; for the pixel on the weak edge, more delicate processing is required, so it is more effective to use a smaller window, because this can reduce the over-smoothing of the edge and make the edge more obvious; because the size of the filtering window must be an odd integer, so for Round down, and if the number is even, increase its size by 1 to make it an odd number.

[0074] From this we get The first connected domain filter window of boundary pixels For all non-boundary pixels in the image, the original filter window with a preset size of 9*9 continues to be used without adjustment.

[0075] According to the above steps, the filter window size of all pixels in each frame of the obtained video is obtained and each frame of the image is denoised. A video encoder is used to encode each processed frame of the image into a video format, thereby obtaining video data with higher definition.

[0076] It should be noted that in all the above formulas, when the denominator is 0, the denominator is set to 1.

[0077] Through the above steps, the enhancement of the video image of the feed pellet machine discharge port is completed, and the enhanced video image of the feed pellet machine discharge port is used to assist in judging the processing quality of the processed feed pellets.

[0078] Specifically: Based on the enhanced video image of the feed pellet machine discharge port, a PLC controller is used to automatically adjust the discharge parameters according to the results of real-time monitoring to ensure that the quality of the feed pellets meets the requirements.

[0079] One embodiment of the present invention also provides a device for processing livestock feed particles, which includes an image processor and a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for processing livestock feed particles as described in steps S001 to S003 are implemented.

[0080] This embodiment determines the clarity of each connected domain boundary pixel point based on the movement distance and movement direction of the connected domain centroid, and can determine the influence of noise on the boundary pixel points. Combined with the clarity of the connected domain boundary pixel points and the grayscale difference between the boundary pixel points and the surrounding pixels, the degree to which the boundary pixel points of each connected domain are affected by noise is determined, which helps to correct the clarity of the boundary pixel points. According to the influence of noise on the boundary pixel points, the final clarity of the connected domain boundary pixel points after correction is determined, and the final filter window size is determined according to the final clarity. Each frame of the image is enhanced to obtain clearer video data of the feed pellet machine outlet after enhancement. The enhanced video data can provide better support and assistance for the evaluation of the processing quality of the feed pellet machine.

[0081] It should be noted that the The model is only used to represent negative correlation and constrain the output of the model to be in In the specific implementation, it can be replaced by other models with the same purpose. This embodiment is only based on The model is described as an example without any specific limitation. is the input to the model.

[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for processing livestock feed particles, characterized in that: The method comprises the following steps: Get video data of the feed pellet machine outlet; Obtain the connected domains representing feed particles in each frame of the video data and the movement distance and movement direction of the centroid of each connected domain; determine the clarity of the boundary pixels of each connected domain according to the movement distance and movement direction of the centroid of the connected domain; determine the degree to which the boundary pixels of each connected domain are affected by noise by combining the clarity of the boundary pixels of the connected domain and the grayscale difference between the boundary pixels and the surrounding pixels; According to the degree of influence of noise on the boundary pixels, the adjustment coefficient of the filter window size of the connected domain boundary pixels is determined. According to the adjustment coefficient of the filter window size, the final filter window size is determined, and each frame of the image is enhanced to obtain the enhanced video data of the feed pellet machine outlet.

2. A method for processing livestock feed particles according to claim 1, characterized in that: The specific calculation method of the clarity of the pixel points at the boundary of each connected domain is: In the formula, Indicates Frame image The first connected domain The clarity of the boundary pixels; Indicates Frame image The movement direction of the centroid of the connected domain is The centroid of the a-th connected domain to the a-th connected domain The minimum angle between the squares of the boundary pixels; Indicates Frame image The moving direction of the centroid of the connected domain is Frame image and The minimum angle in the frame image; Indicates Frame image The movement distance of the centroid of a connected domain; is the default value; Represents an exponential function with a natural constant as base.

3. A method for processing livestock feed particles according to claim 1, characterized in that: The specific method of determining the degree to which the boundary pixels of each connected domain are affected by noise is as follows: Get the The minimum circumscribed rectangle of a connected domain, according to The clarity of each boundary pixel point of the connected domain and the distance from each boundary pixel point to the corresponding side of the minimum circumscribed rectangle of the connected domain are calculated for the first The minimum circumscribed rectangle of the connected domain is expanded to obtain the Update rectangles of connected domains; According to The grayscale difference between each pixel and the surrounding pixels in the update rectangle of the connected domain is used to determine the The initial possibility that each pixel in the update rectangle of the connected domain belongs to the noise; According to The initial possibility that each pixel in the update rectangle of the connected domain belongs to the noise is determined to determine the noise pixel; According to The number of noise pixels in the update rectangle of the connected domain and the area of ​​the update rectangle are obtained. The dust concentration in the updated rectangle of the connected domain; Get the The noise pixels in the update rectangle of the connected domain are The distance between the boundary pixels of the connected domain and the The dust concentration in the updated rectangle of the connected domain, The initial possibility that the pixels in the updated rectangle of the connected domain belong to the noise is determined to determine the extent to which the boundary pixels are affected by the noise.

4. A method for processing livestock feed particles according to claim 3, characterized in that: The said The minimum circumscribed rectangle of the connected domain is expanded to obtain the The updated rectangle of a connected domain includes the following specific methods: No. The extension distance of each side of the minimum circumscribed rectangle of a connected domain is expressed as: In the formula, Indicates The extension distance of the first side of the minimum circumscribed rectangle of a connected domain; Indicates The number of boundary pixels of a connected domain; Indicates The first connected domain From the boundary pixel to the The shortest distance of the first side of the minimum circumscribed rectangle of a connected domain; Indicates The first connected domain The clarity of the boundary pixels; Indicates the preset The basic distance for the extension of the first side of the minimum circumscribed rectangle of a connected domain; represents the linear normalization function; Indicates rounding down; According to the above formula, we can get The expansion distance of each side of the minimum circumscribed rectangle of the connected domain is calculated, and the first Each side of the minimum circumscribed rectangle of the connected domain is extended, and the rectangle formed by extending each extended side is recorded as The updated rectangle of the connected component.

5. A method for processing livestock feed particles according to claim 3, characterized in that: The specific method of determining the noise pixel point includes: Set the Each pixel in the update rectangle of the connected domain is the center and the size is The window as the first The grayscale contrast range of each pixel in the update rectangle of the connected domain; Get the The update rectangle of the connected domain The grayscale difference between a pixel and all pixels in its grayscale comparison range is sorted by size, and the mean of the minimum grayscale difference of the preset number threshold is taken, which is recorded as ,use Indicates The update rectangle of the connected domain The initial possibility that a pixel belongs to noise is When the normalized value of is greater than a preset threshold, the Pixels are recorded as noise pixels.

6. A method for processing livestock feed particles according to claim 3, characterized in that: The acquisition The dust concentration in the updated rectangle of a connected domain is calculated, including the following specific methods: According to The number of noise pixels in the update rectangle of the connected domain and the The area of ​​the update rectangle of the connected domain determines the The dust concentration in the updated rectangle of the connected domain is The area of ​​the updated rectangle of the connected domain is equal to the area of ​​the The dust concentration in the updated rectangle of the connected domain is inversely proportional.

7. A method for processing livestock feed particles according to claim 3, characterized in that: The specific calculation method for determining the degree to which the boundary pixel point is affected by noise is: In the formula, Indicates The first connected domain The degree to which each boundary pixel is affected by noise; Indicates The dust concentration in the updated rectangle of the connected domain; Indicates The number of noise pixels in the update rectangle of the connected domain; Indicates The update rectangle of the connected domain The initial probability that the pixel belongs to noise; Indicates The update rectangle of the connected domain Noise pixels to The distance between the boundary pixels; No. The first connected domain The initial possibility that the boundary pixels belong to noise; represents the linear normalization function.

8. A method for processing livestock feed particles according to claim 1, characterized in that: The specific calculation method of the adjustment coefficient of the filter window size of the connected domain boundary pixel point is: In the formula, Indicates The first connected domain The adjustment coefficient of the filter window size for each boundary pixel; Indicates The first connected domain The clarity of the boundary pixels; Indicates The first connected domain The degree to which the boundary pixels are affected by noise.

9. A method for processing livestock feed particles according to claim 1, characterized in that: The specific method of determining the final filtering window size includes: According to The first connected domain The adjustment coefficient of the filter window size of the boundary pixel point is determined The adjustment value of the filter window for each boundary pixel on the connected domain and the size of the final filter window; When The first connected domain When the adjustment value of the filter window of the boundary pixel is an even number, the size of the final filter window is expressed as: When The first connected domain When the adjustment value of the filter window of the boundary pixel point is an odd number, the size of the final filter window is expressed as: In the formula, Indicates The first connected domain The filter window size for each boundary pixel; Indicates The first connected domain The adjustment coefficient of the filter window size for each boundary pixel; Indicates The first connected domain The adjustment value of the filter window of the boundary pixel points; Indicates the minimum side length of the preset filtering window; Indicates the preset original filter window size using bilateral filter; Indicates rounding down.

10. A device for processing livestock feed particles, comprising an image processor, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of a method for processing livestock feed particles as described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Freight train model judgment method based on image feature analysis

    CN117542003A

  • Intelligent image denoising method based on sensor

    CN117994154A

  • Method for acquiring clear image, device, medium and mobile terminal

    WO2024159969A1