Obstacle recognition method, device, equipment, medium and weeding robot

By implementing obstacle recognition methods on the weeding robot, using color information and contour information to determine whether there are obstacles in the candidate weeding area, the problem of the problem of the boundary calibration of the weeding area in the prior art is solved, and more efficient and accurate obstacle recognition is achieved, reducing costs and removing shape restrictions.

CN114494838BActive Publication Date: 2025-04-29SUZHOU CLEVA PRECISION MACHINERY & TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011240905.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-09
Publication Date
2025-04-29
Estimated Expiration
2040-11-09

AI Technical Summary

Technical Problem

When calibrating the boundary of the weeding area, existing weeding robots need to bury the boundary line, which consumes a lot of manpower and material resources, increases costs, and due to the limitations of the weeding area burial, the shape of the weeding area is limited.

Method used

By implementing the obstacle recognition method on the weeding robot, the candidate obstacle area is determined using the color information of the candidate weeding area image, the contour information, including chromaticity information, range information and roughness information are obtained, and whether there is an obstacle is determined based on the preset judgment conditions.

Benefits of technology

The identification efficiency and accuracy of the weeding robots in candidate weeding areas is improved, the dependence on the burial of boundary lines is reduced, the cost is reduced, and the limitations on the shape of the weeding area are lifted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494838B_ABST
    Figure CN114494838B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an obstacle recognition method, device, equipment, medium and weeding robot. The method includes: determining a candidate obstacle area in a candidate weeding area image according to the color information of the candidate weeding area image; obtaining contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information; determining whether there is an obstacle in the candidate weeding area image according to preset contour information judgment conditions and contour information. By running the technical solution provided by the embodiment of the present invention, the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying boundary lines in the prior art can be solved, which consumes a lot of manpower and material resources and increases costs. And because there are restrictions on the burying of boundary lines, the shape of the weeding area is limited to a certain extent, thereby achieving the effect of improving the recognition efficiency and accuracy of obstacles in the candidate weeding area of ​​the weeding robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to image processing technology, and more particularly to an obstacle recognition method, device, equipment, medium and weeding robot. Background Art

[0002] With the improvement of living standards, people are paying more and more attention to environmental construction, so the construction of urban greening gardens has received more and more attention. At the same time, efficient greening maintenance, such as daily weeding, has gradually become a demand. However, since traditional weeders require manual control, weeding robots with autonomous working functions are gradually emerging.

[0003] In the prior art, the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying boundary lines, which consumes a lot of manpower and material resources and increases costs. In addition, since there are restrictions on burying boundary lines, such as the angle of the corner cannot be less than 90 degrees, the shape of the weeding area is limited to a certain extent. Summary of the invention

[0004] The embodiments of the present invention provide an obstacle recognition method, device, equipment, medium and a weeding robot, so as to achieve the effect of improving the recognition efficiency and accuracy of obstacles in a candidate weeding area of ​​the weeding robot.

[0005] In a first aspect, an embodiment of the present invention provides an obstacle recognition method, the method comprising:

[0006] Determine a candidate obstacle area in the candidate weeding area image according to color information of the candidate weeding area image;

[0007] Acquire contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information;

[0008] It is determined whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information.

[0009] In a second aspect, an embodiment of the present invention further provides an obstacle recognition device, the device comprising:

[0010] A candidate obstacle region determination module, configured to determine a candidate obstacle region in the candidate weeding region image according to color information of the candidate weeding region image;

[0011] A contour information acquisition module, used to acquire contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information;

[0012] The obstacle determination module is used to determine whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the obstacle recognition method as described above.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the obstacle recognition method as described above when executed by a processor.

[0018] In a fifth aspect, an embodiment of the present invention further provides a weeding robot, comprising a robot body and the above-mentioned electronic device.

[0019] The embodiment of the present invention determines the candidate obstacle area in the candidate weeding area image according to the color information of the candidate weeding area image; obtains the contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information; and determines whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information. This solves the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying boundary lines in the prior art, which consumes a lot of manpower and material resources and increases the cost. In addition, since there are restrictions on the burying of boundary lines, the shape of the weeding area is limited to a certain extent, thereby achieving the effect of improving the recognition efficiency and accuracy of obstacles in the candidate weeding area of ​​the weeding robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of an obstacle identification method provided in Embodiment 1 of the present invention;

