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

By using image processing technology in the weeding robot, identifying obstacles in candidate weeding areas, solving the high cost and shape limitation problems of traditional burying boundary lines, and achieving more efficient and accurate weeding area identification.

CN114677582BActive Publication Date: 2025-02-11SUZHOU CLEVA PRECISION MACHINERY & TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011553905.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2025-02-11
Estimated Expiration
2040-12-24

AI Technical Summary

Technical Problem

Existing weeding robots calibrate by burying the boundary line, which consumes a lot of manpower and material resources, increasing costs, and there are restrictions on the burying boundary line, limiting the shape of the weeding area.

Method used

By obtaining the chromaticity information, the number of pixels in the candidate weeding area image, and the number of white pixels in the non-exposed state, a chromaticity histogram is generated, a mutation peak point is determined, the target pixel position and brightness information is calculated, and whether there is an exposure area is judged. This determines whether there are obstacles.

Benefits of technology

The identification efficiency and accuracy of obstacles in candidate weeding areas of the weeding robot are improved, reducing manpower and material investment, reducing costs, and lifting the limitations of boundary shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677582B_ABST
    Figure CN114677582B_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: obtaining the chromaticity information, the number of pixels in the exposure state and the number of white pixels in the non-exposed state of the candidate weeding area image; obtaining the peak value of the mutation peak point; determining the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels; according to the above information, determining whether there is an exposure area. By running the technical solution provided by the embodiment of the present invention, it is possible to solve the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying the boundary line in the prior art, which consumes a lot of manpower and material resources and increases the cost. And because there are restrictions on the burying of the boundary line, 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 computer 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] Obtaining the chromaticity information, the number of pixels in the exposed state, and the number of white pixels in the non-exposed state of the candidate weeding area image;

[0007] Generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a chromaticity value of a sudden change peak point and a peak value of a sudden change peak point;

[0008] Determine the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point;

[0009] Determine the number of chromaticity effective pixels in a preset chromaticity interval in the candidate weeding area image;

[0010] According to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, it is determined whether there is an exposed area in the candidate weeding area image to determine whether there is an obstacle in the candidate weeding area image.

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

[0012] An information acquisition module, used to acquire the chromaticity information, the number of pixels in an exposed state, and the number of white pixels in a non-exposed state of the candidate weeding area image;

[0013] A histogram generation module is used to generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a mutation peak point chromaticity value and a mutation peak point peak value;

[0014] An information determination module, used to determine the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point;

[0015] A pixel number determination module determines the number of chromaticity effective pixels in a preset chromaticity interval in the candidate weeding area image;

[0016] The obstacle determination module is used to determine whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposure state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image.

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

[0018] one or more processors;

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

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

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

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

[0023] The embodiment of the present invention obtains the chromaticity information, the number of pixels in the exposure state and the number of white pixels in the non-exposed state of the candidate weeding area image; generates the chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtains the peak information of the chromaticity histogram; the peak information includes: the chromaticity value of the mutation peak point and the peak value of the mutation peak point; determines the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point; determines the number of chromaticity effective pixels in the candidate weeding area image that are in a preset chromaticity interval; determines whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposure state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image. The method solves the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying the boundary line in the prior art, which consumes a lot of manpower and material resources and increases the cost. Furthermore, since there are restrictions on the burying of the boundary line, the shape of the weeding area is restricted 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

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

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

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

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

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

[0029] Embodiment 1

[0030] Figure 1This 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:

[0031] Step 110, obtaining chromaticity information, the number of pixels in the exposed state, and the number of white pixels in the non-exposed state of the candidate weeding area image; the number of pixels in the exposed state and the number of white pixels in the non-exposed state include: the number of pixels in the exposed state and the number of white pixels in the non-exposed state.

[0032] The candidate weeding area is a possible working area of ​​the weeding robot, which may be entirely filled with weeds to be removed, that is, the weeding area; or it may be an obstacle or a boundary.

