Method for controlling mowing robot to return to charging station and mowing robot
By capturing images of the charging station using a vision module and performing binarization and texture extraction, the lawnmower robot can accurately identify the center reference line of the charging station, solving the problem of the lawnmower robot having difficulty returning to the charging station and improving the success rate.
Patent Information
- Application Number
- CN202410543615.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-10-31
AI Technical Summary
The lawnmower robot has difficulty accurately determining the location of the charging station during its return journey, especially from a distance where it is difficult to distinguish between visual markers and the lawn, which makes the return difficult and affects the success rate.
The system uses a vision module to capture images of the charging station, performs color feature-based binarization and texture extraction, generates a second binarized image through logical operations, and determines the center reference line of the charging station to guide the lawnmower robot back to the charging station.
This improved the success rate of lawnmower robots returning to charging stations, reduced interference from lawn information on visual identifiers, and ensured accurate identification and return.
Smart Images

Figure CN120871829A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of self-moving equipment technology, and more particularly to a method for controlling a lawnmower robot to return to a charging station and the lawnmower robot itself. Background Technology
[0002] In modern landscape maintenance and management, the widespread application of lawn-mowing robots has facilitated the daily maintenance of parks, residential areas, and other green spaces. These robots can autonomously complete tasks such as mowing and cleaning, significantly reducing the need for human resources and management costs.
[0003] However, robotic lawnmowers also present some challenges. For example, when returning to a charging station, they may have difficulty accurately locating the station, making it difficult to return. To address this, visual markers are typically placed at the charging station, allowing the robot to identify them and return. However, from certain viewing angles, the robot may struggle to distinguish between the visual markers and the surrounding lawn, making it difficult to return and impacting its success rate.
[0004] Based on this, this application provides a method for controlling a lawnmower robot to return to a charging station and a lawnmower robot, in order to improve related technologies. Summary of the Invention
[0005] The purpose of this application is to provide a method for controlling a lawnmower robot to return to a charging station and a lawnmower robot that can improve the success rate of the lawnmower robot returning to the charging station.
[0006] The objective of this application is achieved through the following technical solution:
[0007] In a first aspect, this application provides a method for controlling a lawnmower robot to return to a charging station, the method comprising:
[0008] The charging station is photographed using a vision module to obtain an image of the charging station that includes the visual identifier of the charging station;
[0009] The charging station image is subjected to color feature-based binarization processing to obtain a first binarized image, and the charging station image is subjected to texture extraction to obtain a texture image;
[0010] Logical operations are performed on the first binarized image and the texture image to obtain a second binarized image containing the visual identifier;
[0011] Based on the visual identifiers in the second binarized image, a center reference line for the charging station is determined so that the lawnmower robot can move to the charging station along the center reference line.
[0012] In some embodiments, the color features are represented by chroma, saturation, and brightness, and the binarization processing of the charging station image based on the color features to obtain a first binarized image includes:
[0013] The charging station image is converted to HSV to obtain the chroma, saturation, and brightness of all pixels in the charging station image;
[0014] Based on the specified numerical ranges of chroma, saturation, and brightness, the pixel values of pixels in the charging station image whose chroma, saturation, and brightness are all within the corresponding specified numerical ranges are set to 1, and the pixel values of pixels in the charging station image whose chroma, saturation, and brightness are at least outside the corresponding specified numerical ranges are set to 0, so as to generate the first binarized image.
[0015] In some embodiments, the specified numerical range of the chroma is 0 to 32 and 172 to 180, the specified numerical range of the saturation is 73 to 255, and the specified numerical range of the lightness is 80 to 255.
[0016] In some embodiments, the step of performing logical operations based on the first binarized image and the texture image to obtain a second binarized image containing the visual identifier includes:
[0017] A bitwise AND operation is performed on the portion of the first binarized image where the pixel value is 1 and the pixel value of the texture image is 0 to obtain the second binarized image.
[0018] In some embodiments, determining the center reference line of the charging station based on visual identifiers in the second binarized image includes:
[0019] Obtain the third binarized image corresponding to the second binarized image, wherein the third binarized image contains only the visual identifier and the background;
[0020] The center reference line of the charging station is determined based on the visual identifiers in the third binarized image.
[0021] In some embodiments, obtaining the third binarized image corresponding to the second binarized image includes:
[0022] The second binarized image is filtered to obtain a filtered image;
[0023] In the filtered image, two strip regions that meet specified size and / or specified shape conditions are identified as visual identifier regions;
[0024] Remove the portion outside the visual identifier region from the filtered image, and use the remaining portion as a third binarized image.
[0025] In some embodiments, the visual identifier includes two color bands, and determining the center reference line of the charging station based on the visual identifier in the third binarized image includes:
[0026] Obtain the fitted lines corresponding to the two color bands in the third binarized image;
[0027] Extend the fitted line to the upper or lower boundary line of the third binarized image to obtain the intersection point located on the same boundary line;
[0028] Based on the intersection point, the center reference line of the charging station is determined.
[0029] In some embodiments, obtaining the fitted lines corresponding to the two color bands in the third binarized image includes:
[0030] Each color band in the third binarized image is fitted with a straight line to obtain a fitted line corresponding to each color band.
[0031] In some embodiments, the step of extracting texture from the charging station image to obtain a texture image includes:
[0032] The charging station image is processed to generate a grayscale image;
[0033] Edge calculation is performed on the grayscale image to obtain edge information;
[0034] The edge information is used to perform morphological closure calculation on the grayscale image to achieve texture extraction, thereby obtaining the texture image.
[0035] Secondly, this application provides a lawnmower robot, including a control module for performing any of the methods described above.
[0036] This application provides a method for controlling a lawnmower robot to return to a charging station, and the lawnmower robot itself. First, a vision module captures an image of the charging station containing visual markers. This image is then binarized to obtain a first binarized image, and texture is extracted to obtain a texture image. Next, logical operations are performed on the first binarized image and the texture image to obtain a second binarized image. Based on the visual markers in the second binarized image, a center reference line for the charging station is determined, allowing the lawnmower robot to return to the charging station along this center reference line. The charging station image contains information about the surrounding lawn and visual markers. By using the first binarized image and the texture image obtained from the charging station image, logical operations are performed to obtain the second binarized image. In the second binarized image, the lawn information is reduced, minimizing interference with the visual marker information. This allows the lawnmower robot to return to the charging station based on the visual marker information in the second binarized image, enabling the lawnmower robot to accurately recognize the visual markers and thus improving the success rate of the lawnmower robot returning to the charging station. Attached Figure Description
[0037] This application will be further described below with reference to the accompanying drawings and specific embodiments.
[0038] Figure 1 This is a flowchart illustrating a method for controlling a lawnmower robot to return to a charging station, as provided in an embodiment of this application.
[0039] Figure 2 This is a first binarized image provided in the embodiments of this application.
[0040] Figure 3 This is a texture image provided in an embodiment of this application.
[0041] Figure 4 This is a second binarized image provided in the embodiments of this application.
[0042] Figure 5 This is an image of a charging station provided in an embodiment of this application.
[0043] Figure 6 This is another charging station image provided in the embodiments of this application.
[0044] Figure 7 This is a third binarized image provided in the embodiments of this application.
[0045] Figure 8 This is a fitted image provided in an embodiment of this application.
[0046] Figure 9 This is a schematic diagram of a process for determining the center reference line of a charging station, provided in an embodiment of this application.
[0047] Figure 10This is a filtered image provided in an embodiment of this application.
[0048] Figure 11 This is a schematic diagram of a process for obtaining a third binarized image corresponding to a second binarized image, provided in an embodiment of this application.
[0049] Figure 12 This is an edge image provided in an embodiment of this application.
[0050] In the image: 100, charging station; 200, visual signage. Detailed Implementation
[0051] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0053] During the lawnmower's return to the charging station, the control module needs to determine its position relative to the charging station based on visual information and control the lawnmower to move in front of the charging station. However, when using visual information to determine the charging station's position, it may be difficult to identify the docking point within the charging station, making it difficult for the lawnmower to return. The docking point can be the location of the charging connector on the charging station. To accurately determine the docking point, visual markers can usually be placed on the charging station so that the lawnmower can return based on these markers. However, at certain viewing angles, the lawnmower may have difficulty distinguishing between the visual markers and the surrounding lawn, making it difficult for the lawnmower to return and affecting its success rate. Furthermore, at different locations in front of the charging station, the images of the charging station captured by the lawnmower may exhibit varying degrees of distortion, making it difficult to directly utilize the visual markers in the charging station images.
[0054] See Figures 1 to 4 , Figure 1 This is a flowchart illustrating a method for controlling a lawnmower robot to return to a charging station, as provided in an embodiment of this application. Figure 2This is a first binarized image provided in an embodiment of this application. Figure 3 This is a texture image provided in an embodiment of this application. Figure 4 This is a second binarized image provided in the embodiments of this application.
[0055] In order to improve the relevant technology and enable the lawn mowing robot to return to the charging station smoothly, this application provides a method for controlling the lawn mowing robot to return to the charging station, including steps S101 to S104.
[0056] Step S101: Use a vision module to capture an image of the charging station to obtain an image of the charging station containing its visual identifier.
[0057] Step S102: Perform color feature-based binarization processing on the charging station image to obtain a first binarized image, and perform texture extraction on the charging station image to obtain a texture image.
[0058] Step S103: Perform logical operations based on the first binarized image and the texture image to obtain a second binarized image containing the visual identifier.
[0059] Step S104: Based on the visual identifiers in the second binarized image, determine the center reference line of the charging station so that the lawnmower robot moves to the charging station along the center reference line.
[0060] The vision module refers to the components or systems equipped on the lawnmower robot for visual perception and recognition. Visual markings on the charging station can be color bands, shape markings, stripes or pattern markings, reflective markings, etc. Binarization processing refers to an image processing technique, such as converting each pixel in the charging station image into a first binary image with a pixel value of 0 or 1. Texture extraction from the charging station image is the process of extracting surface texture information from the image, for example, by calculating local features of the image. The center reference line can be a virtual ray or a straight line, where the ray extends from the docking position of the charging station, and the straight line passes through the docking position of the charging station.
[0061] In the above embodiments, when the vision module captures images of the charging station, it also captures images of the lawn. This results in the charging station image containing not only the visually identified charging station information but also information about the surrounding lawn. To reduce interference from the lawn information on the visual identifiers, the vision module first captures an image of the charging station. This image is then subjected to a first binarization process to obtain a first binarized image, and texture extraction is performed to obtain a texture image. Logical operations are then performed on the first binarized image and the texture image to obtain a second binarized image. Based on the visual identifiers in the second binarized image, a center reference line for the charging station is determined, allowing the lawnmower robot to return to the charging station along this center reference line.
[0062] The charging station images captured by the vision module in the above embodiments are usually in color. Further processing of these color images is needed to obtain visual identifier information. Binarization processing is performed on the color charging station images to obtain a first binarized image (e.g., ...). Figure 2 As shown in the image, the simplified image content can highlight the features of the charging station more effectively. However, a significant amount of grass information still interferes with the visual identifiers in the first binarized image, making accurate identification of the visual identifiers difficult. Furthermore, texture extraction is performed on the colored charging station image to obtain a texture image (such as...). Figure 3 As shown in the figure), similarly, the texture image also contains a large amount of lawn information that interferes with the visual identifier information. It should be noted that the first binarized image and texture image obtained above are processed separately from the colored charging station image; they can be processed simultaneously or sequentially, and this application embodiment does not limit this. To reduce lawn information interference and highlight the visual identifier information, this application embodiment further processes the first binarized image and texture image, obtaining a second binarized image (e.g., ...) through logical operations on the first binarized image and texture image. Figure 4 As shown in the diagram, the lawn information is greatly reduced in the second binarized image, making it less likely to interfere with the visual identifiers. The visual identifiers in the second binarized image can then be used for further processing. Based on the visual identifiers in the second binarized image, a center reference line for the charging station is determined, allowing the lawnmower robot to move along this line to the charging station. Setting a center reference line facilitates a faster return of the lawnmower robot to the charging station, improving its success rate.
[0063] See Figures 5 to 6 , Figure 5 An image of a charging station provided in an embodiment of this application. Figure 6 This is another charging station image provided in this embodiment.
[0064] Under sunlight, the color of the visual markers in the charging station images captured by the vision module will vary depending on the viewing angle. Taking color strips (i.e., color markings) as an example, red stripes are used for easy identification to distinguish them from the color of the grass (e.g.,...). Figure 5 (As shown). However, under sunlight, at certain viewing angles, the red band in the charging station image captured by the vision module will appear approximately yellow, making it resemble the yellow of withered grass in a lawn (e.g.). Figure 6As shown in the image, this makes it difficult for the lawnmower robot to directly obtain the center reference line based on the color band of the charging station image. To ensure that a suitable first binarized image can be obtained based on different charging station images, in some embodiments, the color features can be represented by chroma, saturation, and brightness. In step S102, the binarization processing of the charging station image based on color features to obtain the first binarized image may include: performing HSV conversion on the charging station image to obtain the chroma, saturation, and brightness of all pixels in the charging station image; setting the pixel value of pixels in the charging station image whose chroma, saturation, and brightness are all within the corresponding specified value ranges to 1, and setting the pixel value of pixels in the charging station image whose chroma, saturation, and brightness are at least outside the corresponding specified value ranges to 0, thereby generating the first binarized image.
[0065] In HSV conversion, HSV stands for Hue, Saturation, and Value. HSV is a color space representation method that can convert color information in the RGB color model into a more easily processed and understood form. For example, a charging station image obtained using a vision module may be in RGB format, and it can be converted to HSV for easier subsequent processing.
[0066] In the above embodiments, to reduce the impact of color similarity on color band recognition, the charging station image is converted to HSV to obtain the chroma, saturation, and brightness of all pixels in the charging station image. HSV conversion separates the color and brightness information of the color bands in the charging station image, making color analysis and processing more convenient. Chroma represents the basic attribute of color, saturation represents the purity or vividness of color, and brightness represents the lightness of color. During HSV conversion, these three channels are processed separately. The color characteristics of the color band itself and its color characteristics under sunlight can be specified to determine the specified numerical ranges for chroma, saturation, and brightness. Pixels in the charging station image within the specified numerical range are set to 1 (i.e., displayed as white in the first binary image), while pixels outside the specified numerical range are set to 1 (i.e., displayed as black in the first binary image). However, because the color features of the color bands in the charging station image are quite similar to the color features of the lawn, the lawn within a certain numerical range will also appear white in the first binarized image, thus interfering with the recognition of the color bands. Figure 2 As shown.
[0067] In some embodiments, the specified numerical ranges for chroma are 0–32 and 172–180, for saturation are 73–255, and for lightness are 80–255. In the HSV color space, the specified numerical ranges for chroma (0–32 and 172–180) represent colors with chroma between 0 and 32 degrees and between 172 and 180 degrees, typically including red, orange, and yellow. The specified numerical range for saturation (73–255) represents colors with saturation between 73 and 255, indicating vivid colors that are not too close to gray. The specified numerical range for lightness (80–255) represents colors with lightness between 80 and 255, indicating relatively bright colors. Therefore, the specified numerical ranges for chroma, saturation, and lightness include relatively vivid and bright reds, oranges, and yellows, corresponding to the color bands and partial lawn color characteristics in the charging station image. Correspondingly, in the first binarized image, the pixel values displayed as color bands and parts of the lawn are 1, that is, displayed as white, while the pixel values outside the specified range in the first binarized image are 0, that is, displayed as black.
[0068] In the first binarized image and the texture image, there is a significant amount of lawn information that interferes with the visual identifier information, making it difficult for the lawnmower robot to return to the charging station based on the visual identifier in either the first binarized image or the texture image. To improve this problem, in some embodiments, the step of performing logical operations based on the first binarized image and the texture image to obtain a second binarized image containing the visual identifier (i.e., step S103) may include: performing a bitwise AND operation on the portions of the first binarized image where the pixel value is 1 and the pixel value is 0 in the texture image to obtain the second binarized image, such as... Figure 4 As shown.
[0069] In the above embodiments, a logical AND operation is performed on corresponding pixels of the first binarized image and the texture image to obtain a second binarized image. The value of each pixel in the second binarized image depends on the value of the corresponding pixel in the first binarized image and the texture image. For a portion where the pixel value in the first binarized image is 1 and the pixel value in the texture image is 0, the corresponding pixel value in the second binarized image is 1, i.e., it is displayed as white in the second binarized image. Conversely, if neither the pixel value in the first binarized image nor the pixel value in the texture image is satisfied, the corresponding pixel value in the second binarized image is 0, i.e., it is displayed as black in the second binarized image. The portion where the pixel value in the first binarized image is 1 includes visual signs and a portion of the lawn; in the texture image, the portion where the pixel value is 0 includes a portion of the charging station (including visual signs) and a portion of the lawn.
[0070] In the above embodiments, it can be seen from the first binarized image and the texture image that although grass information exists in both, the pixel values of the grass at corresponding positions are almost different, so that the corresponding position of the grass in the second binarized image has a pixel value of 0 after logical operation, that is, it is displayed as black, which greatly reduces the grass information in the second binarized image, thereby reducing the interference with the visual identifiers in the second binarized image.
[0071] See Figures 7 to 9 , Figure 7 This is a third binarized image provided in the embodiments of this application. Figure 8 This is a fitted image provided in an embodiment of this application. Figure 9 This is a schematic diagram of a process for determining the center reference line of a charging station, provided in an embodiment of this application.
[0072] In the second binarized image, although the lawn information has been significantly reduced, some lawn information may still exist around the visual sign, causing interference. To further reduce the interference of the lawn on the visual sign, in some embodiments, in step S104, determining the center reference line of the charging station based on the visual sign in the second binarized image may include steps S201 to S202.
[0073] Step S201: Obtain the third binarized image corresponding to the second binarized image, wherein the third binarized image contains only the visual identifier and the background.
[0074] Step S202: Determine the center reference line of the charging station based on the visual identifiers in the third binarized image.
[0075] In the above embodiments, to further reduce the interference of the lawn on the visual markers, a third binarized image is obtained by further processing the second binarized image. The third binarized image contains only the visual markers and the background. Here, the background refers to the portion of the third binarized image where all pixel values except for the visual markers are 0, i.e., the background is displayed as black. The visual markers in the third binarized image have pixel values of 1, i.e., they are displayed as white. Based on the visual markers in the third binarized image, the obtained center reference line is more accurate, thereby improving the success rate of the lawnmower robot returning to the charging station.
[0076] See Figure 10 and Figure 11 , Figure 10 A filtered image is provided in an embodiment of this application. Figure 11 This is a schematic diagram of a process for obtaining a third binarized image corresponding to a second binarized image, provided in an embodiment of this application.
[0077] In the process of obtaining a third binarized image based on a second binarized image, in order to further distinguish between lawn information and visual identifier information, in some embodiments, the acquisition of the third binarized image corresponding to the second binarized image in step S201 may include steps S301 to S203.
[0078] Step S301: Filter the second binarized image to obtain a filtered image.
[0079] Step S302: In the filtered image, determine two strip regions that meet the specified size and / or specified shape conditions as visual identifier regions.
[0080] Step S303: Remove the portion outside the visual identifier region from the filtered image, and use the remaining portion as the third binarized image.
[0081] Filtering is an image processing operation, such as smoothing or enhancing a second binarized image to remove noise or interference from the lawn information to highlight visual markers in the image. The number of visual markers installed on the charging station can be one or more.
[0082] In the above embodiments, by filtering the second binarized image, most of the lawn information can be eliminated, reducing interference with visual markers. The filtered image can also be used to determine the center reference line. The lawn information in the filtered image is displayed in a scattered state, hardly interfering with the visual markers. Therefore, the visual markers in the filtered image can also be used to determine the center reference line to guide the lawnmower robot back to the charging station.
[0083] The above embodiment uses the setting of two visual signs on a charging station as an example. Accordingly, the first binarized image, texture image, second binarized image, and filtered image will each contain the corresponding two visual signs. In this embodiment, the visual signs can be set as bar shapes. Two bar regions in the filtered image that meet specified size conditions and / or specified shape conditions are determined as visual sign regions. That is, two bar regions in the filtered image that meet the size conditions and / or bar shape conditions of the visual signs are selected as visual sign regions, and the parts of the filtered image other than the visual signs are removed. The aforementioned visual sign regions and the parts of the filtered image other than the visual signs are used as the third binarized image.
[0084] In the third binarized image, although the visual identifiers are not affected by the lawn information, how to enable the lawnmower robot to quickly return to the charging station based on the visual identifiers still presents a problem. In some embodiments, the visual identifiers include two color bands. The step of determining the center reference line of the charging station based on the visual identifiers in the third binarized image (i.e., step S202) may include: obtaining the fitted lines corresponding to the two color bands in the third binarized image; extending the fitted lines to the upper or lower boundary line of the third binarized image to obtain the intersection point located on the same boundary line; and determining the center reference line of the charging station based on the intersection point.
[0085] In the above embodiments, the visual identifiers set on the charging station are color strips. The number of color strips can be one or more. One color strip can be placed in the middle of the charging station, and multiple color strips can be distributed along the edges of the charging station base. Taking two color strips as an example, the two color strips can be distributed on both sides of the charging station base surface. Correspondingly, the first binarized image, texture image, second binarized image, and filtered image will also contain the corresponding two color strips. To obtain the fitting lines corresponding to the two color strips in the third binarized image, a reference line for each color strip can be obtained first, and then the fitting line can be obtained based on the reference line. Specifically, the reference line that intersects the front end of the charging station when the two color strips extend is selected, and the fitting line is obtained based on the aforementioned reference line. When setting up color strips on the charging station, taking a strip shape as an example, the long side of the strip will be parallel to the side of the charging station surface, and the short side will be parallel to the sides where the charging station's two ends are located. The long side of the strip, as reflected in the third binarized image, is the reference line where the extended color strip intersects with the front end of the charging station. This can also be understood as a reference line roughly in the same direction as the docking direction with the lawnmower robot. Each color strip can obtain two reference lines. Based on the reference lines of each color strip, a fitting line is obtained. Extending the fitting line to the upper or lower boundary line in the third binarized image yields the intersection point located on the same boundary line. It is important to note that the intersection point must be on the same boundary line. If the intersection points of the color strips are distributed on different boundary lines, it is difficult to determine the center reference line.
[0086] In some embodiments, obtaining the fitting lines corresponding to the two color bands in the third binarized image may include: performing linear fitting on each color band in the third binarized image to obtain a fitting line corresponding to each color band. Each color band will obtain two reference lines as described above. Either reference line can be selected as the fitting line for each color band, or either of the two reference lines can be selected as the fitting line; this embodiment does not limit this selection. The two color bands correspond to two fitting lines. The fitting lines are extended to intersect the upper and lower boundary lines in the third binarized image, obtaining two intersection points. A center reference line is determined based on these two intersection points. In one possible implementation, the center reference line passes through the midpoint of the two intersection points, and the slope of the center reference line is the average of the slopes of the two fitting lines. The linear fitting in this embodiment may employ the HoughLinesP function.
[0087] See Figure 12 , Figure 12 This is an edge image provided in an embodiment of this application.
[0088] Typically, the images of charging stations captured by the vision module are color images. Processing color images is computationally complex, and color can interfere with texture extraction, resulting in unclear texture images. To improve these issues, in some embodiments, step S102, where texture extraction is performed on the charging station image to obtain a texture image, may include: performing grayscale processing on the charging station image to generate a grayscale image; performing edge calculation on the grayscale image to obtain edge information; and using the edge information to perform morphological closure calculation on the grayscale image to achieve texture extraction, thereby obtaining the texture image.
[0089] Edge computing is used to identify the boundaries between objects in an image. In this embodiment, the edge computing algorithm may include, for example, Sobel, Canny, and Prewitt algorithms.
[0090] In the above embodiments, performing grayscale processing on the charging station image first simplifies the image processing process because grayscale images only contain brightness information and do not consider color. Furthermore, grayscale images can better highlight texture features in the image because texture is often related to brightness variations. Edge calculation of the grayscale image can obtain the edge information of the charging station, such as... Figure 12As shown, this method better distinguishes the edge information of the charging station from the noise information of the surrounding lawn, providing a good image foundation for subsequent morphological closing calculations using edge information. Using edge information to perform morphological closing calculations on grayscale images can remove small noise and discontinuous regions, resulting in smoother and clearer texture images. It also helps connect adjacent texture regions, making the texture features in the texture image more continuous and complete, thus improving the accuracy of texture extraction.
[0091] This application also provides a lawnmower robot, including a control module, which is used to execute any of the above methods.
[0092] In some embodiments, the lawnmower robot may also include a vision module for acquiring images of charging stations containing visual identifiers.
[0093] It should be noted that although some embodiments of this application use a lawnmower robot as an example, this application can be applied to other self-moving devices, and this application does not set any limitations on them.
[0094] The user information or user account information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, etc.) involved in various embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data shall comply with the relevant laws and regulations and standards of the relevant countries and regions, and corresponding instruction entry points shall be provided for the user to choose to authorize or refuse.
[0095] It is understood that the specific examples in this specification are only intended to help those skilled in the art better understand the implementation of this application, and are not intended to limit the scope of protection of this application.
[0096] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0097] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and this application does not limit them.
[0098] Unless otherwise stated, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0099] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.
[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the embodiments described above can be referred to the corresponding processes in other embodiments, and will not be repeated here.
[0101] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the technical solution in this application, depending on actual needs.
[0103] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0104] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0105] The above are merely specific embodiments described in this specification, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for controlling a lawnmower robot to return to a charging station, characterized in that, The method includes: The charging station is photographed using a vision module to obtain an image of the charging station that includes the visual identifier of the charging station; The charging station image is subjected to color feature-based binarization processing to obtain a first binarized image, and the charging station image is subjected to texture extraction to obtain a texture image; Logical operations are performed on the first binarized image and the texture image to obtain a second binarized image containing the visual identifier; Based on the visual identifiers in the second binarized image, a center reference line for the charging station is determined so that the lawnmower robot can move to the charging station along the center reference line.
2. The method for controlling a lawnmower robot to return to a charging station according to claim 1, characterized in that, The color features are represented by chroma, saturation, and brightness. The step of performing color feature-based binarization processing on the charging station image to obtain a first binarized image includes: The charging station image is converted to HSV to obtain the chroma, saturation, and brightness of all pixels in the charging station image; Based on the specified numerical ranges of chroma, saturation, and brightness, the pixel values of pixels in the charging station image whose chroma, saturation, and brightness are all within the corresponding specified numerical ranges are set to 1, and the pixel values of pixels in the charging station image whose chroma, saturation, and brightness are at least outside the corresponding specified numerical ranges are set to 0, so as to generate the first binarized image.
3. The method for controlling a lawnmower robot to return to a charging station according to claim 2, characterized in that, The specified numerical ranges for chroma are 0–32 and 172–180, the specified numerical ranges for saturation are 73–255, and the specified numerical ranges for lightness are 80–255.
4. The method for controlling a lawnmower robot to return to a charging station according to claim 1, characterized in that, The step of performing logical operations based on the first binarized image and the texture image to obtain a second binarized image containing the visual identifier includes: A bitwise AND operation is performed on the portion of the first binarized image where the pixel value is 1 and the pixel value of the texture image is 0 to obtain the second binarized image.
5. The method for controlling a lawnmower robot to return to a charging station according to claim 1, characterized in that, Determining the center reference line of the charging station based on the visual identifiers in the second binarized image includes: Obtain the third binarized image corresponding to the second binarized image, wherein the third binarized image contains only the visual identifier and the background; The center reference line of the charging station is determined based on the visual identifiers in the third binarized image.
6. The method for controlling a lawnmower robot to return to a charging station according to claim 5, characterized in that, The step of obtaining the third binarized image corresponding to the second binarized image includes: The second binarized image is filtered to obtain a filtered image; In the filtered image, two strip regions that meet specified size and / or specified shape conditions are identified as visual identifier regions; Remove the portion outside the visual identifier region from the filtered image, and use the remaining portion as a third binarized image.
7. The method for controlling a lawnmower robot to return to a charging station according to claim 5, characterized in that, The visual identifier includes two color bands. Determining the center reference line of the charging station based on the visual identifier in the third binarized image includes: Obtain the fitted lines corresponding to the two color bands in the third binarized image; Extend the fitted line to the upper or lower boundary line of the third binarized image to obtain the intersection point located on the same boundary line; Based on the intersection point, the center reference line of the charging station is determined.
8. The method for controlling a lawnmower robot to return to a charging station according to claim 7, characterized in that, The step of obtaining the fitted lines corresponding to the two color bands in the third binarized image includes: Each color band in the third binarized image is fitted with a straight line to obtain a fitted line corresponding to each color band.
9. The method for controlling a lawnmower robot to return to a charging station according to claim 1, characterized in that, The step of extracting texture from the charging station image to obtain a texture image includes: The charging station image is processed to generate a grayscale image; Edge calculation is performed on the grayscale image to obtain edge information; The edge information is used to perform morphological closure calculation on the grayscale image to achieve texture extraction, thereby obtaining the texture image.
10. A lawnmower robot, the lawnmower robot comprising a control module, characterized in that, The control module is used to execute the method according to any one of claims 1-9.
Citation Information
Patent Citations
Robot automatic recharging method and device, storage medium and robot system
CN113696180A
Method and system for recognizing working position based on image, robot and storage medium
CN113822095A
Unstructured road travelable area identification method, electronic equipment and medium
CN114022856A
Robot automatic charging method and system, robot and storage medium
CN114489034A
Charging pile for mower
CN116191614A