[0021] Figure 2 A flowchart of an obstacle identification method provided in Embodiment 2 of the present invention;

[0022] Figure 3 A schematic diagram of the structure of an obstacle recognition device provided in Embodiment 3 of the present invention;

[0023] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0025] Embodiment 1

[0026] Figure 1 This is a flowchart of an obstacle identification method provided in the first embodiment of the present invention. This embodiment is applicable to the situation where a weeding robot identifies obstacles in a candidate weeding area. The method can be executed by the obstacle identification device provided in the embodiment of the present invention, and the device can be implemented in software and / or hardware. Figure 1 The obstacle recognition method provided in this embodiment includes:

[0027] Step 110: Determine a candidate obstacle region in the candidate weeding region image according to color information of the candidate weeding region image.

[0028] Among them, the candidate weeding area is the possible working area of ​​the weeding robot, which may be full of weeds to be removed, that is, the weeding area; the candidate weeding area may also be an artificially constructed boundary, or an area that was originally a special color such as white or concrete, but is easily mistakenly identified as a weeding area because it is covered by long grass, that is, an obstacle or boundary area.

[0029] The candidate weeding area image may be captured by a camera installed on the weeding robot, and this embodiment does not limit this. The color information of the candidate weeding area image may be information such as the hue, saturation, and brightness of the image, and this embodiment does not limit this. The area that may be an obstacle is determined from the candidate weeding area image by the color information. For example, the area in the image that is significantly different from the surrounding color is determined as the candidate obstacle area according to the color information.

[0030] In this embodiment, optionally, determining the candidate obstacle area in the candidate weeding area image according to the color information of the candidate weeding area image includes:

[0031] Acquire a color segmentation image of the candidate weeding area image according to color information of the candidate weeding area image;

[0032] Morphological processing is performed on the color segmentation image, and a region of a preset color is determined as a candidate obstacle region from the color segmentation image after the morphological processing.

[0033] Wherein, the color segmentation image of the candidate weeding area image is obtained according to the color information of the candidate weeding area image, and the color segmentation can be performed according to the color dynamic segmentation, edge texture method segmentation, fixed threshold segmentation, Otsu threshold segmentation and other methods to obtain the color segmentation image of the candidate weeding area image. Wherein, the color segmentation image can be a binary image. Then, the color segmentation image is subjected to morphological processing, where the morphological processing can be a negation operation, an opening operation, a closing operation and the like, which is not limited in this embodiment.

[0034] The area of ​​preset color is determined as the candidate obstacle area from the color segmentation image after morphological processing. For example, the black area is used as the weeding area and the white area is used as the candidate obstacle area, so as to further identify the candidate obstacle area. The candidate weeding area is preliminarily classified by obtaining the color segmentation image, and the color segmentation image is morphologically processed to improve the accuracy of determining the candidate obstacle area.

[0035] Step 120: Obtain contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information, and roughness information.

[0036] The contour information is the contour information of a single candidate obstacle area, and the acquisition method may be to perform contour detection on the candidate obstacle area. The contour information includes chromaticity information, range information, and roughness information, wherein the chromaticity information is used to represent the color characteristics of the candidate obstacle area, and may be the average chromaticity of the contour of the candidate obstacle area, and the average chromaticity may be calculated by dividing the sum of the chromaticity values ​​of all pixels in the obstacle area in the contour of a single candidate obstacle area by the total number of pixels in the obstacle area in the contour.

[0037] The range information is used to indicate the size of the candidate obstacle region, which may be area, diagonal length, width, height, number of pixels included, etc., and this embodiment does not impose any limitation on this.

[0038] The roughness information is used to display the roughness of the edge of the candidate obstacle area, which may be an average roughness. The average roughness may be calculated by dividing the sum of the roughness of all pixels in the obstacle area in the outline by the total number of pixels in the obstacle area in the outline. This embodiment does not impose any limitation on this.

[0039] Step 130: Determine whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information.

[0040] The contour information of the candidate obstacle area is compared with the preset contour information judgment condition, wherein the preset contour information judgment condition is related to the chromaticity information, range information and roughness information. If the preset contour information condition is met, the candidate obstacle area is determined to be an obstacle area, that is, it is determined that there is an obstacle in the candidate weeding area image where the obstacle area is located, so that the weeding robot can perform subsequent obstacle processing.