[0033] The candidate weeding area image can be taken by a camera installed on the weeding robot, and this embodiment does not limit this. The chromaticity information of the candidate weeding area image is the chromaticity characteristics of the entire candidate weeding area image, and the chromaticity-related information in the image can be obtained by obtaining the chromaticity channel image of the candidate weeding area image, such as the chromaticity value of each pixel in the image, and this embodiment does not limit this.

[0034] The number of pixels in the exposure state is the number of pixels in the candidate weeding area image that are in the exposure state. The number of pixels in the exposure state is obtained according to the brightness value of the pixels in the candidate weeding area image. The acquisition method can be to obtain the brightness channel image of the candidate weeding area image, and count the number of pixels whose brightness value is greater than or equal to a preset threshold, such as 255, as the number of pixels in the exposure state.

[0035] According to the brightness and chromaticity of the pixels in the candidate weeding area image, the number of white pixels in the non-exposed state is obtained. The acquisition method can be to obtain the brightness channel image and the chromaticity channel image of the candidate weeding area image, and count the number of pixels whose brightness value in the brightness channel image is less than a preset threshold value, such as 255, and whose chromaticity value in the chromaticity channel image is less than or equal to a preset threshold value, such as 0, as the number of white pixels in the non-exposed state.

[0036] Step 120: Generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a mutation peak point chromaticity value and a mutation peak point peak value.

[0037] The chromaticity histogram is used to intuitively reflect the chromaticity information of the pixels in the candidate weeding area image. The horizontal axis of the chromaticity histogram can be the chromaticity value, and the vertical axis can be the frequency, that is, the number of pixels at the chromaticity value in the candidate weeding area image, which is used to reflect the chromaticity distribution of the pixels in the candidate weeding area image.

[0038] The mutation peak point is the point where the frequency in the chromaticity histogram mutates. The peak value of the mutation peak point is the frequency corresponding to the mutation peak point, and the chromaticity value of the mutation peak point is the chromaticity value corresponding to the mutation peak point.

[0039] Optionally, in this embodiment, generating a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtaining peak information of the chromaticity histogram includes:

[0040] Performing histogram statistics on the chromaticity information to generate a chromaticity histogram of the candidate weeding area image;

[0041] According to the difference between adjacent frequencies in the chromaticity histogram, a mutation peak point is determined, and peak information of the mutation peak point is obtained.

[0042] The chromaticity histogram of the candidate weeding area image is obtained by performing histogram statistics on the chromaticity information of the pixels in the candidate weeding area image. For example, it can reflect the frequency of occurrence of the chromaticity values ​​of all pixels in the candidate weeding area image, which is not limited in this embodiment. The difference between adjacent frequencies in the chromaticity histogram is obtained, and the point with the largest frequency difference with the left and right adjacent frequencies is determined as the mutation peak point, that is, the frequency at this chromaticity value has a mutation relative to the frequency corresponding to the similar chromaticity value, and the chromaticity value and peak value corresponding to the mutation peak point are obtained as the peak information of the chromaticity histogram.

[0043] According to the difference between adjacent frequencies in the chromaticity histogram, the mutation peak point is determined, the point where the mutation occurs in the chromaticity histogram is determined, and the accuracy of obtaining the mutation peak point is improved to improve the accuracy of subsequent determination of whether there is an exposed area in the candidate weeding area image.

[0044] Step 130: Determine the target pixel position information and target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point.

[0045] Among them, the target pixel is the target pixel point determined according to the chromaticity value of the mutation peak point in the candidate weeding area image, the target pixel position information is the comprehensive position information obtained after processing the position information of all target pixel points, and the target pixel brightness information is the comprehensive brightness information obtained after processing the brightness information of all target pixel points.

[0046] In this embodiment, optionally, determining the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point includes:

[0047] Determine the target pixel point according to the chromaticity value of the mutation peak point;

