Green soy bean screening method and system, screening equipment and storage medium
By detecting image recognition and jetting to remove problematic edamame, the problem that size screening in existing technologies cannot handle mildew and insect damage is solved, and efficient and accurate edamame screening is achieved.
Patent Information
- Application Number
- CN202510777569.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-10-17
AI Technical Summary
The existing technology can only screen edamame from the perspective of size and cannot handle defects such as mildew and insect damage, resulting in poor screening effect.
By acquiring the detection image to identify the problem edamame, determine its position coordinates and use the target nozzle to spray air, so that a gap is created at the edge of the conveyor belt, causing the problem edamame to fall. At the same time, the jet rotation mode is set to prevent adjacent edamame from being mistakenly removed, and overlapping edamame is processed to improve screening accuracy.
It realizes the identification and removal of moldy and insect-infested edamame, improves the efficiency and accuracy of edamame screening, and ensures that normal edamame is not mistakenly removed.
Smart Images

Figure CN120790554A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of processing green soybeans, and in particular to a green soybean screening method, system, screening device and storage medium. BACKGROUND
[0002] In related technologies, when screening green soybeans, a vibrating screen is used for screening, and a technician pre-sets the aperture of the vibrating screen, and uses the vibrating screen to separate green soybeans of inappropriate sizes, and retains green soybeans larger than the aperture.
[0003] In related technologies, when screening green soybeans, only the size can be considered, and defects such as mold and insect damage cannot be handled, resulting in poor screening effect of green soybeans. SUMMARY
[0004] In order to improve the screening effect of green soybeans, the present application provides a green soybean screening method, system, screening device and storage medium.
[0005] In a first aspect, the present application provides a green soybean screening method, which adopts the following technical solution: A green soybean screening method, comprising: obtaining a detection image of a detection area, the detection image comprising at least one green soybean to be detected, the green soybean to be detected being placed on a conveying device, the conveying device being composed of n conveying belts, n being an integer greater than 1; determining a problem green soybean from the green soybean to be detected according to the detection image; obtaining a target conveying belt where the problem green soybean is located and a position coordinate of the problem green soybean; determining a target nozzle corresponding to the target conveying belt, the target nozzle being arranged above the target conveying belt; based on the position coordinate, setting a target point, the target point being located on a target side of the target conveying belt, the target side being a side of the target conveying belt close to the problem green soybean; controlling the target nozzle to spray air towards the target point, so that a gap is generated at the edge of the target conveying belt, and the problem green soybean falls from the gap.
[0006] By adopting the above technical solution, the problem green soybean in the detection area is obtained through the detection image, and the position coordinate of the problem green soybean and the target nozzle to be worked are determined. Then, the position of the target nozzle and the position coordinate are set to set the target point. The target nozzle is used to spray air towards the target point, so that a gap is generated at the edge of the target conveying belt, and the problem green soybean falls from the conveying device. This scheme can identify moldy and insect-damaged green soybeans, and improve the screening effect of green soybeans.
[0007] Optionally, the second 2k-1 conveyor belt in the conveying device is controlled to move at a first speed, and the second 2k conveyor belt in the conveying device is controlled to move at a second speed, the first speed is greater than the second speed, the width of the second 2k-1 conveyor belt is greater than the width of the second 2k conveyor belt, and k is an integer greater than 0.
[0008] By adopting the above technical solution, the conveyor belts in the conveying device are controlled to move in different ways, so that the soybeans in the conveying device can move in the same direction, and the stacking of soybeans can be reduced.
[0009] Optionally, the distance value of the target nozzle to the position coordinate is obtained. The jet speed of the target nozzle is set according to the distance value. The direction of the target nozzle is controlled to be towards the position coordinate, and the target nozzle is turned on to jet according to the jet speed. In response to monitoring that the problem soybean moves, the direction of the target nozzle is updated to be towards the target point.
[0010] By adopting the above technical solution, the jet speed and direction of the target nozzle are set, so that the problem soybean can move to the edge of the conveying belt and fall off from the gap at the edge of the conveying belt. This method ensures that the problem soybean can be smoothly screened out, and improves the screening efficiency of the soybean.
[0011] Optionally, the adjacent soybean of the problem soybean is determined through the detection image. If the shortest distance between the adjacent soybean and the problem soybean is less than a preset distance threshold, two first detection straight lines are drawn in the detection image, the first detection straight line passes through the end point of the adjacent soybean, and the first detection straight line is perpendicular to the moving direction of the conveying device. A target detection straight line in the detection straight line is determined, and the target detection straight line passes through the problem soybean. A target end point corresponding to the target detection straight line is determined on the adjacent soybean. The jet rotation mode is set with reference to the target end point. The target nozzle is turned on, and the direction of the target nozzle is controlled to move along the jet rotation mode.
[0012] By adopting the technical scheme, in the case that the shortest distance between the adjacent hair beans and the problem hair beans is less than the preset distance threshold, the jet rotation mode of the target nozzle is set, and the target nozzle is controlled to move according to the jet rotation mode, so that the adjacent hair beans and the problem hair beans are separated in space, and the adjacent hair beans are prevented from being removed together with the problem hair beans in the process of removing the problem hair beans, thereby improving the accuracy of hair bean screening.
[0013] Optionally, a second detection straight line passing through the end point of the problem hair bean is set in the detection image, the second detection straight line is parallel to the first detection straight line, and the second detection straight line passes through the adjacent hair bean. An intersection point of the second detection straight line and the adjacent hair bean is obtained. A center point between the intersection point and the target end point on the adjacent hair bean is obtained. A path moving direction is set, and an angle between the path moving direction and the adjacent hair bean is a preset angle. A line segment passing through the center point is drawn along the path moving direction, and the jet rotation mode is obtained.
[0014] By adopting the technical scheme, the path moving direction and the center point are obtained by using the first detection straight line and the second detection straight line, and the jet rotation mode is set based on the path moving direction and the center point. The influence of the jet rotation mode on the adjacent hair beans is as small as possible, and the problem hair beans can also be ensured to fall from the conveying device.
[0015] Optionally, it is judged whether there is a problem area in the detection image. If there is, it is judged whether the problem area belongs to an overlapping area of hair beans. If yes, an overlapping area image of a first overlapping hair bean and a second overlapping hair bean is extracted from the detection image, the first overlapping hair bean is located above the second overlapping hair bean. A pretreatment nozzle corresponding to the overlapping area image is determined. The overlapping area image is fitted by using a rectangular frame. The overlapping area image is fitted by using a rectangular frame. An overlapping mode of the first overlapping hair bean and the second overlapping hair bean is obtained. The pretreatment nozzle is controlled to work according to the jet mode.
[0016] By adopting the technical scheme, after the overlapping hair beans appear, the pretreatment nozzle is worked to separate the overlapping hair beans, and then it is judged whether the quality of the hair beans is qualified. The identification effect of the quality of the hair beans is improved, and the problem hair beans can be correctly identified and removed.
[0017] Optionally, it is judged whether the overlapping mode corresponds to a preset overlapping mode. If yes, a first pretreatment path is set along a direction perpendicular to a moving direction of the conveying device, the first pretreatment path passing through the region position; the air jet mode is formed according to the first pretreatment path, and the pretreatment nozzle rotates along the first pretreatment path. If no, a second pretreatment path is formed according to a top-bottom relationship between the first overlapping soybean and the second overlapping soybean, the second pretreatment path passing through the second overlapping soybean first and then passing through the first overlapping soybean; the air jet mode is formed according to the second pretreatment path, and the pretreatment nozzle rotates along the second pretreatment path.
[0018] By using the above technical solution, different pretreatment paths are set according to the size relationship between the included angle value and the preset included angle threshold value, so that the pretreatment path in different situations can effectively process the overlapping soybeans, improve the identification effect of soybean quality, and ensure that the problem soybeans can be correctly identified and removed.
[0019] In a second aspect, the present application provides a soybean screening system, which adopts the following technical solution: A soybean screening system, comprising: An acquisition module, configured to acquire a detection image; A memory, configured to store a program of the soybean screening method; A processor, the program in the memory can be loaded and executed by the processor and implement the soybean screening method.
[0020] By using the above technical solution, the problem soybeans in the detection region are acquired through the detection image, and the position coordinates of the problem soybeans and the target nozzle to be worked are determined. Then, the target nozzle position and the position coordinates are set to a target point. The target nozzle is used to spray air towards the target point, so that a gap is generated at the edge of the target conveying belt, and the problem soybeans fall off the conveying device. This scheme can identify moldy and worm-eaten soybeans, and improve the screening effect of soybeans.
[0021] In a third aspect, the present application provides a screening device, which adopts the following technical solution: A screening device, comprising a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to implement any one of the above-mentioned soybean screening methods.
[0022] In a fourth aspect, the present application provides a computer storage medium, which can store a corresponding program and has the characteristics of facilitating the improvement of the soybean screening effect, and adopts the following technical solution: A computer readable storage medium, storing a computer program capable of being loaded and executed by a processor to implement any one of the above-mentioned soybean screening methods.
[0023] In summary, the present application includes at least one of the following beneficial technical effects: 1. By detecting the problem beans in the detection area through the image acquisition, the position coordinates of the problem beans and the target nozzle that needs to be worked are determined. Then the position of the target nozzle and the position coordinates are set as the target point. The target nozzle is used to spray air towards the target point, so that a gap is generated at the edge of the target conveying belt, and the problem beans fall off the conveying device. This scheme can identify moldy and worm-eaten beans, and improve the screening effect of the beans; 2. In the case where the shortest distance between the adjacent beans and the problem beans is less than the preset distance threshold, the air jet rotation mode of the target nozzle is set, and the target nozzle is controlled to move according to the air jet rotation mode, so that the adjacent beans and the problem beans are separated in space, preventing the adjacent beans from being removed together with the problem beans during the removal of the problem beans, and improving the accuracy of the bean screening; 3. The path moving direction and the center point are obtained by using the first detection straight line and the second detection straight line, and the air jet rotation mode is set based on the path moving direction and the center point. The influence of the air jet rotation mode on the adjacent beans is as small as possible, and at the same time, the problem beans can also fall off the conveying device. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 is a schematic diagram of a bean screening device provided by an embodiment of the present application.
[0025] Figure 2 is a flowchart of a bean screening method provided by an embodiment of the present application.
[0026] Figure 3 is a flowchart of a nozzle control method provided by an embodiment of the present application.
[0027] Figure 4 is a flowchart of a nozzle control method based on an air jet rotation mode provided by an embodiment of the present application.
[0028] Figure 5 is a schematic diagram of a detection straight line provided by an embodiment of the present application.
[0029] Figure 6 is a flowchart of a generation method of an air jet rotation mode provided by an embodiment of the present application.
[0030] Figure 7 is a flowchart of a bean preprocessing method one provided by an embodiment of the present application.
[0031] Figure 8 is a schematic diagram of a bean overlapping mode provided by an embodiment of the present application.
[0032] Figure 9 is a flowchart of a soybean pretreatment method two provided by an embodiment of the present application.
[0033] Figure 10 is a schematic diagram of a soybean screening system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further describes the present application with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Figure 1 to Figure 10 and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0035] An embodiment of the present application discloses a soybean screening device. Please refer to Figure 1 The device includes a conveying device 11, a nozzle 12 and an image acquisition device 13.
[0036] The conveying device 11 is used to convey soybeans. The conveying device 11 is composed of n conveying belts, and n is an integer greater than 1. The 2k-1th conveying belt in the conveying device 11 moves at a first speed, and the 2kth conveying belt in the conveying device 11 moves at a second speed, the first speed is greater than the second speed, the width of the 2k-1th conveying belt is greater than the width of the 2kth conveying belt, and k is an integer greater than 0.
[0037] The nozzle 12 is a device for controlling the outflow of gas, so that the gas produces a jet effect. In the present application, the nozzle 12 is used to screen out problem soybeans from the conveying device 11. For example, the nozzle 12 sprays gas to the edge of the conveying belt, so that one side of the edge of the conveying belt bends downward, thereby forming a gap between the two conveying belts. Under the action of gravity and the gas sprayed by the nozzle 12, the problem soybeans fall from the gap. The nozzle 12 is arranged above the conveying device 11. In the present application, the projection of the nozzle 12 on the conveying device 11 is located at the joint of two adjacent conveying belts.
[0038] The image acquisition device 13 is used to acquire the image of the detection area. The detection area is a preset area on the conveying device 11. Optionally, the image acquisition device 13 is an X-ray machine.
[0039] An embodiment of the present application discloses a soybean screening method. Please refer to Figure 2 The method includes: Step S201: acquiring a detection image of a detection area, the detection image including at least one soybean to be detected, the soybean to be detected being placed on a conveying device, the conveying device being composed of n conveying belts, and n being an integer greater than 1.
[0040] The detection area is located on the conveying device, and the specific position of the detection area can be set by the technician according to the actual situation.
[0041] Optionally, the detection image is an X-ray image of the detection area.
[0042] In the embodiment of the present application, the 2k-1th conveying belt in the conveying device is controlled to move at a first speed, and the 2kth conveying belt in the conveying device is controlled to move at a second speed, the first speed is greater than the second speed, the width of the 2k-1th conveying belt is greater than the width of the 2kth conveying belt, and k is an integer greater than 0. When the conveying belts of the conveying device are set in the above manner, the green beans across the two conveying belts can be concentrated to the edge of the conveying belt. As follows, when the first part of the green bean is located on the 2k-1th conveying belt and the second part of the green bean is located on the 2kth conveying belt, due to the speed difference between the 2k-1th conveying belt and the 2kth conveying belt, the green bean will rotate under the action of friction until the long side of the green bean contacts the edge of the conveying belt, so that the green bean can be concentrated to the edge of the conveying belt.
[0043] In the embodiment, the sum of the widths of the 2k-1th conveying belt and the 2kth conveying belt is greater than the maximum length of the green bean.
[0044] Step S202: determining the problem green bean from the to-be-inspected green beans according to the detection image.
[0045] Optionally, the to-be-inspected green bean image corresponding to the to-be-inspected green bean is identified in the detection image. Whether the to-be-inspected green bean is a problem green bean is judged according to the to-be-inspected green bean image. For example, when the detection image is an X-ray image, the image corresponding to the green bean will appear gray. Therefore, a first brightness threshold is set to obtain the to-be-inspected green bean image in the detection image. The image greater than the first brightness threshold is classified as a to-be-inspected green bean image, and the image less than the first brightness threshold is classified as a non-to-be-inspected green bean image. Optionally, after obtaining the detection image, the contrast of the detection image can also be improved to highlight the to-be-inspected green bean.
[0046] Further, if the green bean has mold, the density of the mold area will be uneven, which will be reflected in the detection image as a light-dark change area. If the green bean has insect damage, the insect damage area will be reflected in the detection image as a local dark area. Therefore, the gray value gradient of the to-be-inspected green bean image is calculated. Whether the to-be-inspected green bean image has the above light-dark change area or local dark area is judged according to the gray value gradient, so as to judge whether the to-be-inspected green bean is a problem green bean.
[0047] Furthermore, to ensure that the edamame beans are full, after obtaining the image of the edamame beans to be inspected, since the beans and bean skins will appear different colors in the inspection image, a second brightness threshold can be set to distinguish between the beans and bean skins, and the area in the edamame image to be inspected that is greater than the second brightness threshold is classified as a bean image; and the area in the edamame image to be inspected that is less than the second brightness threshold is classified as a bean skin image. If the area of the bean image is greater than the preset area threshold, it means that the beans are full and the corresponding edamame beans to be inspected meet the standards. If the area of the bean image is less than the preset area threshold, it means that the beans are shriveled and the corresponding edamame beans to be inspected do not meet the standards, and the edamame beans to be inspected are considered problematic.
[0048] Step S203: Obtain the target conveyor belt where the problematic edamame is located and the location coordinates of the problematic edamame.
[0049] The target conveyor belt refers to the conveyor belt where the projection of the problem soybeans falls onto the conveyor device. The target conveyor belt can be a single conveyor belt or two adjacent conveyor belts.
[0050] Optionally, use a rectangular box to fit the problem bean, and take the geometric midpoint of the rectangular box as the position coordinate.
[0051] Step S204: determining a target nozzle corresponding to the target conveyor belt, where the target nozzle is disposed above the target conveyor belt.
[0052] Optionally, take the example where the projection of the nozzle on the conveying device is located at the joint of two adjacent conveyor belts. When the target conveyor belt is one conveyor belt, obtain the first distance and the second distance from the problem edamame to both sides of the target conveyor belt. Take the larger value of the first distance and the second distance, and determine the target side corresponding to the larger value. Determine the nozzle corresponding to the target side as the target nozzle. For example, the target conveyor belt is the 5th conveyor belt, and the 5th conveyor belt has two sides, the first side is connected to the 4th conveyor belt, and the second side is connected to the 6th conveyor belt. If the distance from the problem edamame to the first side is farther, the first side is regarded as the target side, so the nozzle between the 4th conveyor belt and the 5th conveyor belt is taken as the target nozzle.
[0053] If the target conveyor belts are two adjacent conveyor belts, the nozzles above the two adjacent conveyor belts are directly considered as the target nozzles. For example, if the problem edamame beans span the 4th and 5th conveyor belts, the nozzles between the 4th and 5th conveyor belts are taken as the target nozzles.
[0054] Step S205: Based on the position coordinates, a target point is set. The target point is located on the target side of the target conveyor belt. The target side is the side of the target conveyor belt close to the problem edamame.
[0055] For example, a vertical line segment perpendicular to the target side is drawn based on the position coordinates, and the intersection of the vertical line segment and the target side is the target point.
[0056] Step S206: controlling the target nozzle to spray air towards the target point, so that a gap is generated between the edge of the target conveyor belt, and the problem soybeans fall from the gap.
[0057] When the target nozzle sprays air towards the target point, since the target point is located on one side of the conveyor belt, the conveyor belt will be tilted due to the effect of the nozzle, and a gap will be generated between the target conveyor belt and its adjacent conveyor belt. Under the action of gravity and the nozzle, the problem soybeans will fall from the gap, thereby realizing the screening of the soybeans.
[0058] By adopting the above technical solution, the problem soybeans in the detection area are obtained through image detection, and the position coordinates of the problem soybeans and the target nozzle to be operated are determined. Then, the target point is set according to the position of the target nozzle and the position coordinates. The target nozzle sprays air towards the target point, so that a gap is generated between the edge of the target conveyor belt, and the problem soybeans fall from the gap. This scheme can identify moldy and worm-eaten soybeans, and improve the screening effect of soybeans.
[0059] In the following embodiments, when controlling the target nozzle, if the distance between the problem soybeans and the target point is far, the position of the problem soybeans needs to be adjusted first, and then the problem soybeans are processed after being close to the target point. Therefore, the present application discloses a nozzle control method. Referring to Figure 3 , the method comprises: Step S301: obtaining a distance value from the target nozzle to the position coordinates.
[0060] For example, a three-dimensional space coordinate system is established. The position coordinates are converted into a first three-dimensional coordinate in the three-dimensional space coordinate system. The second three-dimensional coordinate of the target nozzle in the three-dimensional space coordinate system is obtained, wherein the second three-dimensional coordinate can be pre-set. The straight-line distance between the first three-dimensional coordinate and the second three-dimensional coordinate is calculated to obtain the distance value.
[0061] Step S302: setting the air jet speed of the target nozzle according to the distance value.
[0062] The air jet speed is positively correlated with the distance value, that is, the greater the distance value, the greater the air jet speed. This is because the greater the distance value, the farther the target nozzle is from the problem soybeans, and a greater air jet speed needs to be provided to make the target nozzle blow the problem soybeans.
[0063] Step S303: controlling the direction of the target nozzle to be towards the position coordinates, and turning on the target nozzle, so that the target nozzle sprays air at the air jet speed.
[0064] For example, when controlling the direction of the target nozzle, a perpendicular line segment is drawn based on the position coordinates, and the intersection of the perpendicular line segment and the target side is the target point. The direction of the position coordinates to the target point is set as the target direction. In the opposite direction of the target direction, a starting point is taken on the perpendicular line segment from the position coordinates, and the length of the line segment between the starting point and the position coordinates is a preset length. The direction of the target nozzle is first directed to the starting point, and then the direction of the target nozzle is gradually changed from the starting point to the position coordinates.
[0065] Step S304: In response to monitoring that the problem beans generate movement, updating the direction of the target nozzle to the target point.
[0066] Optionally, the detection image is acquired every preset time length. In the two adjacent detection images, the position coordinate change vector is obtained according to the change of the position coordinates of the problem beans, the starting point of the position coordinate change vector is the position coordinates of the problem beans in the previous detection image, and the end point of the position coordinate change vector is the position coordinates of the problem beans in the next detection image. The projection length of the position coordinate change vector in the target direction is calculated. If the projection length is greater than a preset length threshold, it is considered that the problem beans have moved a sufficient distance, and it is considered that the problem beans have moved. If the projection length is less than the preset length threshold, it is considered that the problem beans have not moved.
[0067] When detecting that the problem beans generate movement, it is considered that the problem beans have moved, and the nozzle speed of the target nozzle meets the requirement of blowing the problem beans. Therefore, the direction of the target nozzle is updated to the target point. Moreover, in the process of updating the direction of the target nozzle, the movement direction of the problem beans is consistent with the direction of the target nozzle, and the problem beans can be further blown to ensure that the problem beans fall off the conveying belt.
[0068] In another direction of the embodiment, if the problem beans do not generate movement within a preset detection time length, the air jet speed of the target nozzle is increased.
[0069] By adopting the above technical solution, the air jet speed and the air jet direction of the target nozzle are set, so that the problem beans can move to the edge of the conveying belt and fall off from the gap at the edge of the conveying belt. This method ensures that the problem beans can be smoothly screened out, and improves the screening efficiency of the beans.
[0070] In actual scenarios, the distance between two beans may be relatively small. If one of the beans is a problem bean, the other normal bean may also be removed when the problem bean is removed. To reduce this situation, an embodiment of the present application discloses a nozzle control method based on air jet rotation. Figure 4 The method comprises: Step S401: Determine the adjacent beans of the problem bean by detecting the image.
[0071] Optionally, in the detection image, a circle is formed with the position coordinate as the center and the preset adjacent length as the radius. The beans (except the problem bean) having the overlapping area with the aforementioned circle are regarded as the adjacent beans.
[0072] Optionally, in the detection image, the edge curve of the problem bean is obtained. The closed adjacent curve is set and the adjacent curve forms the adjacent domain. For any point on the adjacent curve, the shortest distance to the edge curve is the preset adjacent length. The beans having the overlapping area with the adjacent domain are regarded as the adjacent beans.
[0073] Step S402: In the case that the shortest distance between the adjacent bean and the problem bean is less than the preset distance threshold, two first detection straight lines are drawn in the detection image. The first detection straight line passes through the end point of the adjacent bean and the first detection straight line is perpendicular to the moving direction of the conveying device.
[0074] The preset distance threshold is the preset empirical value. The skilled in the art can adjust the specific value of the preset distance threshold according to the actual demand.
[0075] The two ends of the bean refer to the tip of the pod and the end connected to the stem. On the other hand, the first detection straight line is perpendicular to the moving direction of the conveying device, which can also be considered as the first detection straight line being perpendicular to the target side.
[0076] For example, please refer to Figure 5 For the problem bean 51 and the adjacent bean 52, the points A and B represent the two end points of the adjacent bean 52, and the first detection straight line AN and the first detection straight line BM are drawn.
[0077] Step S403: Determine the target detection straight line in the detection straight line, and the target detection straight line passes through the problem bean.
[0078] For example, please refer to Figure 5 Since the first detection straight line AN passes through the problem bean, and the first detection straight line BM does not pass through the problem bean, the first detection straight line AN is regarded as the target detection straight line.
[0079] Step S404: Determine the target end point corresponding to the target detection straight line on the adjacent bean.
[0080] The target end point refers to the end point of the adjacent bean through which the target detection straight line passes. For example, please refer to Figure 5 The target detection straight line is the first detection straight line AN, and the target end point is the point A.
[0081] Step S405: Set the jet rotation mode with the target end point as the reference.
[0082] The jet rotation mode refers to a change mode of the direction of the target nozzle.
[0083] Step S406: Turn on the target nozzle, and control the direction of the target nozzle to move in the jet rotation mode.
[0084] Exemplarily, when the target nozzle is turned on and the direction of the target nozzle is controlled to move in the jet rotation mode, the action position of the target nozzle also changes, so that the adjacent hair bean and the problem hair bean are separated from each other under the action of the target nozzle, and the adjacent hair bean and the problem hair bean are prevented from being removed together due to being too close.
[0085] By adopting the technical solution, in the case that the shortest distance between the adjacent hair bean and the problem hair bean is less than the preset distance threshold, the jet rotation mode of the target nozzle is set, and the target nozzle is controlled to move according to the jet rotation mode, so that the adjacent hair bean and the problem hair bean are separated in space, and the adjacent hair bean and the problem hair bean are prevented from being removed together in the process of removing the problem hair bean, thereby improving the accuracy of hair bean screening.
[0086] In the following embodiments, how the jet rotation mode is obtained through the target endpoint will be described. Therefore, the present embodiment discloses a generation method of the jet rotation mode. Referring to Figure 6 , the method comprises: Step S601: A second detection straight line passing through the endpoint of the problem hair bean is set in the detection image, the second detection straight line is parallel to the first detection straight line, and the second detection straight line passes through the adjacent hair bean.
[0087] Exemplarily, referring to Figure 5 , the second detection straight line CP passes through the endpoint C of the problem hair bean 51, and the second detection straight line CP is parallel to the first detection straight line AN, and the second detection straight line passes through the adjacent hair bean 52.
[0088] Step S602: Obtain a detection intersection point of the second detection straight line and the adjacent hair bean.
[0089] Optionally, the adjacent hair bean is fitted by using a rectangular frame. The intersection point of the second detection straight line and the rectangular frame is taken as the detection intersection point. Optionally, an edge curve of the adjacent hair bean is obtained. The intersection point of the edge curve and the second detection curve is obtained. The point close to the problem hair bean in the intersection point is regarded as the detection intersection point.
[0090] Exemplarily, referring to Figure 5 , the second detection straight line CP intersects with the adjacent hair bean at point D, and then point D is the detection intersection point.
[0091] Step S603: Obtain a center point between the detection intersection point and the target endpoint on the adjacent hair bean.
[0092] Exemplarily, the detection intersection point and the target endpoint are connected to obtain a connection line segment. A midpoint of the connection line segment is taken as the center point.
[0093] Exemplarily, as shown in Figure 5 , the detection intersection point D and the target endpoint B are connected to obtain a connection line segment BD. A midpoint of the connection line segment BD is taken to obtain the center point E.
[0094] Step S604: A path movement direction is set, and an angle between the path movement direction and the adjacent beans is a preset angle.
[0095] The preset angle is a preset empirical value, and a technician can adjust the value of the preset angle according to actual conditions.
[0096] Further, the angle between the path movement direction and the adjacent beans can also refer to an included angle between the path movement direction and a corresponding rectangular frame of the adjacent beans.
[0097] Exemplarily, as shown in Figure 5 , the path movement direction is set as a ray, and the angle between the ray and the adjacent beans is a preset angle.
[0098] Step S605: A line segment passing through the center point is made along the path movement direction to obtain a jet rotation mode.
[0099] Optionally, the line segment passing through the center point is made along the path movement direction, so that when the target nozzle rotates according to the jet rotation mode, a point where the target nozzle falls on the conveying device moves along the aforementioned line segment.
[0100] By using the above technical solution, the path movement direction and the center point are obtained by using the first detection straight line and the second detection straight line, and the jet rotation mode is set based on the path movement direction and the center point. The influence of the jet rotation mode on the adjacent beans is as small as possible, and the problem beans can also be ensured to fall off the conveying device.
[0101] In the following embodiments, two beans may be overlapped, which affects the judgment of the problem beans. Therefore, after the overlapped beans are found, the overlapped beans need to be separated to ensure the accuracy of the subsequent steps. Therefore, the present application discloses a bean preprocessing method I. Referring to Figure 7 , the method comprises the following steps. Step S701: It is judged whether a problem area exists in the detection image.
[0102] The problem area refers to a light and dark change area or a local dark color area in the detection image. The acquisition method of the problem area can refer to step S202 of the embodiment shown in Figure 2 .
[0103] Step S702: If there is, determine whether the problem area belongs to the overlapping area of the soybeans.
[0104] In another aspect of the embodiment, if there is no problem area in the detection image, it means that the soybeans in the detection image neither overlap nor have quality problems.
[0105] The problem area can be caused by mold or insect damage of the soybeans, or caused by the soybeans overlapping with each other. Therefore, it is necessary to determine the cause of the problem area.
[0106] Optionally, the soybean area corresponding to the overlapping area is taken, and the soybean area is formed by one or more formed areas. If the shape of the soybean area meets the preset shape of a single soybean, it is considered that the problem area does not belong to the overlapping area of the soybeans; if the shape of the soybean area does not meet the preset shape of a single soybean, it is considered that the problem area belongs to the overlapping area of the soybeans.
[0107] Step S703: If yes, extract the overlapping area image of the first overlapping soybean and the second overlapping soybean from the detection image, and the first overlapping soybean is located above the second overlapping soybean.
[0108] In another aspect of the embodiment, if it is determined that the problem area does not belong to the overlapping area of the soybeans, it means that the problem area is not caused by the soybeans overlapping with each other, but caused by mold or insect damage of the soybeans.
[0109] The overlapping area image refers to the overlapping area of the soybeans in the detection image. Further, the problem area in the above step is taken as the overlapping area image.
[0110] Step S704: Determine the pretreatment nozzle corresponding to the overlapping area image.
[0111] Optionally, the conveying belt corresponding to the overlapping area image is determined to obtain an overlapping conveying belt. The pretreatment nozzle is determined based on the overlapping conveying belt. The overlapping conveying belt refers to the conveying belt on which the projection of the overlapping area image on the conveying device falls. The overlapping conveying belt can be one conveying belt, or two adjacent conveying belts.
[0112] Further, when the overlapping conveying belt is one conveying belt, the third distance and the fourth distance of the overlapping area image to the two sides of the overlapping conveying belt are obtained. The larger value of the third distance and the fourth distance is taken, and the target side corresponding to the larger value is determined. The nozzle corresponding to the target side is determined as the pretreatment nozzle. When the overlapping conveying belt is two adjacent conveying belts, the nozzles above the two adjacent conveying belts are directly regarded as the pretreatment nozzles.
[0113] Step S705: Fit the overlapping area image with a rectangular frame.
[0114] In some embodiments, the rectangular frame is a minimum circumscribed rectangle corresponding to the overlapped region image.
[0115] Optionally, an edge contour of the overlapped region image is obtained. The rectangular frame is obtained based on the edge contour. The algorithm for obtaining the rectangular frame can be implemented based on OpenCV.
[0116] Step S706: Obtain an overlapping manner of the first overlapped mao bean and the second overlapped mao bean.
[0117] In the present application, the 2k-1th conveyor belt in the conveying device moves at a first speed, and the 2kth conveyor belt in the conveying device moves at a second speed, the first speed being greater than the second speed. Therefore, please refer to Figure 8 , the first overlapped mao bean and the second overlapped mao bean will have a high probability of appearing in the first overlapping manner 801 and the second overlapping manner 802. The first overlapping manner refers to the length of the overlap of the long side of the mao bean being greater than a preset length threshold, and the second overlapping manner refers to the length of the overlap of the long side of the mao bean being less than the preset length threshold.
[0118] Optionally, a first rectangular frame of the first overlapped mao bean and a second rectangular frame of the second overlapped mao bean are obtained, the first rectangular frame being a minimum circumscribed rectangle of the first overlapped mao bean, and the second rectangular frame being a minimum circumscribed rectangle of the second overlapped mao bean. The overlapping manner is determined according to the overlapping part of the first rectangular frame and the second rectangular frame, and the overlapping manner includes the first overlapping manner and the second overlapping manner.
[0119] Step S707: Obtain a jet manner of the pre-processing nozzle according to the overlapping manner.
[0120] The jet manner of the pre-processing nozzle is related to the overlapping manner between the first overlapped mao bean and the second overlapped mao bean, and specific contents can be referred to the embodiment shown in Figure 9 , which will not be described here.
[0121] Step S708: Control the pre-processing nozzle to work according to the jet manner.
[0122] Controlling the pre-processing nozzle to work according to the jet manner can separate the two overlapped mao beans from each other, thereby being beneficial to the screening of the mao beans.
[0123] By adopting the above technical solution, after the overlapped mao beans appear, the pre-processing nozzle is worked to separate the overlapped mao beans, and then it is determined whether the quality of the mao beans is qualified. The identification effect of the quality of the mao beans is improved, and the problem mao beans can be correctly identified and removed.
[0124] In the following embodiments, different jet manners will be selected according to different overlapping manners to improve the separation probability of the two overlapped mao beans. Therefore, the present application discloses a mao bean pre-processing method two. Please refer toFigure 9 The method comprises: Step S901: judging whether the overlapping mode corresponds to a preset overlapping mode.
[0125] The preset overlapping mode refers to that the length of the long side of the mung beans appearing overlapping is greater than a preset length threshold.
[0126] If the overlapping mode corresponds to the preset overlapping mode, steps S902 to S903 are executed; If the overlapping mode does not correspond to the preset overlapping mode, steps S904 to S905 are executed.
[0127] Step S902: if yes, a first pretreatment path is set along a direction perpendicular to the moving direction of the conveying device, and the first pretreatment path passes through the region position.
[0128] In the case that the overlapping mode corresponds to the preset overlapping mode, the first pretreatment path is set. When the pretreatment nozzle moves along the first pretreatment path, the gas sprayed by the pretreatment nozzle can dissociate the overlapping mung beans, thereby realizing the separation between the overlapping mung beans.
[0129] Step S903: forming a gas spraying mode according to the first pretreatment path, and the pretreatment nozzle rotates along the first pretreatment path.
[0130] For example, the gas spraying mode is formed according to the first pretreatment path, so that the corresponding position of the pretreatment nozzle on the conveying device is consistent with the first pretreatment path.
[0131] Step S904: if no, a second pretreatment path is formed according to the up-down relationship between the first overlapping mung bean and the second overlapping mung bean, and the second pretreatment path passes through the second overlapping mung bean first and then passes through the first overlapping mung bean.
[0132] In the case that the overlapping mode does not correspond to the preset overlapping mode, the second pretreatment path is set. When the pretreatment nozzle moves along the second pretreatment path, the gas sprayed by the pretreatment nozzle can first blow away the first overlapping mung bean located above, and then blow away the second overlapping mung bean, thereby realizing the separation of the overlapping mung beans.
[0133] Step S905: forming a gas spraying mode according to the second pretreatment path, and the pretreatment nozzle rotates along the second pretreatment path.
[0134] For example, the gas spraying mode is formed according to the second pretreatment path, so that the corresponding position of the pretreatment nozzle on the conveying device is consistent with the second pretreatment path.
[0135] By adopting the technical scheme, different preprocessing paths are set according to the size relationship between the included angle value and the preset included angle threshold value, so that the preprocessing paths in different situations can effectively process the overlapped soybeans, improve the identification effect of the soybean quality, and ensure that the problem soybeans can be correctly identified and removed.
[0136] Based on the same inventive concept, an embodiment of the present application provides a soybean screening system, please refer to Figure 10 The system comprises: The acquisition module 1001 is configured to acquire a detection image. The memory 1002 is configured to store the program of the soybean screening method. The processor 1003 is configured to load and execute the program in the memory, and implement the soybean screening method.
[0137] By adopting the technical scheme, the problem soybeans in the detection area are acquired through the detection image, and the position coordinates of the problem soybeans and the target nozzle to be worked are determined. Then, the target point is set according to the position of the target nozzle and the position coordinates. The target nozzle is used to spray air towards the target point, so that a gap is generated at the edge of the target conveying belt, and the problem soybeans fall off from the conveying device. The scheme can identify the moldy and worm-eaten soybeans, and improve the screening effect of the soybeans.
[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0139] An embodiment of the present application provides a computer readable storage medium, which stores a computer program capable of being loaded and executed by a processor to implement a soybean screening method.
[0140] The computer storage medium includes, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0141] Based on the same inventive concept, an embodiment of the present application provides a screening device, which comprises a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to implement a soybean screening method.
[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0143] The above are preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in the specification (including the abstract and drawings) can be replaced by other equivalent or similar features unless specifically described. That is, each feature is only an example of a series of equivalent or similar features unless specifically described.
Claims
1. A method for screening edamame, characterized in that: The method includes: Acquire a detection image of the detection area, wherein the detection image includes at least one edamame to be inspected, and the edamame to be inspected is placed on a conveyor device, wherein the conveyor device is composed of n conveyor belts, where n is an integer greater than 1; Determining problematic edamame from the edamame to be inspected according to the inspection image; Obtain the target conveyor belt where the problematic edamame is located and the position coordinates of the problematic edamame; determining a target nozzle corresponding to the target conveyor belt, wherein the target nozzle is arranged above the target conveyor belt; Based on the position coordinates, a target point is set, where the target point is located on a target side of the target conveyor belt, and the target side is a side of the target conveyor belt close to the problematic edamame; The target nozzle is controlled to spray toward the target point, so that a gap is generated at the edge of the target conveyor belt, and the problematic edamame falls from the gap.
2. The edamame screening method according to claim 1, wherein The method further comprises: Control the 2k-1th conveyor belt in the conveying device to move at a first speed, and control the 2kth conveyor belt in the conveying device to move at a second speed, the first speed is greater than the second speed, the width of the 2k-1th conveyor belt is greater than the width of the 2kth conveyor belt, and k is an integer greater than 0.
3. The edamame screening method according to claim 2, wherein The controlling the target nozzle to spray air toward the target point comprises: Obtaining a distance value from the target nozzle to the position coordinate; Setting the jet speed of the target nozzle according to the distance value; Controlling the direction of the target nozzle toward the position coordinate, and opening the target nozzle so that the target nozzle sprays at the spray speed; In response to detecting that the problematic soybeans are moving, the direction of the target nozzle is updated to face the target point.
4. The edamame screening method according to claim 3, wherein: Before obtaining the distance value from the target nozzle to the position coordinate, the method further includes: Determine the adjacent edamame of the problematic edamame by using the detection image; When the shortest distance between the adjacent edamame and the problematic edamame is less than a preset distance threshold, two first detection lines are drawn in the detection image, where the first detection lines pass through the endpoints of the adjacent edamame and are perpendicular to the moving direction of the conveyor; Determining a target detection line among the detection lines, wherein the target detection line passes through the problematic edamame; Determining a target endpoint corresponding to the target detection line on the adjacent soybeans; Setting the jet rotation mode with reference to the target endpoint; The target nozzle is turned on and the direction of the target nozzle is controlled to move along the jet rotation mode.
5. The edamame screening method according to claim 4, wherein: The step of setting the jet rotation mode with reference to the target endpoint includes: Setting a second detection straight line passing through the endpoints of the problematic edamame in the detection image, wherein the second detection straight line is parallel to the first detection straight line and passes through the adjacent edamame; Obtaining a detection intersection point between the second detection straight line and the adjacent edamame; Taking the center point between the detection intersection point and the target endpoint on the adjacent soybeans; Setting a path moving direction, wherein the angle between the path moving direction and the adjacent edamame is a preset angle; Draw a line segment through the center point along the moving direction of the path to obtain the jet rotation mode.
6. The edamame screening method according to claim 2, wherein: The method further comprises: Determining whether there is a problem area in the detection image; If so, determine whether the problem area belongs to the overlapping area of edamame; If yes, extracting an overlapping area image of the first overlapping edamame and the second overlapping edamame from the detection image, wherein the first overlapping edamame is located above the second overlapping edamame; determining a preprocessing nozzle corresponding to the overlapping area image; Fitting the overlapping area image using a rectangular frame; Obtaining an overlapping manner of the first overlapping edamame and the second overlapping edamame; According to the overlapping mode, the jetting mode of the pretreatment nozzle is obtained; The pretreatment nozzle is controlled to operate in the jetting mode.
7. The edamame screening method according to claim 6, wherein: The jetting mode of the pretreatment nozzle is obtained according to the overlapping mode, including: determining whether the overlapping mode corresponds to a preset overlapping mode; If so, setting a first pre-processing path perpendicular to the moving direction of the conveying device, wherein the first pre-processing path passes through the regional position; forming the jetting mode according to the first pre-processing path, and rotating the pre-processing nozzle along the first pre-processing path; If not, a second preprocessing path is formed according to the upper and lower relationship between the first overlapping beans and the second overlapping beans, and the second preprocessing path first passes through the second overlapping beans and then passes through the first overlapping beans; the jet mode is formed according to the second preprocessing path, and the preprocessing nozzle rotates along the second preprocessing path.
8. A soybean screening system, characterized in that: The system is used to perform the edamame screening method according to any one of claims 1 to 7, comprising: An acquisition module, used for acquiring a detection image; A memory for storing a program of the edamame screening method; The processor and the program in the memory can be loaded and executed by the processor to implement the edamame screening method.
9. A screening device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the edamame screening method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The device stores a computer program that can be loaded by a processor and executes the edamame screening method according to any one of claims 1 to 7.