[0041] Exemplarily, the identified obstacle is a man-made boundary, or an area that was originally white or a special color such as concrete, but is easily misidentified as a weeding area because it is covered by long grass.

[0042] The technical solution provided in this embodiment determines the candidate obstacle area in the candidate weeding area image according to the color information of the candidate weeding area image; obtains the contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information; determines whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information. This solves the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying boundary lines in the prior art, which consumes a lot of manpower and material resources and increases the cost. In addition, since there are restrictions on the burying of boundary lines, the shape of the weeding area is limited to a certain extent, thereby achieving the effect of improving the recognition efficiency and accuracy of obstacles in the candidate weeding area of ​​the weeding robot.

[0043] Embodiment 2

[0044] Figure 2 This is a flowchart of an obstacle identification method provided in Embodiment 2 of the present invention. This technical solution is to supplement the process of determining whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information. Compared with the above solution, this solution is specifically optimized to determine whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information, including:

[0045] If the chromaticity information is greater than or equal to a preset chromaticity threshold, determining whether the range information is greater than a preset first range threshold, and whether the roughness information is less than a preset first roughness threshold;

[0046] If yes, it is determined that there is an obstacle in the candidate weeding area image;

[0047] If the chromaticity information is less than a preset chromaticity threshold, determining whether the range information is greater than a preset second range threshold, and whether the roughness information is less than a preset second roughness threshold;

[0048] If yes, it is determined that there is an obstacle in the candidate weeding area image; wherein the preset first range threshold is less than the preset second range threshold. Specifically, the flowchart of obstacle identification is as follows Figure 2 As shown:

[0049] Step 210: Determine a candidate obstacle area in the candidate weeding area image according to color information of the candidate weeding area image.

[0050] Step 220: Obtain contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information, and roughness information.

[0051] Step 230: If the chromaticity information is greater than or equal to a preset chromaticity threshold, determine whether the range information is greater than a preset first range threshold, and whether the roughness information is less than a preset first roughness threshold; if so, determine that there is an obstacle in the candidate weeding area image.

[0052] Among them, the preset chromaticity threshold is used to determine whether the candidate obstacle area is close to the color of the grass. It can be determined based on experience. If the chromaticity information is greater than or equal to the preset chromaticity threshold, it indicates that the candidate obstacle area exceeds the color recognition range of the grass, and the range information and roughness information are further used to determine the size of the candidate obstacle area. If the chromaticity information is greater than or equal to the preset chromaticity threshold and the range information exceeds the preset first range threshold and the roughness information is less than the preset first roughness threshold, it indicates that the candidate obstacle area is an obstacle area, that is, there is an obstacle in the candidate weeding area image. For example, a darker boundary built artificially in the weeding area or an iron fence partially covered by grass.

[0053] For example, the chromaticity information is the average chromaticity SContours of the candidate obstacle area contour i , where i is the number of the candidate obstacle area, and the range information is the diagonal length of the candidate obstacle area AContours i .diagonal or the height of the candidate obstacle area AContours i .height, the roughness information is the average roughness of the candidate obstacle area contour HContours i , the smaller the average roughness, the greater the possibility that the candidate obstacle area is an obstacle. If the preset chromaticity threshold is 85, the diagonal threshold of the preset first range threshold is 65, the height threshold is 40, and the preset first roughness threshold is 0.25, then the preset contour information judgment condition is SContours i ≥85 and AContours i .diagonal>65 and HContours i <0.25, or SContoursi ≥85, and AContours i .height>40 and HContoursi<0.25.

[0054] Step 240: If the chromaticity information is less than a preset chromaticity threshold, determine whether the range information is greater than a preset second range threshold, and whether the roughness information is less than a preset second roughness threshold; if so, determine that there is an obstacle in the candidate weeding area image; wherein the preset first range threshold is less than the preset second range threshold.

[0055] If the chromaticity information is less than the preset chromaticity threshold, it indicates that the possibility that the candidate obstacle area is not an obstacle increases, and the range information is further used to determine the size of the candidate obstacle area. If the chromaticity information is less than the preset chromaticity threshold and the range information exceeds the preset second range threshold and the roughness information is less than the preset second roughness threshold, it indicates that the candidate obstacle area is an obstacle area, that is, there is an obstacle in the candidate weeding area image.