[0048] Determining target pixel position information of the candidate weeding area image according to the target pixel point and the position information of the target pixel point;

[0049] The target pixel brightness information of the candidate weeding area image is determined according to the target pixel and the brightness information of the target pixel.

[0050] Determining the target pixel point according to the chromaticity value of the mutation peak point may be to determine all the pixel points whose chromaticity values ​​in the candidate weeding area image are the chromaticity values ​​of the mutation peak point as the target pixel points.

[0051] According to the target pixel and the position information of the target pixel, the target pixel position information of the candidate weeding area image is determined. Exemplarily, if the position information is the coordinates of the target pixel, the target pixel position information may be the average position of the target pixel, that is, the average value of the sum of the y-axis coordinate values ​​of all the target pixels, which is not limited in this embodiment.

[0052] According to the target pixel and the brightness information of the target pixel, the target pixel brightness information of the candidate weeding area image is determined. Exemplarily, the brightness information of the target pixel is the brightness value of the pixel, and the target pixel brightness information can be the average brightness of the target pixel, that is, the average value of the sum of the brightness values ​​of all target pixels, which is not limited in this embodiment.

[0053] The target pixel point is determined by mutation of the peak point chromaticity value to determine the target pixel position information and the target pixel brightness information, thereby improving the pertinence of obtaining the target pixel position information and the target pixel brightness information, thereby improving the accuracy of subsequent determination of whether there is an exposed area in the candidate weeding area image.

[0054] Step 140: Determine the number of effective chromaticity pixels in the candidate weeding area image that are in a preset chromaticity range.

[0055] The preset chromaticity interval may be [15, 95], which is not limited in this embodiment. Pixels in the candidate weeding area image whose chromaticity values ​​are in the preset chromaticity interval are taken as chromaticity effective pixels, and the number of chromaticity effective pixels is the number of chromaticity effective pixels.

[0056] Step 150, determining whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image.

[0057] The brightness information, the number of effective chromaticity pixels, the target pixel position information and the target pixel brightness information of the candidate weeding area image, and the peak value of the mutation peak point of the chromaticity histogram are compared with the preset information judgment conditions. Among them, the preset information judgment conditions are related to the brightness information, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of effective chromaticity pixels. If the preset information judgment conditions are met, it is determined that the suspected obstacle area in the candidate weeding area image is the grass area where the candidate weeding area image is exposed due to strong light irradiation, and is not an obstacle area, so as to prevent the weeding robot from misjudging the grass irradiated by strong light as an obstacle or boundary.

[0058] The technical solution provided by the present embodiment obtains the chromaticity information, the number of pixels in the exposure state and the number of white pixels in the non-exposed state of the candidate weeding area image; generates a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtains the peak information of the chromaticity histogram; the peak information includes: the chromaticity value of the mutation peak point and the peak value of the mutation peak point; determines the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point; determines the number of chromaticity effective pixels in the candidate weeding area image that are in a preset chromaticity interval; determines whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposure state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image, thereby solving the problem that the boundary of the weeding area of ​​the weeding robot is calibrated by burying boundary lines in the prior art, which consumes a lot of manpower and material resources and increases costs. Furthermore, since there are restrictions on the burying of the boundary line, the shape of the weeding area is restricted 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.

[0059] Embodiment 2

[0060] Figure 2A flowchart of an obstacle identification method provided for the second embodiment of the present invention, this technical solution is to supplement the process of determining whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromatic effective pixels. Compared with the above scheme, this scheme is specifically optimized to determine whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromatic effective pixels, including:

[0061] If the peak value of the mutation peak point is greater than the preset mutation peak point peak value threshold, and the target pixel average brightness is greater than the preset target pixel average brightness threshold, and the target pixel average position is less than the preset target pixel average position threshold, and the number of exposed state pixels is greater than the preset exposure state pixel number threshold, and the number of chromaticity effective pixels is greater than the preset chromaticity effective pixel number threshold, and the number of non-exposed state white pixels is less than the preset non-exposed state white pixel number threshold, then it is determined that there is an exposed area in the candidate weeding area image. Specifically, the flowchart of the obstacle recognition method is as follows Figure 2 As shown:

