Grain surface roughening method, grain surface smoothing method and grain smoothing system
By constructing a depth matrix using a depth camera and planning multi-level paths using a genetic algorithm, the problem of low autonomy of the grain leveling robot in large, irregular grain silos was solved, achieving precise leveling of the grain surface and efficient operation.
Patent Information
- Application Number
- CN202310943249.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-07-28
AI Technical Summary
Existing grain leveling robots lack autonomy and work efficiency in large, irregular grain silos. Furthermore, manual remote control can easily lead to repetitive tasks and unnecessary movements, making it impossible to accurately level the grain surface.
A depth camera is used to acquire images of the grain silo, a depth matrix is constructed, a multi-level path is planned using a genetic algorithm, H region and L region are divided, the grain leveling path is determined based on the genetic algorithm, and the grain surface is accurately leveled through multi-level path planning.
It improves the autonomy and efficiency of grain surface leveling, reduces manual intervention, enables precise operation of grain surfaces in grain warehouses, and reduces labor intensity and costs.
Smart Images

Figure CN117401469B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of grain leveling technology, and particularly to a method for rough leveling of grain surfaces, a method for leveling grain surfaces, and a grain leveling system. Background Technology
[0002] Grain storage is a crucial component of grain circulation, and grain storage technology has a significant impact on the quality and quantity of food. Currently, grain warehouse management in China faces extensive management practices, characterized by poor conditions, low-quality personnel, and a lack of scientific and technological content. Further improving grain reserve conditions and ensuring the construction of a green and scientific grain reserve system are essential to guaranteeing the safe storage and quality of food. In recent years, grain storage warehouses have become increasingly larger, with thicker grain layers inside. However, the leveling work in my country's grain storage industry still largely relies on manual labor. This is not only slow and labor-intensive, but also largely repetitive. The warehouses are dusty, and when localized grain heating or abnormalities occur, deep excavation and leveling are necessary. If this also relies on manual labor, the work is unsafe, physically demanding, and extremely inefficient.
[0003] Currently, there are relatively few robots used for grain leveling both domestically and internationally. They can be broadly categorized into three types: fixed, mobile, and hybrid. Fixed robots typically operate on the top of grain silos. For example, gantry-type grain leveling robots are highly efficient and produce high-quality work, but some corners are blind spots. Mobile robots are small and relatively flexible, but their work efficiency is low, and they are prone to tipping over and crushing grain. Hybrid robots combine the advantages of both types to achieve complementary benefits, but they face challenges in task allocation, information transmission, and collaborative work. Currently, grain leveling robots share common problems that urgently need to be addressed: quantifying the robot's work objectives and planning its work path. These two issues result in a low degree of autonomy for the robots during grain leveling operations.
[0004] Currently, both manual remote-controlled robots and full-coverage operation methods are required. The former involves workers observing and then remotely controlling the robot, but due to human bias, the flatness of the grain surface cannot be guaranteed, leading to repetitive work. The latter also requires manual control of the robot's descent height, and if a full-coverage path is used throughout the entire operation, there will be a large amount of unnecessary travel, significantly reducing work efficiency. Summary of the Invention
[0005] The main objective of this invention is to provide a method for coarsely leveling grain surfaces, specifically for large, irregularly shaped grain silos. This method enables precise grain silo operations, improves the autonomy of the leveling device, and enhances the efficiency of grain leveling operations.
[0006] To achieve the above objectives, the present invention proposes a method for rough leveling of grain surface, which guides a grain leveling device to level the top surface of grain in a grain silo. The method for rough leveling of grain surface includes the following steps:
[0007] S100, acquire the image of the grain warehouse and construct the depth matrix M;
[0008] S200, calculate the target leveling height h based on the depth matrix M. m ;
[0009] S300, based on the target grain leveling height, the depth matrix M is divided into multiple L regions and multiple H regions, wherein each element in the L region is adjacent and its depth is greater than the target grain leveling height h. m Within region H, all elements are adjacent and their depth is less than the target grain leveling height h. m ;
[0010] S400, based on a genetic algorithm, plans the sequential leveling order of multiple H regions and records it as a first-level leveling path;
[0011] S500: Based on the element information of each H region and each L region, establish a one-to-one flattening relationship between each H region and each L region.
[0012] S600, based on the coordinate information of the corresponding H and L regions, determines the secondary leveling path of the corresponding H and L regions;
[0013] S700, insert multiple secondary leveling paths into the primary leveling path to obtain a total leveling path;
[0014] S800, level the grain according to the total leveling path.
[0015] Optionally, step S300 specifically includes:
[0016] S310, select all values in the depth matrix M that are less than or greater than the target leveling height h. m The elements are assigned the value 1, and the rest are assigned the value 0;
[0017] S320, Create a matrix XY to record the coordinates of the elements with a value of 1 in the depth matrix M;
[0018] S330, determine whether matrix XY is an empty matrix;
[0019] S340, if yes, then the region division ends; otherwise, construct H region or L region for region division.
[0020] Optionally, the specific steps for constructing the H region or L region for region division in step S340 include:
[0021] S341, Create the i-th H-region or L-region matrix;
[0022] S342, extract the coordinates of the first point A in matrix XY, and change the value of point A in M to 0;
[0023] S343, take the j-th neighboring point of input coordinate A, and determine whether the value of the j-th neighboring point in M is 1. If yes, go to step S344; otherwise, go to step S345.
[0024] S344, record the j-th adjacent point in the i-th region matrix, change the value of the adjacent point in M to 0, establish matrix G to store the value of j and the coordinates of A, take the j-th adjacent point to replace A, set j=1, and go to step S343;
[0025] S345, let j = j + 1, determine whether j is greater than the preset total number of adjacent points. If yes, go to step S346; otherwise, go to step S343.
[0026] S346, determine whether G is empty. If it is, let i = i + 1 and go to step S330. If not, go to step S347.
[0027] S347, replace A with the coordinates stored in the last row of matrix G, replace j with the stored j value, delete the last row of matrix G, and go to step S343.
[0028] Optionally, step S500 specifically includes:
[0029] S510, obtain the minimum value of each of the m H regions, and establish the min_H matrix;
[0030] S520: Obtain the maximum value of each of the n L regions and construct the max_L matrix;
[0031] S530, take the first coordinate of the record in the i-th row of the min_H matrix;
[0032] S540, take the second coordinate of the record in the j-th row of the max_L matrix;
[0033] S550, obtain the distance D between the first coordinate and the second coordinate, and record D in the i-th row and j-th column of the distance matrix;
[0034] S560, determine if j is equal to n. If yes, go to step S570. If no, let j = j + 1 and go to step S540.
[0035] S570, determine whether i is equal to m. If yes, go to step S580. If no, let i = i + 1 and go to step S530.
[0036] S580, find the minimum value in each row of the distance matrix, build the minimum distance matrix, record the column number of the minimum value in each row, and the coordinates of the points in the corresponding min_H matrix and max_L matrix.
[0037] Optionally, the step size of the leveling device is smaller than the leveling width at the leveling end; step S600 specifically includes:
[0038] S610, determine the orientation of the leveling end of the grain leveling device based on the coordinates of the two corresponding points in the min_H matrix and the max_L matrix;
[0039] S620, calculate the slope of the line containing each point in region H and the corresponding max_L point in region L, and filter out the line l1 with the smallest absolute slope and the corresponding coordinate point H1 in region H, and the line l2 with the largest absolute slope and the corresponding coordinate point H2 in region H.
[0040] S630, take the coordinate point on the straight line l1 located on the side of H1 away from the max_L point and the column distance from H1 is one grain width of the grain end as the working start point, and take the coordinate point on the straight line l2 located on the side of H2 away from the max_L point and the row distance from H2 is one grain width of the grain end as the working end point.
[0041] S640, determine the turning point based on the row coordinates of the starting point and the column coordinates of the ending point;
[0042] S650, using the step length of the leveling device as the interval, determine a plurality of first intermediate path points between the starting point of the work and the turning point, and a plurality of second intermediate path points between the turning point and the ending point of the work.
[0043] S660, from the starting point of the work, multiple first intermediate path points, turning points, multiple second intermediate path points to the end point of the work, respectively corresponding to the max_L point of the L region, determine the secondary leveling path of the corresponding H region and L region.
[0044] The present invention also provides a method for leveling grain surfaces, used to guide a grain leveling device to level the top surface of grain in a grain silo. The grain surface leveling method includes the following steps:
[0045] S1000, acquire the image of the grain warehouse and construct the depth matrix M;
[0046] S2000, calculate the target leveling height h based on the depth matrix M. m ;
[0047] S3000, Obtain the maximum and minimum values in the depth matrix M, and calculate the target leveling height h. m The absolute value of the difference between the minimum and maximum values in the depth matrix;
[0048] S4000, Select the grain leveling method based on the absolute value of the difference;
[0049] S5000, Grain leveling is performed according to the described grain leveling method.
[0050] Optionally, the grain leveling method includes canceling grain leveling, fine grain leveling method, and coarse grain leveling method as described above;
[0051] Step S4000 specifically includes:
[0052] If the absolute value is greater than or equal to the coarse leveling difference, select the coarse leveling method for the grain surface;
[0053] If the absolute value is greater than or equal to the fine leveling difference and less than the coarse leveling difference, then the fine leveling method for grain surface should be selected.
[0054] If the absolute value is less than the difference in grain leveling, select to cancel grain leveling.
[0055] Optionally, the grain surface leveling method includes the following steps:
[0056] Choose a point on the periphery of the grain warehouse as the starting point for leveling the grain;
[0057] Grain is pushed along the circumference of the granary from the starting point of the leveling process, and at the end of a full circle, the leveling end moves inward toward the granary to continue pushing grain.
[0058] The present invention also provides a grain leveling system for installation in a grain warehouse, the grain leveling system comprising:
[0059] A grain leveling device is movably installed inside a grain warehouse. The grain leveling device has a downward-facing grain leveling end for performing grain leveling operations.
[0060] A depth camera is installed at the lower end of the grain leveling device. The depth camera is used to photograph the grain surface of the grain warehouse to obtain grain warehouse image information.
[0061] A driving device, located inside the grain silo, drives and connects to the grain leveling device, enabling the grain leveling device to be movably positioned along the longitudinal, lateral, and vertical directions; and...
[0062] A control device is installed on the grain leveling device and is electrically connected to the grain leveling device, the depth camera, and the drive device.
[0063] Optionally, the control device includes a memory, a processor, and a control program for the grain surface leveling method stored in the memory. The processor executes the control program for the grain surface leveling method to implement the steps of the grain surface leveling method as described above.
[0064] In the technical solution of this invention, the method for rough leveling the grain surface includes the following steps: acquiring a grain silo image, constructing a depth matrix M, and calculating the target leveling height h of the grain based on the depth matrix M. m Based on the target grain leveling height, the depth matrix M is divided into multiple L regions and multiple H regions, wherein each element in the L region is adjacent and its depth is greater than the target grain leveling height h. m Within region H, all elements are adjacent and their depth is less than the target grain leveling height h. m This invention provides a method for rough leveling grain surfaces. Based on a genetic algorithm, the sequential leveling order of multiple H regions is planned and recorded as a primary leveling path. A one-to-one leveling relationship is established between each H region and each L region based on element information. Secondary leveling paths are determined for the corresponding H and L regions based on their coordinate information. Multiple secondary leveling paths are inserted into the primary leveling path to obtain a total leveling path. Leveling is then performed according to this total path. This method is convenient for use in large, irregular grain silos, guiding leveling devices to level the top surface of grain within the silo. It enables precise grain silo operations, improving robot autonomy and leveling efficiency. Then, based on the working objective of the leveling device, the area is divided, and a two-dimensional map is generated from a three-dimensional map. The overall optimal path of this two-dimensional map is obtained through multi-level path planning. By adjusting the orientation of the leveling end, multi-angle switching is achieved, facilitating dual-axis linkage leveling and completing leveling work in corner positions.
[0065] This invention uses multi-level path planning to obtain the optimal working path for the entire grain depot. Level 1 path planning yields the optimal path between all peak and trough areas, while Level 2 path planning analyzes specific problems for different peak areas to obtain the optimal working path for each area.
[0066] Achieving quantified robot work objectives and planning robot work paths can significantly improve the robot's autonomy and enhance the automation and intelligence of the grain leveling robot. It eliminates the need to rely on human senses to control the leveling height and work path, making it more objective and accurate, resulting in better leveling effects. It also reduces manual labor and helps meet the needs of ventilation and enterprise standardization. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0068] Figure 1A schematic diagram of the structure of an embodiment of the grain leveling system provided by the present invention;
[0069] Figure 2 A schematic flowchart of an embodiment of the grain surface leveling method provided by the present invention;
[0070] Figure 3 A schematic flowchart of an embodiment of the grain surface roughing method provided by the present invention;
[0071] Figure 4 for Figure 3 A schematic flowchart of one embodiment of step S300;
[0072] Figure 5 for Figure 4 A schematic flowchart of an embodiment of step S340;
[0073] Figure 6 for Figure 3 A schematic flowchart of an embodiment of step S500;
[0074] Figure 7 for Figure 3 A schematic flowchart of one embodiment of step S600;
[0075] Figure 8 for Figure 7 A schematic diagram of the structure of the secondary grain leveling path in one embodiment of step S600;
[0076] Figure 9 for Figure 1 A schematic diagram of the structure of the grain end in four different orientations.
[0077] Explanation of icon numbers:
[0078]
[0079]
[0080] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0081] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0082] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0083] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0084] Currently, there are relatively few robots used for grain leveling both domestically and internationally. They can be broadly categorized into three types: fixed, mobile, and hybrid. Fixed robots typically operate on the top of grain silos. For example, gantry-type grain leveling robots are highly efficient and produce high-quality work, but some corners are blind spots. Mobile robots are small and relatively flexible, but their work efficiency is low, and they are prone to tipping over and crushing grain. Hybrid robots combine the advantages of both types to achieve complementary benefits, but they face challenges in task allocation, information transmission, and collaborative work. Currently, grain leveling robots share common problems that urgently need to be addressed: quantifying the robot's work objectives and planning its work path. These two issues result in a low degree of autonomy for the robots during grain leveling operations.
[0085] Currently, both manual remote-controlled robots and full-coverage operation methods are required. The former involves workers observing and then remotely controlling the robot, but due to human bias, the flatness of the grain surface cannot be guaranteed, leading to repetitive work. The latter also requires manual control of the robot's descent height, and if a full-coverage path is used throughout the entire operation, there will be a large amount of unnecessary travel, significantly reducing work efficiency.
[0086] Please see Figure 1This invention proposes a grain leveling system 100 for installation within a grain silo. The grain leveling system 100 includes a grain leveling device 1, a depth camera 2, a drive device 3, and a control device. The grain leveling device 1 is movably installed within the grain silo and has a downward-facing leveling end 11 for performing grain leveling operations. The depth camera 2 is located at the lower end of the grain leveling device 1 and is used to capture images of the grain surface in the grain silo to obtain grain silo image information. The drive device 3 is located within the grain silo and is connected to the grain leveling device 1 to drive the grain leveling device 1 to be movably installed in the longitudinal, lateral, and vertical directions. The control device is installed on the grain leveling device 1 and is electrically connected to the grain leveling device 1, the depth camera 2, and the drive device 3.
[0087] This invention uses the depth camera 2 to capture images of the grain surface in a grain silo, obtaining image information of the grain silo. This image information is then transmitted to the control device, which calculates the grain leveling height data to guide the drive device 3 in moving the grain leveling device 1 to a plane corresponding to that height. The device then moves along the plane at that height to level the grain. The depth camera 2 can collect grain silo image information quickly, efficiently, and accurately. By employing image stitching and matrix transformation, information collection on large, irregular grain surfaces can be achieved quickly and effectively, quantifying the robot's working objectives and creating a 3D map.
[0088] In one embodiment of the present invention, the grain leveling device 1 is a truss-type grain leveling robot 12. The truss-type grain leveling robot 12 includes two longitudinal beams 13, a crossbeam 14, and the grain leveling robot 12. The two longitudinal beams 13 extend laterally and are spaced apart longitudinally on both sides of the grain silo. The crossbeam 14 extends longitudinally, and its two ends are movably mounted on the two longitudinal beams 13 respectively, and are slidably mounted along the extension direction of the two longitudinal beams 13. The grain leveling robot 12 is movably mounted on the crossbeam 14 longitudinally. The driving device 3 includes a telescopic rod 33, two lateral driving mechanisms 31, and a longitudinal driving mechanism 32. The telescopic rod 33 is positioned between the grain leveling robot 12 and the grain leveling end 11 to drive the grain leveling end 11 to move vertically. The two lateral driving mechanisms 31 are respectively mounted on the longitudinal beam 13 to drive the transverse beam 14 to move horizontally. The longitudinal driving mechanism 32 is mounted on the transverse beam 14 to drive the grain leveling robot 12 to move vertically, thus enabling the grain leveling robot 12 to be movable in the longitudinal, lateral, and vertical directions. The device's movement is achieved by using a track and walking mechanism. The depth camera 2 is installed on the truss-type grain leveling robot 12 to collect images and data; only the device needs to be added to the robot, making the modification simple and convenient.
[0089] In this embodiment of the invention, the grain leveling robot 12 is a conventional device circulating in the market, and its specific form is not limited here. In this embodiment, the grain leveling device 1 has a downward-facing grain leveling end 11 for performing grain leveling operations. Further, the grain leveling end 11 includes two grain leveling plates 111 extending laterally from the grain leveling robot 12. The two grain leveling plates 111 are set at a certain angle to scrape the grain towards the inner angle. The angle between the two grain leveling plates 111 can be varied and is not limited. In this embodiment, the two grain leveling plates 111 are set perpendicular to each other, which can increase the leveling range each time. The grain leveling robot 12 also includes a rotating component for driving the grain leveling end 11 to rotate along the vertical axis. When the lower section of the grain leveling end 11 is at the corresponding grain leveling height, the grain is leveled by the grain leveling end 11 moving the grain.
[0090] It should be noted that the specific forms of the lateral drive mechanism 31 and the longitudinal drive mechanism 32 are not limited here. In this embodiment, the lateral drive mechanism 31 and the longitudinal drive mechanism 32 are servo motors. In other embodiments, the lateral drive mechanism 31 and the longitudinal drive mechanism 32 can also be hydraulic components. Their specific connection methods are well known to those skilled in the art and will not be described here.
[0091] It should be further noted that the telescopic rod 33 is specifically a hydraulic telescopic rod 33, which has a large load-bearing capacity, sufficient power, and stable movement. In other embodiments, the telescopic rod 33 can also be a gear and rack mechanism or a threaded screw mechanism combined with a high-power motor to realize the telescopic movement of the telescopic rod 33. The specific configuration is also well known to those skilled in the art and will not be described here.
[0092] Furthermore, the depth camera 2 is fixedly installed at the lower end of the grain leveling robot 12, which is simple and convenient to modify and makes it easy to obtain the height of the plane where the grain leveling robot 12 is located.
[0093] To facilitate the guidance of the grain leveling device 1 in leveling the top surface of the grain in the grain warehouse, the control device includes a memory, a processor, and a control program for the grain surface leveling method stored in the memory. The processor executes the control program for the grain surface leveling method to implement the steps of the grain surface leveling method.
[0094] This invention proposes a method for leveling grain surfaces, which guides the grain leveling device 1 to level the top surface of grain in a grain silo. Figure 2 This is a schematic flowchart of an embodiment of the grain surface leveling method provided by the present invention. The grain surface leveling method will be described below with reference to the specific accompanying drawings.
[0095] Reference Figure 2 The grain surface leveling method includes the following steps:
[0096] S1000, acquire the image of the grain warehouse and construct the depth matrix M;
[0097] S2000, calculate the target leveling height h based on the depth matrix M. m ;
[0098] In this step, the leveling height is calculated using the depth matrix M when the top surface of the grain in the grain warehouse is irregular, so as to guide the leveling device 1 to level the top surface of the grain in the grain warehouse.
[0099] S3000, Obtain the maximum and minimum values in the depth matrix M, and calculate the target leveling height h. m The absolute value of the difference between the minimum and maximum values in the depth matrix;
[0100] In this step, the target grain leveling height h is calculated. m The absolute value of the difference between the minimum and maximum values in the depth matrix yields the difference in grain leveling height between the grain pile and the grain pit on the top surface of the grain in the granary and the target grain leveling height.
[0101] S4000, Select the grain leveling method based on the absolute value of the difference;
[0102] Because the grain silos are large, it is impossible to judge the flatness of the grain surface on the top of the grain silos with the naked eye. If the top of the grain silo is relatively flat, it is not necessary to level the grain, or only coarse leveling is required to achieve the required flatness. Fine leveling is not necessary. This avoids the waste of time, manpower and resources, and high costs associated with coarse leveling when the grain surface is relatively flat. By selecting the leveling method based on the absolute value of the difference in this step, it is possible to accurately determine whether leveling is required and whether fine or coarse leveling is needed.
[0103] S5000, Grain leveling is performed according to the described grain leveling method.
[0104] In this step, there are various methods for leveling the grain, and there is no specific limitation. In this embodiment, the methods for leveling the grain include canceling the leveling, fine leveling of the grain surface, and coarse leveling of the grain surface.
[0105] Step S4000 specifically includes:
[0106] If the absolute value is greater than or equal to the coarse leveling difference, select the coarse leveling method for the grain surface;
[0107] If the absolute value is greater than or equal to the fine leveling difference and less than the coarse leveling difference, then the fine leveling method for grain surface should be selected.
[0108] If the absolute value is less than the difference in grain leveling, select to cancel grain leveling.
[0109] Specifically, the coarse leveling difference and the fine leveling difference are not limited and can be set according to the actual leveling requirements of the grain warehouse. In one embodiment of the present invention, the coarse leveling difference is greater than 4cm and less than 6cm, and the fine leveling difference is greater than 1.5cm and less than 2.5cm. Specifically, the coarse leveling difference is 5cm and the fine leveling difference is 2cm.
[0110] There are various methods for leveling the grain surface, and no specific method is limited. In one embodiment of the present invention, the method for leveling the grain surface includes the following steps:
[0111] Choose a point on the periphery of the grain warehouse as the starting point for leveling the grain;
[0112] Grain is pushed along the circumference of the granary from the starting point of the leveling process, and at the end of a full circle, the leveling end 11 moves inward to continue pushing grain.
[0113] When the grain leveling device 1 needs to level the grain according to the grain surface leveling method, a full-coverage path is used for the grain surface leveling operation. The working path of the grain leveling device 1 is as follows: a point on the periphery of the grain warehouse is selected as the starting point for leveling, and the specific location is not limited. In this embodiment, the corner of the grain warehouse is selected as the starting point for leveling. The grain leveling device 1 pushes the grain along the periphery of the grain warehouse from the starting point. Specifically, the full-coverage operation of the grain leveling device 1 is a single-axis movement, which has good working effect and is easy to control. The leveling end 11 of the grain leveling device 1 starts from the starting point for single-axis movement, and at the end of a full circle, the leveling end 11 moves towards the inside of the grain warehouse to continue pushing the grain. That is, it reduces a certain distance with each rotation and repeats the movement. It is worth mentioning that after the last movement, the leveling end 11 rotates one full circle to push the grain to prevent grain from accumulating at the end of the path.
[0114] In step S2000, the target grain height h is calculated based on the depth matrix M. m There are various methods, and no specific method is limited. In this embodiment, step S2000 includes the following steps:
[0115] Acquire unit images of multiple calibration areas, wherein the multiple calibration areas are multiple regions formed by dividing the top surface of the grain along the horizontal and vertical directions;
[0116] Multiple unit images are sequentially stitched together horizontally to form multiple strip-shaped images that extend horizontally and are distributed vertically. Each strip-shaped image is sequentially formed into multiple combined images during the formation process. Each combined image is formed by stitching together the unit image with adjacent unit images or adjacent combined images.
[0117] Multiple template depth matrices are obtained sequentially based on each of the combined images, and a combined depth matrix corresponding to the combined image is obtained based on each of the template depth matrices, finally obtaining the horizontal depth matrix of multiple strip-shaped images;
[0118] Obtain the overlapping boundary of two adjacent horizontal depth matrices, and then stitch together the multiple horizontal depth matrices along the vertical direction according to the position of the overlapping boundary to obtain the overall depth matrix.
[0119] The spatial volume between the plane where the grain leveling device 1 is located and the top surface of the grain in the grain warehouse is obtained according to the overall depth matrix.
[0120] The grain leveling height is calculated based on the volume of the space and the floor area of the grain warehouse.
[0121] There are various methods for coarsely leveling the grain surface, and no specific method is limited. This invention also proposes a method for coarsely leveling the grain surface to guide the grain leveling device 1 in leveling the top surface of the grain in the grain silo. Figures 3 to 7 This is a schematic flowchart of an embodiment of the grain surface rough leveling method provided by the present invention. The grain surface rough leveling method will be described below with reference to the specific accompanying drawings.
[0122] Please see Figure 3 The method for coarsely leveling the grain surface includes the following steps:
[0123] S100, acquire the image of the grain warehouse and construct the depth matrix M;
[0124] S200, calculate the target leveling height h based on the depth matrix M. m ;
[0125] S300, based on the target grain leveling height, the depth matrix M is divided into multiple L regions and multiple H regions, wherein each element in the L region is adjacent and its depth is greater than the target grain leveling height h. m Within region H, all elements are adjacent and their depth is less than the target grain leveling height h. m ;
[0126] In this step, the depth matrix M is divided into multiple L regions and multiple H regions based on the target leveling height. After obtaining the target leveling height, the positions of elements in the depth matrix below the target leveling height are selected using a comparison method. However, due to the large number and complexity of elements, leveling operations cannot be performed on an element-by-element basis. To improve efficiency, the numerous elements are divided into multiple L regions and H regions based on whether they are connected. Within each L region, elements are adjacent and their depth is greater than the target leveling height h. m Within region H, all elements are adjacent and their depth is less than the target grain leveling height h. m Then, the grain transport route will be planned on a regional basis.
[0127] The specific steps in step S300, which involve dividing the depth matrix M into multiple L regions and multiple H regions based on the target grain leveling height, include:
[0128] S310, select all values in the depth matrix M that are less than or greater than the target leveling height h. m The elements are assigned the value 1, and the rest are assigned the value 0;
[0129] In this step, when dividing the H region, all elements in the depth matrix that are less than or not less than the target leveling height are assigned values to facilitate subsequent querying of the target element; when dividing the L region, all elements in the depth matrix that are greater than or not greater than the target leveling height are assigned values to facilitate subsequent querying of the target element.
[0130] S320, Create a matrix XY to record the coordinates of the elements with a value of 1 in the depth matrix M;
[0131] The matrix XY records all elements that are less than the target grain level height.
[0132] S330, determine whether matrix XY is an empty matrix;
[0133] S340, if yes, then the region division ends; otherwise, construct H region or L region for region division.
[0134] If matrix XY is empty, it means there are no target points that need to be divided into H or L regions. If matrix XY is not empty, it means there are target points that need to be divided into H or L regions, then H or L regions are constructed for region division.
[0135] Specifically, the specific steps for constructing the H region or L region for region division in step S340 include:
[0136] S341, Create the i-th H-region or L-region matrix;
[0137] S342, extract the coordinates of the first point A in matrix XY, and change the value of point A in M to 0;
[0138] The coordinates of the first recorded point A are used as the initial point. By setting the value of point A in M to 0, the search for point A is prevented from being repeated when searching for points with a value of 1 in M.
[0139] S343, take the j-th neighboring point of input coordinate A, and determine whether the value of the j-th neighboring point in M is 1. If yes, go to step S344; otherwise, go to step S345.
[0140] The number of adjacent points is not limited. In one embodiment of the present invention, the region is divided by a nine-square grid method, that is, one point has eight adjacent points.
[0141] S344, record the j-th adjacent point in the i-th region matrix, change the value of the adjacent point in M to 0, establish matrix G to store the value of j and the coordinates of A, take the j-th adjacent point to replace A, set j=1, and go to step S343;
[0142] S345, let j = j + 1, determine whether j is greater than the preset total number of adjacent points. If yes, go to step S346; otherwise, go to step S343.
[0143] S346, determine whether G is empty. If it is, let i = i + 1 and go to step S330. If not, go to step S347.
[0144] In this step, if G is empty, it means that the i-th region has been divided and the next region needs to be divided.
[0145] S347, replace A with the coordinates stored in the last row of matrix G, replace j with the stored j value, delete the last row of matrix G, and go to step S343.
[0146] In the technical solution of this invention, based on whether they are connected, each H region and each L region are constructed by searching for adjacent points.
[0147] S400, based on a genetic algorithm, plans the sequential leveling order of multiple H regions and records it as a first-level leveling path;
[0148] This specific embodiment uses a genetic algorithm for first-level path planning to determine the order of leveling all H regions. First, an initial path is established, and then the optimal first-level leveling path is obtained through fitness judgment, selection operation, crossover operation, and mutation operation.
[0149] S500: Based on the element information of each H region and each L region, establish a one-to-one flattening relationship between each H region and each L region.
[0150] After dividing numerous work points into several work areas L and H, a one-to-one leveling relationship is established between each H area and each L area based on the element information of each H area and each L area. The corresponding L area for each H area is then identified, which determines which corresponding trough area to push each peak area to.
[0151] The corresponding relationship is established based on the nearest distance. Step S500 specifically includes:
[0152] S510, obtain the minimum value of each of the m H regions, and establish the min_H matrix;
[0153] S520: Obtain the maximum value of each of the n L regions and construct the max_L matrix;
[0154] S530, take the first coordinate of the record in the i-th row of the min_H matrix;
[0155] S540, take the second coordinate of the record in the j-th row of the max_L matrix;
[0156] S550, obtain the distance D between the first coordinate and the second coordinate, and record D in the i-th row and j-th column of the distance matrix;
[0157] In one embodiment, the distance D includes the two-dimensional Euclidean distance between the first and second coordinates. To simplify the calculation, in another embodiment, the distance D includes the square of the two-dimensional Euclidean distance between the first and second coordinates, using the squared form to reduce the computational load. The calculation results are stored in a distance matrix.
[0158] S560, determine if j is equal to n. If yes, go to step S570. If no, let j = j + 1 and go to step S540.
[0159] S570, determine whether i is equal to m. If yes, go to step S580. If no, let i = i + 1 and go to step S530.
[0160] S580, find the minimum value in each row of the distance matrix, build the minimum distance matrix, record the column number of the minimum value in each row, and the coordinates of the points in the corresponding min_H matrix and max_L matrix.
[0161] After establishing a one-to-one leveling relationship between each H region and each L region, since the valley peaks of different H regions are different in size, while the leveling end of the leveling device is fixed in size, there is a situation where the leveling end cannot cover the entire valley peak at once. Therefore, it is necessary to plan different working paths for different valley peak regions, and to analyze specific problems in specific ways, and proceed to step S600.
[0162] S600, based on the coordinate information of the corresponding H and L regions, determines the secondary leveling path of the corresponding H and L regions;
[0163] Based on the coordinate information in the corresponding H and L regions, secondary path planning is performed to confirm the starting point, ending point, intermediate path points, and working status of the leveling end of the grain leveling device in each working area.
[0164] When performing the rough leveling method for grain surface, the step length of the leveling device 1 is smaller than the leveling width of the leveling end 11, so that the trajectories of two adjacent leveling operations in the same area have a certain overlap, thus ensuring the quality of the work.
[0165] Please see Figure 7 and Figure 8 Step S600 specifically includes:
[0166] S610, Determine the orientation of the leveling end 11 of the leveling device 1 based on the coordinates of the two corresponding points in the min_H matrix and the max_L matrix;
[0167] In this embodiment, the leveling end 11 of the leveling device 1 includes two leveling plates 111 at right angles. Please refer to [link / reference needed]. Figure 9 The leveling end 11 has four orientations. The orientation of the leveling end 11 of the leveling device 1 is determined according to the coordinates of the two corresponding points in the min_H matrix and the max_L matrix.
[0168] S620, calculate the slope of the line containing each point in region H and the corresponding max_L point in region L, and filter out the line l1 with the smallest absolute slope and the corresponding coordinate point H1 in region H, and the line l2 with the largest absolute slope and the corresponding coordinate point H2 in region H.
[0169] S630, take the coordinate point on the straight line l1 located on the side of H1 away from the max_L point and the column distance from H1 is one level grain width of the level grain end 11 as the working starting point, and take the coordinate point on the straight line l2 located on the side of H2 away from the max_L point and the row distance from H2 is one level grain width of the level grain end 11 as the working ending point.
[0170] In this embodiment, in order to ensure that the entire H region is included, the edge method is used to determine the starting point and ending point of the work.
[0171] S640, determine the turning point based on the row coordinates of the starting point and the column coordinates of the ending point;
[0172] S650, using the step size of the leveling device 1 as the interval, determine a plurality of first intermediate path points between the starting point of the work and the turning point, and a plurality of second intermediate path points between the turning point and the ending point of the work.
[0173] S660, from the starting point of the work, multiple first intermediate path points, turning points, multiple second intermediate path points to the end point of the work, respectively corresponding to the max_L point of the L region, determine the secondary leveling path of the corresponding H region and L region.
[0174] After determining the working start point, working end point, intermediate path point, working status of the leveling end 11 and the corresponding L area of all H areas using the above method, a matrix is created to store the working start point of all H areas, a matrix is created to store the working end point of all H areas, a matrix is created to store all working path points of each H area, and a matrix is created to store the working status of the leveling end 11 corresponding to all H areas, i.e., its orientation.
[0175] S700, insert multiple secondary leveling paths into the primary leveling path to obtain a total leveling path;
[0176] S800, level the grain according to the total leveling path.
[0177] The grain surface leveling method provided by this invention is convenient for use in large, irregular grain silos. It guides the grain leveling device 1 to level the top surface of the grain within the silo, enabling precise grain silo operations and improving the robot's autonomy and the efficiency of grain leveling. Then, based on the working objective of the grain leveling device 1, the area is divided, and a two-dimensional map is generated from a three-dimensional map. The overall optimal path of this two-dimensional map is obtained through multi-level path planning. By adjusting the orientation of the included angle between the two leveling plates 111 at the leveling end 11, multi-angle switching is achieved, facilitating dual-axis linkage grain leveling and completing grain leveling work in corner positions.
[0178] This invention uses multi-level path planning to obtain the optimal working path for the entire grain depot. Level 1 path planning yields the optimal path between all peak and trough areas, while Level 2 path planning analyzes specific problems for different peak areas to obtain the optimal working path for each area.
[0179] Achieving quantified robot work objectives and planning robot work paths can significantly improve the robot's autonomy and enhance the automation and intelligence of the Pingliang Robot 12. It eliminates the need to rely on human senses to control the leveling height and work path, making it more objective and accurate, resulting in better leveling effects. It also reduces manual labor and helps meet the needs of ventilation and enterprise standardization.
[0180] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.
Claims
1. A method for coarsely leveling grain surfaces, used to guide a grain leveling device to level the top surface of grain in a grain silo, characterized in that, The method for coarsely leveling grain surfaces includes the following steps: S100, acquire the image of the grain warehouse and construct the depth matrix M; S200, calculate the target leveling height h based on the depth matrix M. m ; S300, based on the target grain leveling height, the depth matrix M is divided into multiple L regions and multiple H regions, wherein each element in the L region is adjacent and its depth is greater than the target grain leveling height h. m Within region H, all elements are adjacent and their depth is less than the target grain leveling height h. m ; S400, based on a genetic algorithm, plans the sequential leveling order of multiple H regions and records it as a first-level leveling path; S500: Based on the element information of each H region and each L region, establish a one-to-one flattening relationship between each H region and each L region. S600, based on the coordinate information of the corresponding H and L regions, determines the secondary leveling path of the corresponding H and L regions; S700, insert multiple secondary leveling paths into the primary leveling path to obtain a total leveling path; S800, level the grain according to the total leveling path; Step S400 includes: performing first-level path planning based on a genetic algorithm to determine the order of leveling all H regions. First, an initial path is established, and then the optimal first-level leveling path is obtained through fitness judgment, selection operation, crossover operation and mutation operation. Step S500 specifically includes: S510, obtain the minimum value of each of the m H regions, and establish the min_H matrix; S520: Obtain the maximum value of each of the n L regions and construct the max_L matrix; S530, take the first coordinate of the record in the i-th row of the min_H matrix; S540, take the second coordinate of the record in the j-th row of the max_L matrix; S550, obtain the distance D between the first coordinate and the second coordinate, and record D in the i-th row and j-th column of the distance matrix; S560, determine if j is equal to n. If yes, go to step S570. If no, set j = j + 1 and go to step S540. S570, determine whether i is equal to m. If yes, go to step S580. If no, let i = i + 1 and go to step S530. S580, find the minimum value in each row of the distance matrix, build the minimum distance matrix, record the number of columns with the minimum value in each row, and the coordinates of the points in the corresponding min_H matrix and max_L matrix; The step size of the leveling device is smaller than the leveling width at the leveling end; step S600 specifically includes: S610, determine the orientation of the leveling end of the grain leveling device based on the coordinates of the two corresponding points in the min_H matrix and the max_L matrix; S620, calculate the slope of the line containing each point in region H and the corresponding max_L point in region L, and filter out the line l1 with the smallest absolute slope and the corresponding coordinate point H1 in region H, and the line l2 with the largest absolute slope and the corresponding coordinate point H2 in region H. S630, take the coordinate point on the straight line l1 located on the side of H1 away from the max_L point and the column distance from H1 is one grain width of the grain end as the working start point, and take the coordinate point on the straight line l2 located on the side of H2 away from the max_L point and the row distance from H2 is one grain width of the grain end as the working end point. S640, determine the turning point based on the row coordinates of the starting point and the column coordinates of the ending point; S650, using the step length of the leveling device as the interval, determine a plurality of first intermediate path points between the starting point of the work and the turning point, and a plurality of second intermediate path points between the turning point and the ending point of the work. S660, from the starting point of the work, multiple first intermediate path points, turning points, multiple second intermediate path points to the end point of the work, respectively corresponding to the max_L point of the L region, determine the secondary leveling path of the corresponding H region and L region.
2. The method for coarsely leveling grain surface as described in claim 1, characterized in that, Step S300 specifically includes: S310, select all values in the depth matrix M that are less than or greater than the target leveling height h. m The elements are assigned the value 1, and the rest are assigned the value 0; S320, Create a matrix XY to record the coordinates of the elements with a value of 1 in the depth matrix M; S330, determine whether matrix XY is an empty matrix; S340, if yes, then the region division ends; otherwise, construct H region or L region for region division.
3. The method for coarsely leveling grain surface as described in claim 2, characterized in that, The specific steps for constructing the H region or L region for region division in step S340 include: S341, Create the i-th H-region or L-region matrix; S342, extract the coordinates of the first point A in matrix XY, and change the value of point A in M to 0; S343, take the j-th neighboring point of input coordinate A, and determine whether the value of the j-th neighboring point in M is 1. If yes, go to step S344; otherwise, go to step S345. S344, record the j-th adjacent point in the i-th region matrix, and change the value of the adjacent point in M to 0. Build matrix G to store the value of j and the coordinates of A. Replace A with the j-th adjacent point, set j=1, and go to step S343. S345, let j = j + 1, determine whether j is greater than the preset total number of adjacent points. If yes, go to step S346; otherwise, go to step S343. S346, determine whether G is empty. If it is, let i = i + 1 and go to step S330. If not, go to step S347. S347, replace A with the coordinates stored in the last row of matrix G, replace j with the stored j value, delete the last row of matrix G, and go to step S343.
4. A method for leveling grain surfaces, used to guide a grain leveling device to level the top surface of grain in a grain silo, characterized in that, The method for leveling the grain surface includes the following steps: S1000, acquire the image of the grain warehouse and construct the depth matrix M; S2000, calculate the target leveling height h based on the depth matrix M. m ; S3000, Obtain the maximum and minimum values in the depth matrix M, and calculate the target leveling height h. m The absolute value of the difference between the minimum and maximum values in the depth matrix; S4000, Select the grain leveling method based on the absolute value of the difference; S5000, Grain leveling is performed according to the described grain leveling method; The leveling method includes canceling leveling, fine leveling of grain surface, and coarse leveling of grain surface as described in any one of claims 1 to 3; Step S4000 specifically includes: If the absolute value is greater than or equal to the coarse leveling difference, select the coarse leveling method for the grain surface; If the absolute value is greater than or equal to the fine leveling difference and less than the coarse leveling difference, then the fine leveling method for grain surface is selected. If the absolute value is less than the difference in grain leveling, select to cancel grain leveling.
5. The grain surface leveling method as described in claim 4, characterized in that, The method for finely leveling grain surface includes the following steps: Choose a point on the periphery of the grain warehouse as the starting point for leveling the grain; Grain is pushed along the circumference of the granary from the starting point of the leveling process, and at the end of a full circle, the leveling end moves inward toward the granary to continue pushing grain.
6. A grain leveling system for installation within a grain silo, characterized in that, include: A grain leveling device is movably installed inside a grain warehouse. The grain leveling device has a downward-facing grain leveling end for performing grain leveling operations. A depth camera is installed at the lower end of the grain leveling device. The depth camera is used to photograph the grain surface of the grain warehouse to obtain grain warehouse image information. A driving device, located inside the grain silo, drives and connects to the grain leveling device, enabling the grain leveling device to be movably positioned along the longitudinal, lateral, and vertical directions; and... A control device is installed on the grain leveling device and electrically connected to the grain leveling device, the depth camera and the drive device. The control device includes a memory, a processor and a control program for the grain surface leveling method stored in the memory. The processor executes the control program for the grain surface leveling method to implement the steps of the grain surface leveling method as described in any one of claims 4 to 5.
Citation Information
Patent Citations
Grain leveling height calculation method, control device, storage medium and grain leveling system
CN115713461A