[0056] For example, if the preset chromaticity threshold is 85, the diagonal threshold of the preset second range threshold is 105, the height threshold is 70, and the preset second roughness threshold is 0.24, then the preset contour information judgment condition is SContours i <85 and AContours i .diagonal>105 and HContours i <0.24, or SContours i <85 and AContours i .height>70 and HContoursi<0.24.

[0057] The preset first range threshold is smaller than the preset second range threshold, that is, when the chromaticity information of the candidate obstacle area is greater than or equal to the preset chromaticity threshold, the possibility of being an obstacle increases, and the range judgment condition of the candidate obstacle area is lowered, so that the judgment condition is greater than a smaller value to expand the range to determine the obstacle, thereby improving the accuracy of obstacle recognition.

[0058] In this embodiment, optionally, the profile information further includes: location information;

[0059] Accordingly, determining whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information includes:

[0060] If the chromaticity information is greater than or equal to a preset chromaticity threshold, and the range information is greater than a preset first range threshold, and the roughness information is less than a preset first roughness threshold; or

[0061] The chromaticity information is less than a preset chromaticity threshold, the range information is greater than a preset second range threshold, and the roughness information is less than a preset second roughness threshold;

[0062] Determining whether the location information is greater than a preset location threshold;

[0063] If so, it is determined that there are obstacles in the candidate weeding area image.

[0064] The position information is used to display the distance between the candidate obstacle area and the weeding robot, for example, the y-axis coordinate value of the lower right corner of the minimum circumscribed rectangle of a single candidate obstacle area, which is not limited in this embodiment.

[0065] Based on the above determination, it is further determined whether the location information is greater than a preset location threshold.

[0066] For example, the location information is the y-axis coordinate value YContours of the lower right corner of the minimum circumscribed rectangle of a single candidate obstacle area i , the larger the coordinate value, the closer the candidate obstacle area is to the robot. For example, if the preset position threshold is 75, the preset contour information judgment condition can be SContours i ≥85 and AContours i .diagonal>65 and HContours i <0.25 and YContours i >75, or SContoursi<85 and AContoursi.diagonal>105 and HContoursi<0.24 and YContoursi>75.

[0067] The candidate obstacle area is further judged as the obstacle area through the position information, and the candidate obstacle area with a shorter distance is processed, which reduces the processed data and improves the efficiency of obstacle recognition.

[0068] In this embodiment, optionally, determining the roughness information includes:

[0069] Acquire a brightness channel image of the candidate weeding area image;

[0070] Obtaining an edge image by performing edge extraction on the brightness channel image;

[0071] The roughness information is determined according to the grayscale value of the pixel in the edge information of the edge image.

[0072] By performing channel separation on the candidate weeding area image, a brightness channel image of the candidate weeding area image is obtained. Optionally, the brightness channel image is preprocessed, and the preprocessing may include filtering processing, normalization processing, etc., which is not limited in this embodiment. Edge extraction is performed on the preprocessed brightness channel image to obtain an edge image. The canny operator may be used for edge extraction to improve the accuracy of edge information acquisition in the edge image.

[0073] The roughness information of the candidate obstacle region is determined by edge information in the edge image at the corresponding position of the candidate obstacle region, and the edge information includes the grayscale value of the pixels in the outline of the candidate obstacle region. When the roughness information is the average roughness, the average roughness of the edge of the candidate obstacle region can be obtained by dividing the number of pixels with a grayscale value of 255 in the outline by the total number of outline pixels.

[0074] The roughness information is determined by the gray value of the pixel in the edge information of the edge image, so as to improve the accuracy of obtaining the roughness information and thus improve the accuracy of obstacle recognition.

[0075] The embodiment of the present invention determines whether there are obstacles in the candidate weeding area image according to the chromaticity information, range information and roughness information of the candidate obstacle area, thereby improving the accuracy of identifying obstacle areas that are easily overlooked due to their special colors and small areas.

[0076] Embodiment 3

[0077] Figure 3 This is a schematic diagram of the structure of an obstacle identification device provided in the third embodiment of the present invention. The device can be implemented by hardware and / or software, can execute an obstacle identification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 3 As shown, the device comprises:

[0078] A candidate obstacle region determination module 310 is used to determine a candidate obstacle region in the candidate weeding region image according to color information of the candidate weeding region image;