[0062] Step 210: Obtain the chromaticity information, the number of pixels in the exposed state, and the number of white pixels in the non-exposed state of the candidate weeding area image.

[0063] Step 220: Generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a mutation peak point chromaticity value and a mutation peak point peak value.

[0064] Step 230, determining the target pixel position information and target pixel brightness information of the candidate weeding area image according to the mutation peak point chromaticity value; the target pixel position information includes: target pixel average position; the target pixel brightness information includes: target pixel average brightness.

[0065] Step 240: Determine the number of effective chromaticity pixels in the candidate weeding area image that are in a preset chromaticity range.

[0066] Step 250: If the peak value of the mutation peak point is greater than the preset mutation peak point peak threshold, and the average brightness of the target pixels is greater than the preset average brightness threshold of the target pixels, and the average position of the target pixels is less than the preset average position threshold of the target pixels, and the number of pixels in the exposure state is greater than the preset number of pixels in the exposure state threshold, and the number of chromaticity effective pixels is greater than the preset number of chromaticity effective pixels threshold, and the number of white pixels in the non-exposure state is less than the preset number of white pixels in the non-exposure state threshold, then it is determined that there is an exposure area in the candidate weeding area image to determine whether there is an obstacle in the candidate weeding area image.

[0067] Exemplarily, the peak value of the mutation peak point is denoted as singleV, the average brightness of the target pixels is denoted as Vs, the average position of the target pixels is denoted as is, the number of pixels in the exposure state is denoted as overbrightPix, the number of chromaticity effective pixels is denoted as vaildPixels, and the number of white pixels in the non-exposure state is denoted as zeroPix. If the preset mutation peak point peak threshold is 500, the preset average brightness threshold of the target pixels is 200, the preset average position threshold of the target pixels is 40, the preset number of pixels in the exposure state threshold is 30, the preset number of chromaticity effective pixels threshold is 16000, and the preset number of white pixels in the non-exposure state threshold is 100.

[0068] Then the preset information judgment condition is 500 < singleV and Vs > 200 and is < 40 and overbrightPix > 30 and vaildPixel > 16000 and zeroPix < 100. The preset information judgment condition can be adjusted according to the specific judgment scenario, and this embodiment does not limit this. When this condition is met, it is determined that there is an exposure area in the candidate weeding area image. Then the suspected obstacle area in the candidate weeding area image at this time is the exposure area where, when the weeding robot walks from a dark place to a strong light place, the camera automatically adjusts according to the light, but the adjustment requires a certain reaction time. Since the contrast between light and dark is very strong at this time, the strong light part is overexposed, rather than the obstacle area.

[0069] In this embodiment, optionally, determining whether there is an obstacle in the candidate weeding area image includes:

[0070] If there is the exposure area, then obtain the chromaticity segmentation image of the candidate weeding area image according to the preset chromaticity segmentation interval;

[0071] According to the chromaticity segmentation image, determine whether there is an obstacle in the candidate weeding area image.

[0072] Among them, the preset chromaticity segmentation interval can be [15,95], which is not limited in this embodiment. The chromaticity segmentation image of the candidate weeding area image is obtained according to the preset chromaticity segmentation interval. For example, the pixels in the candidate weeding area image whose chromaticity values ​​are in the preset chromaticity segmentation interval are converted to white, and the other pixels are converted to black to obtain a chromaticity segmentation image. Then the white area is the grass area, and the black area is the non-grass area. According to the chromaticity segmentation image, it is determined whether there are obstacles in the candidate weeding area image. It can be done by comparing the non-grass area with the exposure area. If they are consistent, it is determined that there are no obstacles in the candidate weeding area image, or the exposure area is directly used as a non-obstacle area to improve the accuracy of image segmentation. This embodiment is not limited in this. Avoid judging the exposure area as an obstacle area, thereby improving the accuracy of obstacle determination.

