Silage depth determination method, device, equipment and medium based on silage machine
Through the use of camera devices and image processing technology, combined with the conversion of camera coordinate system and independent coordinate system, the forage depth of the silage machine is automatically monitored, which solves the problem of difficulty in real-time monitoring of forage loading conditions, improves operating efficiency and avoids forage waste.
Patent Information
- Application Number
- CN202310273192.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-03-16
AI Technical Summary
During the operation of the silage machine, real-time monitoring of the forage loading situation is difficult to achieve, resulting in difficulties in night operations and untimely response leading to forage waste.
A camera device is used to capture the loading status of the forage in the forage receiving vehicle, and the height of the forage is determined through image processing. The conversion relationship between the camera coordinate system and the independent coordinate system is used to simplify the coordinate conversion and automatically determine the forage depth.
It realizes automatic monitoring of forage loading conditions, avoids forage waste, simplifies the coordinate conversion process, and improves work efficiency.
Smart Images

Figure CN116258710B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular, to a method and device for determining the depth of forage based on a silage machine, equipment and medium. BACKGROUND
[0002] The silage machine plays a huge role in today's animal husbandry. The silage machine (also known as a silage harvester or a silage machine) is a kind of agricultural machinery. The silage machine can harvest, crush, break the seed, and load the corn straw, wheat straw, sorghum straw or other forage in the field for fermentation or other processing to be used as livestock feed.
[0003] During the operation of the silage machine, in addition to the driver, a special person is needed to observe the loading condition of the forage in real time and adjust the operation state and position of the spray barrel. Moreover, if the operation needs to be carried out at night, due to low visibility at night, the operation is difficult and intensive, and there is a situation of wasting forage due to unresponsive.
[0004] That is, based on manpower to determine the loading condition of the forage, the situation of wasting forage due to unresponsive is prone to occur. SUMMARY
[0005] In view of the above problems, the present application provides a method and device for determining the depth of forage based on a silage machine, equipment and medium, which can automatically determine the depth of forage in the forage receiving vehicle, thereby avoiding the situation of wasting forage due to unresponsive.
[0006] Based on this, the present application discloses the following technical scheme:
[0007] On the one hand, the present application provides a method for determining the depth of forage based on a silage machine, which comprises:
[0008] Obtaining a first image captured by a camera device, the first image being used to identify the loading condition of forage in a forage receiving vehicle corresponding to the silage machine;
[0009] From a plurality of first pixel points included in the first image, determining a first pixel point corresponding to a to-be-measured point, the to-be-measured point being used to identify the position of the forage in the forage receiving vehicle to be measured;
[0010] According to the first pixel point corresponding to the to-be-measured point, determining a camera coordinate of the to-be-measured point in a camera coordinate system;
[0011] According to the camera coordinate, determining an independent coordinate of the to-be-measured point in an independent coordinate system, the origin of the independent coordinate system being the same as the origin of the camera coordinate system, the first axis of the independent coordinate system being coincident with the first axis of the camera coordinate system, and the second axis of the independent coordinate system being perpendicular to the bottom surface of the forage receiving vehicle;
[0012] According to the independent coordinate of the to-be-measured point, the forage height at the to-be-measured point is determined.
[0013] Optionally, the method further comprises:
[0014] A first height difference between the origin of the camera coordinate system and the bottom surface of the forage receiving vehicle is obtained;
[0015] According to the independent coordinate of the to-be-measured point, a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point is determined.
[0016] According to the first height difference and the second height difference, the forage height at the to-be-measured point is determined.
[0017] Optionally, the method further comprises:
[0018] A standard height is obtained, the standard height being a height difference between the origin of the camera coordinate system and a plane on which the top surface of the forage receiving vehicle is located;
[0019] According to the independent coordinate of the to-be-measured point, a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point is determined.
[0020] If the second height difference is less than or equal to the standard height, the to-be-measured point is full of forage.
[0021] Optionally, the method further comprises:
[0022] A second image captured by the camera device is obtained, the second image being used to identify a situation of the top surface of the forage receiving vehicle;
[0023] A plurality of second pixel points of the top surface of the forage receiving vehicle are obtained from the second image;
[0024] According to the plurality of second pixel points, a plane on which the top surface of the forage receiving vehicle is located is determined.
[0025] Optionally, the method further comprises:
[0026] From a plurality of first pixel points included in the first image, a set of regional pixel points is determined, the set of regional pixel points including at least one regional pixel point, the regional pixel point being a pixel point around the first pixel point corresponding to the to-be-measured point;
[0027] An independent coordinate of a regional pixel point included in the set of regional pixel points is obtained;
[0028] The method further comprises:
[0029] According to the independent coordinates of the region pixel points and the independent coordinates of the to-be-measured point, the forage height at the to-be-measured point is determined.
[0030] Optionally, the plurality of region pixel points included in the set of region pixel points are in a U shape, surround the first pixel point corresponding to the to-be-measured point, and the opening of the U shape corresponds to the forage outlet of the silage machine.
[0031] Optionally, the camera device is a binocular camera.
[0032] In another aspect, the present application provides a silage machine-based forage depth determination device, the device comprising: an acquisition unit, a first determination unit, a second determination unit, a third determination unit, and a fourth determination unit.
[0033] The acquisition unit is configured to acquire a first image captured by a camera device, the camera device being located on a throwing arm of the silage machine, and the first image being used to identify the loading condition of forage in a forage receiving vehicle corresponding to the silage machine.
[0034] The first determination unit is configured to determine, from a plurality of first pixel points included in the first image, a first pixel point corresponding to a to-be-measured point, the to-be-measured point being used to identify a position in the forage receiving vehicle where the forage height is to be measured.
[0035] The second determination unit is configured to determine, according to the first pixel point corresponding to the to-be-measured point, a camera coordinate of the to-be-measured point in a camera coordinate system.
[0036] The third determination unit is configured to determine, according to the camera coordinate, an independent coordinate of the to-be-measured point in an independent coordinate system, the origin of the independent coordinate system being the same as the origin of the camera coordinate system, the first axis of the independent coordinate system being coincident with the first axis of the camera coordinate system, and the second axis of the independent coordinate system being perpendicular to the bottom surface of the forage receiving vehicle.
[0037] The fourth determination unit is configured to determine, according to the independent coordinates of the to-be-measured point, the forage height at the to-be-measured point.
[0038] Optionally, the fourth determination unit is specifically configured to:
[0039] acquire a first height difference between the origin of the camera coordinate system and the bottom surface of the forage receiving vehicle;
[0040] determine, according to the independent coordinates of the to-be-measured point, a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point;
[0041] determine, according to the first height difference and the second height difference, the forage height at the to-be-measured point.
[0042] Optionally, the device further comprises a judging unit configured to:
[0043] acquire a standard height, the standard height being a height difference between an origin of the camera coordinate system and a plane on which the top surface of the forage wagon is located;
[0044] determine, according to the independent coordinate of the to-be-measured point, a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point;
[0045] if the second height difference is less than or equal to the standard height, the to-be-measured point is filled with forage.
[0046] Optionally, the device further comprises a fifth determining unit configured to:
[0047] acquire a second image captured by the camera device, the second image being used to identify a situation of the top surface of the forage wagon;
[0048] acquire a plurality of second pixel points of the top surface of the forage wagon from the second image;
[0049] determine a plane on which the top surface of the forage wagon is located according to the plurality of second pixel points.
[0050] Optionally, the device further comprises a sixth determining unit configured to:
[0051] determine, from a plurality of first pixel points included in the first image, a set of regional pixel points, the set of regional pixel points including at least one regional pixel point, the regional pixel point being a pixel point around the first pixel point corresponding to the to-be-measured point;
[0052] acquire independent coordinates of the regional pixel points included in the set of regional pixel points;
[0053] the fourth determining unit is specifically configured to:
[0054] determine, according to the independent coordinates of the regional pixel points and the independent coordinate of the to-be-measured point, a forage height at the to-be-measured point.
[0055] Optionally, the plurality of regional pixel points included in the set of regional pixel points are in a U shape, surround the first pixel point corresponding to the to-be-measured point, and the opening of the U shape corresponds to the forage outlet of the silo.
[0056] Optionally, the camera device is a binocular camera.
[0057] In another aspect, the present application provides a computer device, the device comprising a processor and a memory:
[0058] the memory is configured to store program code and transmit the program code to the processor;
[0059] The processor is configured to execute the method described above according to the instructions in the program code.
[0060] On the other hand, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above aspects.
[0061] In another aspect, embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method described in the above aspects.
[0062] The advantages of the above technical solution of this application are:
[0063] A camera captures the loading status of the hay in the hay receiving vehicle to generate a first image. The location in the hay receiving vehicle where the hay height is to be measured is designated as the target point. The first pixel corresponding to the target point is determined from the multiple first pixels included in the first image. A camera coordinate system and an independent coordinate system are established based on the same origin. The first axis of the independent coordinate system coincides with the first axis of the camera coordinate system, and the second axis of the independent coordinate system is perpendicular to the bottom surface of the hay receiving vehicle. This means that the relationship between the independent coordinate system and the camera coordinate system can be obtained by rotating the independent coordinate system by a certain angle about the first axis. Therefore, the coordinate transformation between the two coordinate systems involves only rotational transformation, not translational transformation. This simplifies the coordinate transformation relationship, simplifying the calibration parameters required for the extrinsic parameter matrix. Therefore, the camera coordinates of the target point in the camera coordinate system can be determined based on the first pixel corresponding to the target point. Based on these camera coordinates, the independent coordinates of the target point in the independent coordinate system can be determined. Since the second axis of the independent coordinate system is perpendicular to the bottom surface of the hay receiving vehicle, the hay height at the target point can be determined based on the independent coordinate system, simplifying the calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 A flow chart of a method for determining forage depth based on a silo provided in this application;
[0066] Figure 2 A schematic diagram of a silage machine and a corresponding grass receiving machine provided in an embodiment of the present application;
[0067] Figure 3 A schematic diagram of a camera coordinate system and an independent coordinate system provided for an embodiment of the present application;
[0068] Figure 4 A schematic diagram of a first pixel corresponding to a set of regional pixel points and a to-be-measured point provided for an embodiment of the present application;
[0069] Figure 5 A schematic diagram of a forage depth determination device based on a silage machine provided by the present application;
[0070] Figure 6 A structural diagram of a computer device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0071] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor fall within the scope of protection of the present application.
[0072] The following will be described with reference to the drawings Figure 1 A forage depth determination method based on a silage machine provided by an embodiment of the present application will be introduced. Referring to Figure 1 The figure is a flowchart of a forage depth determination method based on a silage machine provided by an embodiment of the present application. The method can include S101-S105.
[0073] S101: Obtain a first image captured by a camera device.
[0074] As a possible implementation manner, the camera device can be located on the throwing arm. Referring to Figure 2 The figure is a schematic diagram of a silage machine and its corresponding forage receiving machine provided by an embodiment of the present application. In Figure 2 The one end of the throwing arm 203 is connected with the silage machine 201 through the rotating shaft 202, and the other end of the throwing arm 203 is an outlet for putting the forage processed by the silage machine 201 into the forage receiving vehicle 204. The camera device 205 is located on the throwing arm 203, so as to capture the situation of the forage in the forage receiving vehicle 204 by the camera device 205.
[0075] For example, the camera device 205 captures the forage loaded in the forage receiving vehicle 204 to obtain a first image, and the first image can identify the loading situation of the forage in the forage receiving vehicle.
[0076] As a possible implementation manner, the camera can be a binocular camera, so that binocular ranging is realized based on binocular stereo vision technology. The binocular stereo vision technology is different from monocular vision, and can more easily realize ranging. Monocular ranging needs to constantly update and maintain a large sample database to ensure that the system achieves a high recognition rate. The binocular ranging is directly measured on each point in the image by calculating the parallax of two images, without the need for target recognition on the image. Compared with the laser radar scheme, the binocular scheme can reduce the cost and achieve a higher accuracy than the monocular scheme.
[0077] S102: Determine the first pixel point corresponding to the to-be-measured point from a plurality of first pixel points included in the first image.
[0078] The to-be-measured point is used to identify a position in the hay receiving vehicle where the height of the hay is to be measured, such as a middle position in the hay receiving vehicle. The image is composed of a plurality of pixel points, and the first image includes a plurality of first pixel points. The first image belongs to the image, and the first pixel point belongs to the pixel point. By shooting, the scene of the three-dimensional world can be converted into a 2D image, so that the to-be-measured point in the three-dimensional world can determine its corresponding first pixel point in the first image.
[0079] As a possible implementation manner, each point corresponding to each first pixel point in the first image can be regarded as a to-be-measured point, so as to determine the depth of each point of hay in the hay receiving vehicle.
[0080] S103: Determine the camera coordinate of the to-be-measured point in the camera coordinate system according to the first pixel point corresponding to the to-be-measured point.
[0081] The camera coordinate system is a coordinate system, and the optical center of the camera is taken as the origin (or the focal point of the camera is taken as the origin). The z-axis coincides with the optical axis, that is, the z-axis points to the front of the camera (that is, perpendicular to the imaging plane), and the positive directions of the x-axis and the y-axis are parallel to the object coordinate system.
[0082] The camera coordinate is the coordinate of the to-be-measured point in the camera coordinate system. The pixel point belongs to a point on the 2D image, and the space constructed by the camera coordinate system is a 3D space. The conversion from the first pixel point to the camera coordinate is a perspective projection relationship, so that the camera coordinate of the first pixel point corresponding to the to-be-measured point in the camera coordinate system can be determined according to the perspective projection relationship.
[0083] S104: Determine the independent coordinate of the to-be-measured point in the independent coordinate system according to the camera coordinate.
[0084] Referring to Figure 3 The figure is a schematic diagram of a camera coordinate system and an independent coordinate system provided by an embodiment of the present application. Figure 3 The coordinate system shown on the left side is a camera coordinate system, Figure 3The coordinate system shown on the right side is an independent coordinate system, and both are composed of three mutually perpendicular axes, such as the X axis, the Y axis, and the Z axis.
[0085] The origin of the independent coordinate system is the same as the origin of the camera coordinate system, for example, the origin of the independent coordinate system and the origin of the camera coordinate system are both the position of the camera device. The first axis of the independent coordinate system coincides with the first axis of the camera coordinate system, for example, in Figure 3 , the X axis of the independent coordinate system can coincide with the X axis of the camera coordinate system. The second axis of the independent coordinate system is perpendicular to the bottom surface of the forage harvester, for example, if the forage harvester is driving on flat ground, that is, the bottom surface of the forage harvester is parallel to the ground, then the Z axis of the independent coordinate system is the second axis, which is perpendicular to the ground.
[0086] Continuing to take Figure 3 as an example, for the independent coordinate system, a right-handed coordinate system is established with the camera focal point as the origin, the X axis to the right, the Y axis to the back, and the Z axis downward. The relationship between the independent coordinate system and the camera coordinate system can be obtained by rotating the camera X axis clockwise by a certain angle. The rotation angle is obtained by measuring the angle between the perpendicular of the camera plane and the vertical direction. The rotation matrix from the camera coordinate system to the independent coordinate system can be calculated, and there is no translation. The Z axis of the independent coordinate system is perpendicular to the ground, and the XOY plane is parallel to the ground, that is, parallel to the vehicle frame plane.
[0087] As a possible implementation, the corresponding rotation matrix can be determined through the conversion relationship between the independent coordinate system and the camera coordinate system, and the rotation matrix is taken as the camera extrinsic parameter, so as to realize the determination of the independent coordinate according to the camera coordinate.
[0088] S105: Determine the forage depth at the to-be-measured point according to the independent coordinate of the to-be-measured point.
[0089] The second axis of the independent coordinate system is perpendicular to the bottom surface of the forage harvester, so that the distance between the to-be-measured point and the origin of the independent coordinate system can be determined through the Z axis component of the independent coordinate. For example, if the independent coordinate of the to-be-measured point can be represented as (x, y, z), the value of z is the Z axis component of the independent coordinate, which can represent the distance between the to-be-measured point and the origin of the independent coordinate system.
[0090] As can be seen from the above technical solution, a camera device captures the loading status of the hay in the hay receiving vehicle to obtain a first image. The location in the hay receiving vehicle where the hay height is to be measured is used as the measurement point. From the multiple first pixels included in the first image, the first pixel corresponding to the measurement point is determined. A camera coordinate system and an independent coordinate system are established based on the same origin. The first axis of the independent coordinate system coincides with the first axis of the camera coordinate system, and the second axis of the independent coordinate system is perpendicular to the bottom surface of the hay receiving vehicle. In other words, the relationship between the independent coordinate system and the camera coordinate system can be obtained by rotating a certain angle about the first axis. Therefore, the coordinate transformation between the two coordinate systems involves only rotational transformation, not translational transformation. This simplifies the coordinate transformation relationship, simplifying the parameters required for calibrating the extrinsic parameter matrix. Therefore, the camera coordinates of the measurement point in the camera coordinate system can be determined based on the first pixel corresponding to the measurement point. Based on these camera coordinates, the independent coordinates of the measurement point in the independent coordinate system can be determined. Since the second axis of the independent coordinates is perpendicular to the bottom surface of the hay receiving vehicle, the hay height at the measurement point can be determined based on the independent coordinates, simplifying the calculation.
[0091] As a possible implementation method, a first height difference between the origin of the camera coordinate system and the bottom surface of the grass receiving cart can be obtained, that is, the distance between the origin of the camera coordinate system and the bottom surface of the grass receiving cart. Since the second axis of the independent coordinate system of the measured point is perpendicular to the bottom surface of the grass receiving cart, and the origin of the independent coordinate system is the same as the origin of the camera coordinate system, the second height difference between the origin of the camera coordinate system and the grass at the measured point can be determined based on the independent coordinates of the measured point, that is, the distance between the origin of the camera coordinate system and the grass. Therefore, based on the first height difference and the second height difference, the height of the grass at the measured point can be determined. That is, the distance between the grass and the bottom surface of the grass receiving cart.
[0092] It should be noted that the grass receiving cart is a container for storing grass output from the silage machine outlet. Its shape can be as follows: Figure 2 The cube-like body shown in the figure has one open face compared to the cube with six faces, that is, the cube-like body has only five faces, and the missing face is the "top face" of the grass receiving cart, and the face corresponding to the "top face" is the bottom face of the grass receiving cart, so that the grass can be placed in the grass receiving cart through the "top face".
[0093] As a possible implementation method, a standard height can be obtained. The standard height is the height difference between the origin of the camera coordinate system and the plane where the top surface of the grass receiving cart is located, that is, the distance between the origin of the camera coordinate system and the top surface of the grass receiving cart. According to the independent coordinate system, the second height difference between the origin of the camera coordinate system and the grass at the test point is determined. If the second height difference is less than or equal to the standard height, it means that the height of the grass is greater than or equal to the top surface of the grass receiving cart, and the test point is full of grass. At this time, a prompt can be issued, or the discharge port can be stopped from discharging grass to the test point, or a test point that is not yet full of grass can be changed.
[0094] As a possible implementation manner, from the plurality of first pixel points included in the first image, a region pixel point set is determined, the region pixel point set includes at least one region pixel point, and the region pixel point is a pixel point around the first pixel point corresponding to the to-be-measured point. For example, 9 first pixel points can form a square, the first pixel point located in the middle of the 9 first pixel points is the first pixel point corresponding to the to-be-measured point, and the remaining 8 first pixel points form a region pixel set. The independent coordinates of the region pixel points included in the region pixel point set are obtained, for example, the camera coordinates of the region pixel points in the camera coordinate system are determined according to the region pixel points, and then the independent coordinates of the region pixel points in the independent coordinate system are determined according to the camera coordinates. The forage height at the to-be-measured point is determined according to the independent coordinates of the region pixel points and the independent coordinates of the to-be-measured point.
[0095] Embodiments of the present application do not specifically limit the manner of determining the plurality of region pixel points, for example, the pixel points around the first pixel point corresponding to the to-be-measured point are calculated according to a fixed pixel difference value.
[0096] As a possible implementation manner, the forage height at the to-be-measured point is determined to be not filled with forage after it is determined that the forage height corresponding to each region pixel point is less than the standard height according to the independent coordinates of the region pixel points, and the forage height corresponding to the to-be-measured point is less than the standard height according to the independent coordinates of the to-be-measured point. The spraying of forage is generally referred to as a cylindrical shape, and if only one to-be-measured point is judged, it is easy to cause misjudgment, so the judgment is based on the to-be-measured point and the points around it, which can improve the accuracy of the judgment.
[0097] As a possible implementation manner, the region pixel points included in the region pixel point set can form a U shape, surround the first pixel point corresponding to the to-be-measured point, and the opening of the U shape corresponds to the forage outlet of the silage machine. Referring to Figure 4 , this figure is a schematic diagram of a region pixel point set and a first pixel point corresponding to a to-be-measured point provided by an embodiment of the present application. In Figure 4 , the circles represent region pixel points, and the triangles represent first pixel points. Moreover Figure 4 , two region pixel point sets are included, Figure 4 , the region pixel points included in the upper subgraph form a U shape, Figure 4 , the region pixel points included in the lower subgraph form a belt shape, that is, the part of the to-be-measured point on the line segment parallel to the tail frame line and intersecting the two side frame lines on the left and right.
[0098] Taking the U shape as an example, that is, taking Figure 4 , the upper subgraph as an example, taking the to-be-measured point as the intersection point of the square diagonal, determining the square with a fixed side length, such as Figure 4The subgraph shown on the upper side constitutes a U-shaped region with four vertices and the midpoint of three edges, and the U-shaped opening corresponds to the forage outlet of the silage machine. Since the forage outlet of the silage machine will always have forage sprayed out, the image obtained by photographing the corresponding region will always show that there is forage at this position, so removing this point can improve the accuracy of the judgment.
[0099] As a possible implementation, the height of the forage can be drawn on the RGB image obtained by the camera, and even "please move the spray barrel at this point, the forage is full." Or print "please do not move the spray barrel at this point, the forage is not full." Thus, the current loading condition of the forage in the forage receiving vehicle is vividly displayed.
[0100] In addition to the method for determining the depth of forage based on the silage machine provided by the embodiments of the present application, a device for determining the depth of forage based on the silage machine is also provided, as shown in the accompanying drawings. Figure 5 As shown, it comprises an acquisition unit 501, a first determination unit 502, a second determination unit 503, a third determination unit 504 and a fourth determination unit 505.
[0101] The acquisition unit 501 is configured to acquire a first image photographed by a camera, wherein the camera is located on the throwing arm of the silage machine, and the first image is used to identify the loading condition of the forage in the forage receiving vehicle corresponding to the silage machine.
[0102] The first determination unit 502 is configured to determine a first pixel point corresponding to a to-be-measured point from a plurality of first pixel points included in the first image, wherein the to-be-measured point is used to identify the position of the forage in the forage receiving vehicle to be measured.
[0103] The second determination unit 503 is configured to determine a camera coordinate of the to-be-measured point in a camera coordinate system according to the first pixel point corresponding to the to-be-measured point.
[0104] The third determination unit 504 is configured to determine an independent coordinate of the to-be-measured point in an independent coordinate system according to the camera coordinate, wherein the origin of the independent coordinate system is the same as the origin of the camera coordinate system, the first axis of the independent coordinate system coincides with the first axis of the camera coordinate system, and the second axis of the independent coordinate system is perpendicular to the bottom surface of the forage receiving vehicle.
[0105] The fourth determination unit 505 is configured to determine the height of the forage at the to-be-measured point according to the independent coordinate of the to-be-measured point.
[0106] According to the technical scheme, the loading condition of the forage in the forage receiving vehicle is captured by the camera to obtain a first image, a position for measuring the height of the forage in the forage receiving vehicle is taken as a to-be-measured point, and a first pixel point corresponding to the to-be-measured point is determined from a plurality of first pixel points included in the first image. A camera coordinate system and an independent coordinate system are established based on the same origin, wherein the first axis of the independent coordinate system coincides with the first axis of the camera coordinate system, and the second axis of the independent coordinate system is perpendicular to the bottom surface of the forage receiving vehicle, that is, the relationship between the independent coordinate system and the camera coordinate system can be obtained by rotating the first axis by a certain angle, so that the coordinate conversion between the two coordinate systems only involves a rotation conversion, without a translation conversion, and the coordinate conversion relationship is simple, that is, the parameters required for the calibration of the external parameter matrix are simplified. Therefore, the camera coordinate of the to-be-measured point in the camera coordinate system can be determined according to the first pixel point corresponding to the to-be-measured point, and the independent coordinate of the to-be-measured point in the independent coordinate system can be determined according to the camera coordinate. Since the second axis of the independent coordinate is perpendicular to the bottom surface of the forage receiving vehicle, the height of the forage at the to-be-measured point can be determined according to the independent coordinate, and the calculation is simplified.
[0107] As a possible implementation manner, the fourth determination unit 505 is specifically configured to:
[0108] obtain a first height difference between the origin of the camera coordinate system and the bottom surface of the forage receiving vehicle;
[0109] determine a second height difference between the origin of the camera coordinate system and the forage of the to-be-measured point according to the independent coordinate of the to-be-measured point;
[0110] determine the height of the forage at the to-be-measured point according to the first height difference and the second height difference.
[0111] As a possible implementation manner, the device further includes a judgment unit configured to:
[0112] obtain a standard height, the standard height being a height difference between the origin of the camera coordinate system and a plane on which the top surface of the forage receiving vehicle is located;
[0113] determine a second height difference between the origin of the camera coordinate system and the forage of the to-be-measured point according to the independent coordinate of the to-be-measured point;
[0114] if the second height difference is less than or equal to the standard height, the to-be-measured point is full of forage.
[0115] As a possible implementation manner, the device further includes a fifth determination unit configured to:
[0116] obtain a second image captured by the camera, the second image being used to identify the condition of the top surface of the forage receiving vehicle;
[0117] obtain a plurality of second pixel points of the top surface of the forage receiving vehicle from the second image;
[0118] According to a plurality of the second pixel points, the plane where the grass truck top surface is located is determined.
[0119] As a possible implementation manner, the apparatus further includes a sixth determining unit, configured to:
[0120] From a plurality of first pixel points included in the first image, a region pixel point set is determined, the region pixel point set including at least one region pixel point, the region pixel point being a pixel point around the first pixel point corresponding to the to-be-measured point;
[0121] An independent coordinate of the region pixel point included in the region pixel point set is acquired;
[0122] The fourth determining unit 505 is specifically configured to:
[0123] According to the independent coordinate of the region pixel point and the independent coordinate of the to-be-measured point, the forage height at the to-be-measured point is determined.
[0124] As a possible implementation manner, the plurality of region pixel points included in the region pixel point set are in a U shape, surround the first pixel point corresponding to the to-be-measured point, and the opening of the U shape corresponds to the forage outlet of the silage machine.
[0125] As a possible implementation manner, the camera device is a binocular camera.
[0126] Embodiments of the present application further provide a computer device, referring to Figure 6 , which shows a structural diagram of a computer device provided by embodiments of the present application, as Figure 6 , the device includes a memory 610 and a processor 620:
[0127] The memory 610 is used to store program code and transmit the program code to the processor;
[0128] The processor 620 is used to execute any one of the forage depth determination methods based on a silage machine provided by the above embodiments according to the instructions in the program code.
[0129] Embodiments of the present application provide a computer readable storage medium, which is used to store a computer program, and the computer program is used to execute any one of the forage depth determination methods based on a silage machine provided by the above embodiments.
[0130] The embodiment of the present application further provides a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the silage-based grass depth determination method provided in various optional implementation manners of the above aspect.
[0131] It should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related parts can be referred to the method part.
[0132] It should be understood that in the present application, “at least one” means one or more, and “multiple” means two or more. “And / or” is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, “A and / or B” can represent three cases of only A, only B and A and B existing at the same time, wherein A and B can be singular or plural. The character “ / ” generally represents an “or” relationship between the front and rear associated objects. “At least one of the following” or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can represent a, b, c, “a and b”, “a and c”, “b and c”, or “a and b and c”, wherein a, b and c can be single or multiple.
[0133] It should also be noted that in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms “include”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement “including a…” does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0134] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and
[0135] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments of the application will be apparent to those of skill in the art upon reviewing the above description. The scope of the application should, therefore, be determined not with reference to the above description, but instead should be determined with reference to the appended claims, along with their full scope of equivalents.
Claims
1. A silage-based forage depth determination method, characterized by, The method comprises: acquiring a first image captured by a camera device, the first image being used to identify the loading condition of forage in a forage receiving vehicle corresponding to the silo; from a plurality of first pixel points included in the first image, determining a first pixel point corresponding to a to-be-measured point, the to-be-measured point being used to identify a position in the forage receiving vehicle where the height of forage to be measured is to be measured; determining, according to the first pixel point corresponding to the to-be-measured point, a camera coordinate of the to-be-measured point in a camera coordinate system; determining, according to the camera coordinate, an independent coordinate of the to-be-measured point in an independent coordinate system, the origin of the independent coordinate system being the same as the origin of the camera coordinate system, the first axis of the independent coordinate system being coincident with the first axis of the camera coordinate system, and the second axis of the independent coordinate system being perpendicular to the bottom surface of the forage receiving vehicle; determining, according to the independent coordinate of the to-be-measured point, the height of forage at the to-be-measured point; the determining, according to the independent coordinate of the to-be-measured point, the height of forage at the to-be-measured point, comprises: acquiring a first height difference between the origin of the camera coordinate system and the bottom surface of the forage receiving vehicle; determining, according to the independent coordinate of the to-be-measured point, a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point; determining, according to the first height difference and the second height difference, the height of forage at the to-be-measured point.
2. The method of claim 1, wherein, The method further comprises: acquiring a standard height, the standard height being a height difference between the origin of the camera coordinate system and a plane on which the top surface of the forage receiving vehicle is located; determining, according to the independent coordinate of the to-be-measured point, a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point; if the second height difference is less than or equal to the standard height, the to-be-measured point is full of forage.
3. The method of claim 2, wherein, The method further comprises: acquiring a second image captured by the camera device, the second image being used to identify the condition of the top surface of the forage receiving vehicle; acquiring a plurality of second pixel points of the top surface of the forage receiving vehicle from the second image; determining the plane on which the top surface of the forage receiving vehicle is located according to the plurality of second pixel points.
4. The method of claim 1, wherein, The method further comprises: from a plurality of first pixel points included in the first image, determining a set of regional pixel points, the set of regional pixel points including at least one regional pixel point, the regional pixel point being a pixel point around the first pixel point corresponding to the to-be-measured point; acquiring the independent coordinates of the regional pixel points included in the set of regional pixel points; the determining, according to the independent coordinate of the to-be-measured point, the height of forage at the to-be-measured point, comprises: determining, according to the independent coordinates of the regional pixel points and the independent coordinate of the to-be-measured point, the height of forage at the to-be-measured point.
5. The method of claim 4, wherein, The plurality of regional pixel points included in the set of regional pixel points are in a U shape, surround the first pixel point corresponding to the to-be-measured point, and the opening of the U shape corresponds to the forage outlet of the silo.
6. The method according to any one of claims 1 to 5, characterized in that, The camera device is a binocular camera.
7. A silage-based forage depth determination device, characterized by, The device comprises an acquisition unit, a first determination unit, a second determination unit, a third determination unit, and a fourth determination unit. The acquisition unit is configured to acquire a first image captured by a camera device, the camera device being located on a throwing arm of the silage machine, and the first image being used to identify a loading condition of forage in a forage receiving vehicle corresponding to the silage machine. The first determination unit is configured to determine a first pixel point corresponding to a to-be-measured point from a plurality of first pixel points included in the first image, the to-be-measured point being used to identify a position at which a height of the forage is to be measured in the forage receiving vehicle. The second determination unit is configured to determine a camera coordinate of the to-be-measured point in a camera coordinate system according to the first pixel point corresponding to the to-be-measured point. The third determination unit is configured to determine an independent coordinate of the to-be-measured point in an independent coordinate system according to the camera coordinate, the origin of the independent coordinate system being the same as that of the camera coordinate system, the first axis of the independent coordinate system being coincident with the first axis of the camera coordinate system, and the second axis of the independent coordinate system being perpendicular to a bottom surface of the forage receiving vehicle. The fourth determination unit is configured to determine a height of the forage at the to-be-measured point according to the independent coordinate of the to-be-measured point. The fourth determination unit is specifically configured to: acquire a first height difference between the origin of the camera coordinate system and the bottom surface of the forage receiving vehicle; determine a second height difference between the origin of the camera coordinate system and the forage at the to-be-measured point according to the independent coordinate of the to-be-measured point; and determine the height of the forage at the to-be-measured point according to the first height difference and the second height difference.
8. A computer device, comprising: The device includes a processor and a memory: The memory is configured to store program code and transmit the program code to the processor. The processor is configured to execute the method according to any one of claims 1-6 according to instructions in the program code.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium is configured to store a computer program, and the computer program is configured to execute the method according to any one of claims 1-6.
Citation Information
Patent Citations
Target detection and three-dimensional positioning method and system based on unmanned aerial vehicle
CN113850126A
Information processing method and device, cloud-based processing device, and computer program product
US20200090323A1