[0079] The contour information acquisition module 320 is used to acquire the contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information;

[0080] The obstacle determination module 330 is used to determine whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information.

[0081] The technical solution provided in this embodiment determines the candidate obstacle area in the candidate weeding area image according to the color information of the candidate weeding area image; obtains the contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information; determines whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information. This solves the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying boundary lines in the prior art, which consumes a lot of manpower and material resources and increases the cost. In addition, since there are restrictions on the burying of boundary lines, the shape of the weeding area is limited to a certain extent, thereby achieving the effect of improving the recognition efficiency and accuracy of obstacles in the candidate weeding area of ​​the weeding robot.

[0082] On the basis of the above technical solutions, optionally, the candidate obstacle area determination module includes:

[0083] A color segmentation image acquisition unit, used for acquiring a color segmentation image of the candidate weeding area image according to the color information of the candidate weeding area image;

[0084] The candidate obstacle region determining unit is used to perform morphological processing on the color segmentation image, and determine a region of a preset color from the color segmentation image after the morphological processing as a candidate obstacle region.

[0085] On the basis of the above technical solutions, optionally, the obstacle determination module includes:

[0086] A first obstacle determination unit is used to determine whether the range information is greater than a preset first range threshold and whether the roughness information is less than a preset first roughness threshold if the chromaticity information is greater than or equal to a preset chromaticity threshold; if so, determine that there is an obstacle in the candidate weeding area image;

[0087] The second obstacle determination unit is used to determine whether the range information is greater than a preset second range threshold and whether the roughness information is less than a preset second roughness threshold if the chromaticity information is less than a preset chromaticity threshold; if so, determine that there is an obstacle in the candidate weeding area image; wherein the preset first range threshold is less than the preset second range threshold.

[0088] Based on the above technical solutions, optionally, the profile information further includes: location information;

[0089] Accordingly, the obstacle determination module includes:

[0090] A third obstacle determination unit is configured to determine an obstacle if the chromaticity information is greater than or equal to a preset chromaticity threshold, the range information is greater than a preset first range threshold, and the roughness information is less than a preset first roughness threshold; or

[0091] The chromaticity information is less than a preset chromaticity threshold, and the range information is greater than a preset second range threshold, and the roughness information is less than a preset second roughness threshold; determine whether the position information is greater than a preset position threshold, and whether the roughness information is less than a preset roughness threshold; if so, determine that there is an obstacle in the candidate weeding area image.

[0092] On the basis of the above technical solutions, optionally, the roughness information determination module includes:

[0093] A brightness channel image acquisition unit, used to acquire a brightness channel image of the candidate weeding area image;

[0094] An image edge extraction unit, which obtains an edge image by performing edge extraction on the brightness channel image;

[0095] The roughness information determining unit is used to determine the roughness information according to the grayscale value of the pixel in the edge information of the edge image.

[0096] Embodiment 4

[0097] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the electronic device includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the electronic device can be one or more. Figure 4 A processor 40 is taken as an example; the processor 40, the memory 41, the input device 42 and the output device 43 in the electronic device can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0098] The memory 41 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the obstacle recognition method in the embodiment of the present invention. The processor 40 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 41, that is, implements the above-mentioned obstacle recognition method.

[0099] The memory 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0100] Embodiment 5

[0101] Embodiment 5 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute an obstacle identification method when executed by a computer processor, the method comprising:

[0102] Determine a candidate obstacle area in the candidate weeding area image according to color information of the candidate weeding area image;

[0103] Acquire contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information;

[0104] It is determined whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information.

[0105] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present invention are not limited to the operations of the method described above, and can also execute related operations in the obstacle identification method provided in any embodiment of the present invention.

[0106] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0107] It is worth noting that in the embodiment of the above-mentioned obstacle recognition device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0108] Embodiment 6

[0109] Embodiment 6 of the present invention provides a weeding robot, comprising a robot body and the electronic device described in any embodiment of the present invention.

[0110] Specifically, the electronic device installed on the lawn mowing robot can perform relevant operations of an obstacle recognition method described in any embodiment of the present invention.