[0073] The embodiment of the present invention determines whether there is an exposed area in the candidate weeding area image by using the peak value of the mutation peak point, the average brightness of the target pixel, the average position of the target pixel, the number of pixels in the exposure state, the number of effective chromaticity pixels and the number of white pixels in the non-exposed state, so as to determine whether there is an obstacle in the candidate weeding area image, effectively identify the grass area illuminated by strong light, prevent the robot from misjudging the grass illuminated by strong light as a highly reflective obstacle or boundary such as a white surface, and improve the accuracy of obstacle recognition. In addition, there is no need to reduce the speed of the robot to wait for the camera to be adjusted, and there is no need to replace the advanced camera module, thereby reducing the cost of robot manufacturing.

[0074] Embodiment 3

[0075] 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:

[0076] An information acquisition module 310 is used to acquire the chromaticity information, the number of pixels in an exposed state, and the number of white pixels in a non-exposed state of the candidate weeding area image;

[0077] The histogram generation module 320 is used to generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a chromaticity value of a mutation peak point and a peak value of a mutation peak point;

[0078] An information determination module 330 is used to determine the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point;

[0079] The pixel number determination module 340 determines the number of chromaticity effective pixels in the candidate weeding area image that are in a preset chromaticity interval;

[0080] The obstacle determination module 350 is used to determine whether there is an exposed area in the candidate weeding area image based on the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image.

[0081] The embodiment of the present invention obtains the chromaticity information, the number of pixels in the exposure state and the number of white pixels in the non-exposed state of the candidate weeding area image; generates the chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtains the peak information of the chromaticity histogram; the peak information includes: the chromaticity value of the mutation peak point and the peak value of the mutation peak point; determines the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point; determines the number of chromaticity effective pixels in the candidate weeding area image that are in a preset chromaticity interval; determines whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposure state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image. The method solves the problem that the boundary of the weeding area of ​​the weeding robot is usually calibrated by burying the boundary line in the prior art, which consumes a lot of manpower and material resources and increases the cost. Furthermore, since there are restrictions on the burying of the boundary line, the shape of the weeding area is restricted 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 histogram generation module includes:

[0083] A histogram generating unit, configured to perform histogram statistics on the chromaticity information to generate a chromaticity histogram of the candidate weeding area image;

[0084] The mutation peak point determination unit is used to determine the mutation peak point according to the difference between adjacent frequencies in the chromaticity histogram, and obtain the peak information of the mutation peak point.

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

[0086] A target pixel point determination unit, used to determine the target pixel point according to the chromaticity value of the mutation peak point;

[0087] a target pixel position information determining unit, configured to determine the target pixel position information of the candidate weeding area image according to the target pixel point and the position information of the target pixel point;

[0088] The target pixel brightness information determining unit is used to determine the target pixel brightness information of the candidate weeding area image according to the target pixel point and the brightness information of the target pixel point.

[0089] On the basis of the above technical solutions, optionally, the number of pixels in the exposure state and the number of white pixels in the non-exposed state include: the number of pixels in the exposure state and the number of white pixels in the non-exposed state; the target pixel position information includes: the average position of the target pixel; the target pixel brightness information includes: the average brightness of the target pixel;

[0090] The obstacle determination module comprises:

[0091] The first obstacle determination unit is used to determine that there is an exposed area in the candidate weeding area image if the peak value of the mutation peak point is greater than a preset mutation peak point peak threshold, and the average brightness of the target pixels is greater than the preset target pixel average brightness threshold, and the average position of the target pixels is less than the preset target pixel average position threshold, and the number of exposed state pixels is greater than the preset exposure state pixel number threshold, and the number of chromaticity effective pixels is greater than the preset chromaticity effective pixel number threshold, and the number of non-exposed state white pixels is less than the preset non-exposed state white pixel number threshold.

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

[0093] a chromaticity segmentation image acquisition unit, configured to acquire a chromaticity segmentation image of the candidate weeding area image according to a preset chromaticity segmentation interval if the exposure area exists;

[0094] The second obstacle determination unit is used to determine whether there is an obstacle in the candidate weeding area image according to the chromaticity segmentation image.

[0095] Embodiment 4

[0096] 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 4The example of connecting through bus is taken in the following.

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

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

[0099] Embodiment 5

[0100] 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:

[0101] Obtaining the chromaticity information, the number of pixels in the exposed state, and the number of white pixels in the non-exposed state of the candidate weeding area image;

[0102] Generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a chromaticity value of a sudden change peak point and a peak value of a sudden change peak point;

[0103] Determine the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point;

[0104] Determine the number of chromaticity effective pixels in a preset chromaticity interval in the candidate weeding area image;

[0105] According to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, it is determined whether there is an exposed area in the candidate weeding area image to determine whether there is an obstacle in the candidate weeding area image.

[0106] 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 method operations described above, and can also execute related operations in the obstacle recognition method provided in any embodiment of the present invention.

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

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

[0109] Embodiment 6

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

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

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

[0113] 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: Acquire the chromaticity information, the number of pixels in the exposure state, and the number of white pixels in the non-exposed state of the candidate weeding area image; wherein the number of pixels in the exposure state is the number of pixels whose brightness value is greater than or equal to a first preset threshold in the brightness channel image of the candidate weeding area image; the number of white pixels in the non-exposed state is the number of pixels whose brightness value is less than the first preset threshold in the brightness channel image of the candidate weeding area image, and whose chromaticity value is less than or equal to a second preset threshold in the chromaticity channel image of the candidate weeding area image; Generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a chromaticity value of a sudden change peak point and a peak value of a sudden change peak point; Determine the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point; Determine the number of chromaticity effective pixels in a preset chromaticity interval in the candidate weeding area image; Determine whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image; Wherein, determining the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point includes: Determine the target pixel point according to the chromaticity value of the mutation peak point; Determining target pixel position information of the candidate weeding area image according to the target pixel point and the position information of the target pixel point; Determining target pixel brightness information of the candidate weeding area image according to the target pixel and brightness information of the target pixel; Wherein, the target pixel position information includes: the average position of the target pixel; the target pixel brightness information includes: the average brightness of the target pixel; Wherein, determining whether there is an exposed area in the candidate weeding area image according to the number of pixels in the exposed state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels includes: If the peak value of the mutation peak point is greater than the preset mutation peak point peak value threshold, and the target pixel average brightness is greater than the preset target pixel average brightness threshold, and the target pixel average position is less than the preset target pixel average position threshold, and the number of pixels in the exposure state is greater than the preset exposure state pixel number threshold, and the number of chromaticity effective pixels is greater than the preset chromaticity effective pixel number threshold, and the number of white pixels in the non-exposed state is less than the preset white pixel number threshold in the non-exposed state, then it is determined that there is an exposed area in the candidate weeding area image; Wherein, determining whether there is an obstacle in the candidate weeding area image includes: If the exposure area exists, the pixels whose chromaticity values ​​in the candidate weeding area image are in the preset chromaticity segmentation interval are converted to white, and the other pixels are converted to black, so as to obtain a chromaticity segmentation image, in which the white area is the grass area and the black area is the non-grass area; The non-grass area is compared with the exposure area, and if they are consistent, it is determined that there is no obstacle in the candidate weeding area image.