[0111] The robot body may include two active driving wheels on the left and right, which may be driven by motors respectively. The motors may be brushless motors with reduction gears and Hall sensors. The robot body realizes driving operations such as forward, backward, turning and arc by controlling the speed and direction of the two active driving wheels. The robot body also includes universal wheels, cameras and rechargeable batteries, wherein the universal wheels play a supporting and balancing role. The camera is installed at a designated position of the robot and forms a preset angle with the horizontal direction to capture images of the candidate weeding area. The rechargeable battery is used to provide power for the robot to work.

[0112] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An obstacle recognition method, characterized in that: include: Determine a candidate obstacle area in the candidate weeding area image according to color information of the candidate weeding area image; Acquire contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information; Determine whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information; The step of determining whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information includes: If the chromaticity information is greater than or equal to the preset chromaticity threshold, the candidate obstacle area exceeds the grass color recognition range, and then it is determined whether the range information is greater than the preset first range threshold, and whether the roughness information is less than the preset first roughness threshold; If yes, it is determined that there is an obstacle in the candidate weeding area image; If the chromaticity information is less than a preset chromaticity threshold, determining whether the range information is greater than a preset second range threshold, and whether the roughness information is less than a preset second roughness threshold; If so, it is determined that there is an obstacle in the candidate weeding area image; wherein the preset first range threshold is smaller than the preset second range threshold.

2. The method according to claim 1, characterized in that Determining a candidate obstacle area in the candidate weeding area image according to color information of the candidate weeding area image includes: Acquire a color segmentation image of the candidate weeding area image according to color information of the candidate weeding area image; Morphological processing is performed on the color segmentation image, and a region of a preset color is determined as a candidate obstacle region from the color segmentation image after the morphological processing.

3. The method according to claim 1, characterized in that The profile information also includes: location information; Accordingly, determining whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information includes: If the chromaticity information is greater than or equal to a preset chromaticity threshold, and the range information is greater than a preset first range threshold, and the roughness information is less than a preset first roughness threshold; or The chromaticity information is less than a preset chromaticity threshold, the range information is greater than a preset second range threshold, and the roughness information is less than a preset second roughness threshold; Determining whether the location information is greater than a preset location threshold; If so, it is determined that there are obstacles in the candidate weeding area image.

4. The method according to claim 1, characterized in that: Determining the roughness information includes: Acquire a brightness channel image of the candidate weeding area image; Obtaining an edge image by performing edge extraction on the brightness channel image; The roughness information is determined according to the grayscale value of the pixel in the edge information of the edge image.

5. An obstacle recognition device, characterized in that: include: A candidate obstacle region determination module, configured to determine a candidate obstacle region in the candidate weeding region image according to color information of the candidate weeding region image; A contour information acquisition module, used to acquire contour information of the candidate obstacle area; wherein the contour information includes chromaticity information, range information and roughness information; An obstacle determination module, used to determine whether there is an obstacle in the candidate weeding area image according to a preset contour information judgment condition and the contour information; The step of determining whether there is an obstacle in the candidate weeding area image according to the preset contour information judgment condition and the contour information includes: If the chromaticity information is greater than or equal to the preset chromaticity threshold, the candidate obstacle area exceeds the grass color recognition range, and then it is determined whether the range information is greater than the preset first range threshold, and whether the roughness information is less than the preset first roughness threshold; If yes, it is determined that there is an obstacle in the candidate weeding area image; If the chromaticity information is less than a preset chromaticity threshold, determining whether the range information is greater than a preset second range threshold, and whether the roughness information is less than a preset second roughness threshold; If so, it is determined that there is an obstacle in the candidate weeding area image; wherein the preset first range threshold is smaller than the preset second range threshold.

6. The device according to claim 5, characterized in that The candidate obstacle area determination module includes: A color segmentation image acquisition unit, used for acquiring a color segmentation image of the candidate weeding area image according to the color information of the candidate weeding area image; The candidate obstacle region determining unit is used to perform morphological processing on the color segmentation image, and determine a region of a preset color from the color segmentation image after the morphological processing as a candidate obstacle region.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the obstacle recognition method as described in any one of claims 1 to 4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the obstacle recognition method as described in any one of claims 1 to 4 is implemented.

9. A weeding robot, comprising a robot body, characterized in that: Also included is an electronic device as claimed in claim 7.

Citation Information

Patent Citations

  • Automatic walking equipment and obstacle detection method thereof

    CN104111460A

  • Mowing method, device and system

    CN106155053A

  • Mapping method and device of mobile robot and mobile robot

    CN111399502A