2. The method according to claim 1, characterized in that Generating a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and acquiring peak information of the chromaticity histogram, including: Performing histogram statistics on the chromaticity information to generate a chromaticity histogram of the candidate weeding area image; According to the difference between adjacent frequencies in the chromaticity histogram, a mutation peak point is determined, and peak information of the mutation peak point is obtained.

3. An obstacle recognition device, characterized in that: include: An information acquisition module, used to acquire chromaticity information, the number of pixels in an exposed state, and the number of white pixels in a non-exposed state of a candidate weeding area image; wherein the number of pixels in an exposed state is the number of pixels whose brightness value is greater than or equal to a first preset threshold in a brightness channel image of the candidate weeding area image; the number of white pixels in a non-exposed state is the number of pixels whose brightness value is less than the first preset threshold in the brightness channel image of the candidate weeding area image, and whose chromaticity value is less than or equal to a second preset threshold in the chromaticity channel image of the candidate weeding area image; A histogram generation module is used to generate a chromaticity histogram of the candidate weeding area image according to the chromaticity information, and obtain peak information of the chromaticity histogram; the peak information includes: a mutation peak point chromaticity value and a mutation peak point peak value; An information determination module, used to determine the target pixel position information and the target pixel brightness information of the candidate weeding area image according to the chromaticity value of the mutation peak point; A pixel number determination module determines the number of chromaticity effective pixels in a preset chromaticity interval in the candidate weeding area image; An obstacle determination module is used to determine whether there is an exposure area in the candidate weeding area image according to the number of pixels in the exposure state, the number of white pixels in the non-exposed state, the peak value of the mutation peak point, the target pixel position information, the target pixel brightness information and the number of chromaticity effective pixels, so as to determine whether there is an obstacle in the candidate weeding area image; Wherein, the information determination module includes: A target pixel point determination unit, used to determine the target pixel point according to the chromaticity value of the mutation peak point; a target pixel position information determining unit, configured to determine the target pixel position information of the candidate weeding area image according to the target pixel point and the position information of the target pixel point; a target pixel brightness information determining unit, configured to determine the target pixel brightness information of the candidate weeding area image according to the target pixel point and the brightness information of the target pixel point; Wherein, the target pixel position information includes: the average target pixel position; the target pixel brightness information includes: the average target pixel brightness; Wherein, the obstacle determination module includes: A first obstacle determination unit is configured to determine that there is an exposed area in the candidate weeding area image if the peak value of the sudden change peak point is greater than a preset sudden change peak point peak value threshold, and the target pixel average brightness is greater than a preset target pixel average brightness threshold, and the target pixel average position is less than a preset target pixel average position threshold, and the number of pixels in the exposed state is greater than a preset exposure state pixel number threshold, and the number of chromaticity effective pixels is greater than a preset chromaticity effective pixel number threshold, and the number of white pixels in the non-exposed state is less than a preset white pixel number threshold in the non-exposed state; Wherein, the obstacle determination module further includes: a chromaticity segmentation image acquisition unit, for converting the pixel points whose chromaticity values ​​are in a preset chromaticity segmentation interval in the candidate weeding area image into white and the other pixel points into black, if the exposure area exists, so as to obtain a chromaticity segmentation image, wherein the white area is the grass area and the black area is the non-grass area; The second obstacle determination unit is used to compare the non-grass area with the exposure area, and if they are consistent, determine that there is no obstacle in the candidate weeding area image.

4. The device according to claim 3, characterized in that The histogram generation module comprises: A histogram generating unit, configured to perform histogram statistics on the chromaticity information to generate a chromaticity histogram of the candidate weeding area image; The mutation peak point determination unit is used to determine the mutation peak point according to the difference between adjacent frequencies in the chromaticity histogram, and obtain the peak information of the mutation peak point.

5. 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-2.

6. 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-2 is implemented.

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

Citation Information

Patent Citations

  • Image processing method and device, computer equipment and computer-readable storage medium

    CN107862657A

  • Image processing method and apparatus, electronic device, and computer-readable storage medium

    CN107945106A