Method for controlling mowing robot to return to charging station and mowing robot
By using morphological closing operations to merge visually identifiable regions in charging station images and determining the center reference line, the problem of lawnmowers having difficulty recognizing charging stations in outdoor environments is solved, thus improving the success rate of returning to charging stations.
Patent Information
- Application Number
- CN202410544702.X
- 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
Lawn-mowing robots have difficulty accurately recognizing the visual markers of charging stations in outdoor environments, resulting in a low success rate of returning to charging stations, especially when they are obscured by grass clippings or fallen leaves.
By acquiring multiple discrete visual identifier regions in the charging station image, morphological closing operations are used to merge these regions to generate continuous visual identifier regions. Based on these regions, the center reference line of the charging station is determined, enabling the lawnmower robot to return to the charging station along this reference line.
Even when visual markers are obscured by grass clippings or fallen leaves, the lawnmower can effectively identify charging stations, increasing the success rate of returning to charging stations.
Smart Images

Figure CN120871831A_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] Currently, lawnmower robots on the market typically need to autonomously return to a pre-designated charging station to recharge after completing their assigned tasks. Existing technologies primarily rely on GPS positioning and wireless signal strength indicators to return to the charging station. However, these methods are susceptible to environmental interference, leading to inaccurate positioning and making it difficult for the lawnmower robot to accurately identify and quickly navigate to the charging station.
[0003] To address these issues, visual markers are typically installed at charging stations, enabling lawnmowers to recognize them and return to the station. However, lawnmowers often work outdoors for extended periods. When these markers are obscured by grass clippings or fallen leaves, the lawnmowers struggle to identify them, making it difficult to return to the charging station and impacting their 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 effectively identify the visual signs of the charging station and 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] Multiple discrete visual signage regions corresponding to a charging station image are acquired. The charging station image is obtained by a vision module capturing a charging station, and the charging station is equipped with visual signs.
[0009] Multiple discrete visual label regions are merged using morphological closing operations to obtain a label image containing continuous visual label regions;
[0010] Based on the continuous visual marker regions in the marker 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.
[0011] In some embodiments, acquiring multiple discrete visual identifier regions corresponding to the charging station image includes:
[0012] Obtain the corresponding binarized image of the charging station;
[0013] The noise portion in the binarized image is removed by morphological opening operations to obtain the plurality of discrete visual identifier regions.
[0014] In some embodiments, the size of the structuring element corresponding to the morphological closing operation is used as the first size, and the size of the structuring element corresponding to the morphological opening operation is used as the second size, wherein the first size is larger than the second size.
[0015] In some embodiments, obtaining the binarized image corresponding to the charging station image includes:
[0016] Using a visual recognition algorithm, a rectangular region containing the charging station is determined from the image of the charging station;
[0017] The rectangular region in the charging station image is binarized with pixel values of 0 or 1. The pixel values of the remaining part of the charging station image after removing the rectangular region are set to 0 to obtain the binarized image.
[0018] In some embodiments, the binarization of the rectangular region in the charging station image by pixel values of 0 or 1 includes:
[0019] The corresponding region image of the rectangular region is converted to HSV to obtain the chroma, saturation and brightness of all pixels in the region image;
[0020] Based on the specified numerical ranges of chroma, saturation, and brightness, the pixel values of pixels in the region 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 region image whose chroma, saturation, and brightness are at least outside the corresponding specified numerical ranges are set to 0, so as to achieve binarization processing.
[0021] In some embodiments, the continuous visual identifier region includes two bar identifiers, and determining the center reference line of the charging station based on the continuous visual identifier region in the identifier image includes:
[0022] Obtain the fitted lines corresponding to the two bar icons in the icon image;
[0023] Extend the two fitted lines to the upper or lower boundary line of the labeled image to obtain two intersection points located on the same boundary line;
[0024] The center reference line of the charging station is determined based on the two intersection points.
[0025] In some embodiments, obtaining the fitted line corresponding to the two bar icons in the icon image includes:
[0026] Extract the outline containing multiple sides corresponding to each bar icon in the icon image;
[0027] For each bar icon, the longest side of the outline corresponding to the bar icon is used as a reference side, and a straight line is fitted to the reference side to obtain the fitted line.
[0028] In some embodiments, the HoughLinesP function is used to perform a straight line fit on the reference edge.
[0029] In some embodiments, 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 fitted lines.
[0030] Secondly, this application provides a lawnmower robot, including a control module for performing any of the methods described above.
[0031] This application provides a method for controlling a lawnmower robot to return to a charging station, and the lawnmower robot itself. Multiple discrete visual marker regions are obtained from an image of the charging station. These discrete visual marker regions are then merged using morphological closing operations to obtain a marker image containing continuous visual marker regions. The number of continuous visual marker regions is the same as the number of visual markers on the charging station, and the size characteristics of the continuous visual marker regions are approximately the same as those of the visual markers on the charging station. Then, a center reference line for the charging station is determined based on the continuous visual marker regions, enabling the lawnmower robot to move along the center reference line to the charging station. Even when the visual markers on the charging station are obscured by dirt such as grass clippings or fallen leaves, this application enables the lawnmower robot to effectively recognize the visual markers at the charging station, improving the success rate of the lawnmower robot returning to the charging station. Attached Figure Description
[0032] This application will be further described below with reference to the accompanying drawings and specific embodiments.
[0033] 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.
[0034] Figure 2 This is a schematic diagram of a process for obtaining multiple discrete visual identifier regions corresponding to a charging station, provided in an embodiment of this application.
[0035] Figure 3 This is a schematic diagram of a process for obtaining a binarized image corresponding to a charging station image, provided in an embodiment of this application.
[0036] Figure 4 This is an image of a charging station provided in an embodiment of this application.
[0037] Figure 5 This is a binarized image provided in an embodiment of this application.
[0038] Figure 6 This is a filtered image provided in an embodiment of this application.
[0039] Figure 7 This is an identification image provided in an embodiment of this application.
[0040] Figure 8 This is a fitted image provided in an embodiment of this application.
[0041] In the image: 100, charging station; 200, visual signage. Detailed Implementation
[0042] 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.
[0043] 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.
[0044] In modern landscaping maintenance and management, lawnmower robots are widely used in the daily maintenance of parks, residential areas, and other green spaces. Currently available lawnmower robots, after completing their designated lawn mowing tasks, face the need to autonomously return to pre-designated charging stations for energy replenishment. However, during the return process, the lawnmower robot may have difficulty recognizing the docking point within the charging station, causing it to fail to return. The docking point can be the location of the charging connector on the charging station. To improve this issue, visual markers are typically placed on the charging station so that the robot can identify them and successfully return. However, considering that lawnmower robots operate for extended periods in complex outdoor environments, these visual markers can be covered by grass clippings or fallen leaves, causing the corresponding visual marker areas to appear discrete in the charging station image. This increases the difficulty for the robot to recognize the visual markers and reduces the success rate of the lawnmower robot's autonomous return to the charging station.
[0045] See Figure 1 , 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.
[0046] To improve the relevant technology so that the lawnmower robot can successfully return to the charging station, such as... Figure 1 As shown in the figure, this application provides a method for controlling a lawnmower robot to return to a charging station, which may include steps S101 to S103.
[0047] Step S101: Obtain multiple discrete visual signage regions corresponding to the charging station image. The charging station image is obtained by the vision module taking a picture of the charging station, and the charging station is equipped with visual signs.
[0048] Step S102: Merge multiple discrete visual label regions using morphological closing operations to obtain a label image containing continuous visual label regions.
[0049] Step S103: Based on the continuous visual marker areas in the marker image, determine the center reference line of the charging station so that the lawnmower robot can move to the charging station along the center reference line.
[0050] The visual signage on the charging station can be color bands, shape markers, stripes, pattern markers, reflective markers, etc. Multiple discrete visual signage regions are obtained by processing visual signage separated by grass clippings or fallen leaves in the charging station image. Morphological closing operations traverse the image using structuring elements, first dilating and then eroding, making the foreground objects in the image more complete and continuous, while removing or reducing small internal defects and minor external interference. A continuous visual signage region refers to a continuous and complete visual signage region obtained by merging multiple discrete visual signage regions through morphological closing operations. 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.
[0051] In the above embodiment, firstly, the lawnmower robot acquires an image of the charging station through its vision module. This image contains multiple discrete visual marker regions corresponding to the visual markers on the charging station. Next, morphological closing operations are performed on the charging station image to merge the multiple discrete visual marker regions, resulting in a marker image containing complete, continuous marker regions. Finally, based on the marker image, a center reference line for the charging station is determined, allowing the lawnmower robot to return to the charging station along this line, thus improving the success rate of the lawnmower robot's return to the charging station.
[0052] The above embodiments acquire multiple discrete visual marker regions corresponding to the charging station image, and merge these regions using morphological closing operations to obtain continuous visual marker regions. This allows the lawnmower robot to determine the center reference line of the charging station based on the continuous marker regions and return to the charging station along the center reference line. These embodiments enable the lawnmower robot to effectively identify the visual markers of the charging station in various environments. Even when the visual markers on the charging station are obscured by grass clippings and fallen leaves, the lawnmower robot can still return to the charging station based on the visual markers, improving the success rate of the lawnmower robot's return to the charging station.
[0053] See Figure 2 , Figure 2 This is a schematic diagram of a process for obtaining multiple discrete visual identifier regions corresponding to a charging station, provided in an embodiment of this application.
[0054] Images of charging stations captured by vision modules are typically in color, making it complex to directly process partially occluded visual signs in these images to obtain continuous visual sign regions. To address this issue, such as... Figure 2 As shown, in some embodiments, obtaining multiple discrete visual identifier regions corresponding to the charging station image in step S101 may include steps S201 to S202.
[0055] Step S201: Obtain the corresponding binarized image of the charging station image.
[0056] Step S202: Use morphological opening operation to remove noise from the binarized image to obtain multiple discrete visual identifier regions.
[0057] A binarized image is an image where each pixel has a value of 0 or 1, typically represented as a black and white image. Morphological opening operations eliminate small-scale noise and isolated pixels within the binarized image by traversing the structuring element, while preserving the large-scale structure of the image.
[0058] In the above embodiments, a binarized image of the charging station is first obtained. This is because when the charging station image is captured using the vision module, it contains not only information about the charging station itself but also information about the surrounding lawn. This results in the binarized image also containing lawn information, which interferes with the multiple discrete visual identifier regions in the binarized image. Next, a morphological opening operation is performed on the binarized image to remove small-scale noise and isolated pixels (i.e., lawn information) while maintaining the integrity of larger continuous regions (i.e., multiple discrete visual identifier regions). Finally, the image obtained after the morphological opening operation contains only information about multiple discrete visual identifier regions. It should be noted that the morphological opening operation in the above embodiments primarily serves to remove noise from the binarized image. Other processing methods can also be used to remove noise from the binarized image, such as linear filtering, nonlinear filtering, wavelet denoising, etc. The above embodiments do not limit this approach.
[0059] The above embodiments utilize charging station images to obtain binarized images, which simplifies the image content, highlights the features of the charging station more effectively, and reduces the complexity of subsequent processing. Morphological opening operations are used to remove noise from the binarized image, reducing interference from the surrounding environment (lawns, dirt, etc.) on multiple discrete visual identifier regions in the binarized image.
[0060] In some embodiments, for example, the size of the structuring element corresponding to the morphological closing operation is used as the first size, and for example, the size of the structuring element corresponding to the morphological opening operation is used as the second size, and the first size can be larger than the second size.
[0061] The size of a structuring element is typically represented by width × height or diameter. The choice of structuring element size directly affects the effect of morphological operations, such as the intensity of noise removal, the smoothness of object boundaries, and whether small objects are preserved. In the above embodiments, the sizes of the structuring elements for morphological opening and closing operations can be determined according to the characteristics of the respective images to be processed.
[0062] In the above embodiments, a binarized image can be obtained first using the charging station image, then a morphological opening operation can be performed on the binarized image to obtain multiple discrete visual identifier regions, and then a morphological closing operation can be performed on the multiple discrete visual identifier regions to obtain continuous visual identifier regions. The size of the structuring element corresponding to the morphological closing operation is larger than the size of the structuring element corresponding to the morphological opening operation; that is, the first size is larger than the second size. Using a smaller second size allows for more precise removal of small-scale noise (environmental interference factors) in the binarized image. Using a larger first size can more effectively fill larger holes (i.e., blank areas between adjacent discrete visual identifier regions) and allows for greater smoothing of the edges of the discrete visual identifier regions. As an example, the first size can be 9×9, and the second size can be 7×7.
[0063] See Figure 3 , Figure 3 This is a schematic diagram of a process for obtaining a binarized image corresponding to a charging station image, provided in an embodiment of this application.
[0064] In charging station images, in addition to charging station information and lawn information, there may also be environmental interference information such as obstacles or other debris. If the entire charging station image is binarized, it will increase the processing complexity. To improve the above problem, in some embodiments, obtaining the corresponding binarized image of the charging station image (i.e., step S201) may include steps S301 to S302.
[0065] Step S301: Use a visual recognition algorithm to determine the rectangular area containing the charging station from the charging station image.
[0066] Step S302: Binarize the rectangular region in the charging station image with pixel values of 0 or 1, and set the pixel values of the remaining part of the charging station image after removing the rectangular region to 0 to obtain a binarized image.
[0067] Visual recognition algorithms are algorithms used to extract information from images and make decisions. They are used to identify features in images to be processed and can employ computer vision techniques, such as AI deep learning, feature extraction, and pattern matching.
[0068] In the above embodiment, a rectangular region containing the charging station is determined from the charging station image. This rectangular region is then binarized, and the pixel values of the remaining parts of the charging station image outside the rectangular region are all set to 0, i.e., displayed as black. These remaining parts are not processed further in subsequent image processing. As an example, feature extraction can be performed on the charging station image first to extract feature information related to the charging station. Then, through methods such as deep learning or pattern matching, the rectangular region containing the charging station can be determined. This rectangular region is then subjected to targeted binarization, and the remaining parts are used as the background.
[0069] The above embodiment utilizes a visual recognition algorithm to accurately determine the position and boundary of the charging station in the charging station image, providing a rectangular region for targeted processing in subsequent processing. Then, the rectangular region and the remaining part in the charging station image are processed separately to obtain a binarized image. In the binarized image, all pixels in the corresponding remaining part have a pixel value of 0, serving as a black background. In subsequent processing, only the corresponding rectangular region is processed, and the black background is no longer processed, thereby reducing the number of processing steps and lowering the complexity of the processing.
[0070] The rectangular region in the charging station image includes charging station information and information about the lawn surrounding the charging station. In order to perform appropriate binarization processing on the rectangular region, in some embodiments, in step S302, the rectangular region in the charging station image is binarized with pixel values of 0 or 1. This may include: performing HSV conversion on the corresponding region image of the rectangular region to obtain the chroma, saturation, and brightness of all pixels in the region image; according to the specified numerical range of chroma, saturation, and brightness, setting the pixel value of pixels in the region image whose chroma, saturation, and brightness are all within the corresponding specified numerical range to 1, and setting the pixel value of pixels in the region image whose chroma, saturation, and brightness are at least outside the corresponding specified numerical range to 0, so as to achieve binarization processing.
[0071] 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, the corresponding region image of a rectangular area may be in RGB format, and the region image can be converted to HSV for easier subsequent processing.
[0072] In the above embodiments, the corresponding region image of the rectangular area is converted to HSV to obtain the chroma, saturation, and brightness of all pixels in the region image. HSV conversion separates the color and brightness information of the visual identifiers in the region 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. Based on the color characteristic information of the visual identifiers, a specified range of values for chroma, saturation, and brightness can be determined. Pixels in the region image within the specified range are assigned a value of 1, meaning the corresponding part is displayed as white in the binarized image; pixels outside the specified range are assigned a value of 0, meaning the corresponding part is displayed as black in the binarized image.
[0073] To effectively identify visual markers and improve the success rate of the lawnmower robot returning to the charging station, bar markers are used as an example. The number of bar markers can be one or more. One bar marker can be placed in the middle of the charging station, while multiple bar markers can be distributed along the edges. In some embodiments, two bar markers are used as an example, distributed on both sides of the charging station. Correspondingly, the continuous visual marker area also includes two bar markers. In step S103, determining the center reference line of the charging station based on the continuous visual marker area in the marker image can include: obtaining the fitted lines corresponding to the two bar markers in the marker image; extending the two fitted lines to the upper or lower boundary line of the marker image to obtain two intersection points located on the same boundary line; and determining the center reference line of the charging station based on the two intersection points.
[0074] In the above embodiments, fitted lines corresponding to two bar icons in the identification image are obtained. Each bar icon has only one fitted line. The two fitted lines corresponding to the two bar icons are extended to the upper or lower boundary line of the identification image to obtain an 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 bar icons are distributed on different boundary lines, it is difficult to determine the center reference line. In some embodiments, the center reference line can pass through the midpoint of the two intersection points, and the slope of the center reference line is, for example, the average slope of the two fitted lines. During the lawnmower robot's return to the charging station, walking along the center reference line ensures that the lawnmower robot is always roughly facing the charging station, improving the success rate of the lawnmower robot's return to the charging station.
[0075] In some embodiments, obtaining the fitting line corresponding to two bar icons in the icon image may include: extracting the contour line containing multiple sides corresponding to each bar icon in the icon image; for each bar icon, taking the longest side of the contour line corresponding to the bar icon as the reference side, and performing straight line fitting on the reference side to obtain the fitting line.
[0076] In the above embodiments, before obtaining the fitted line for each bar marker, a reference edge for each bar marker can be obtained first. Specifically, the contour line containing multiple edges corresponding to each bar marker in the marker image is extracted, and then for each bar marker, the longest edge of the contour line corresponding to the bar marker is used as the reference edge. When setting up bar markers on a charging station, such as... Figure 4As shown, the long side of the bar marker can be set parallel to the sides of the charging station, and the short side can be set parallel to the ends of the charging station, so that the outline of the long side of the bar marker in the marker image can intersect the front end of the charging station when extended. Using the longest side of the outline as the reference side to obtain the fitted line can increase the accuracy of the fitted line. In some embodiments, the least squares method, RANSAC algorithm, HoughLinesP function, etc. can be used to perform straight line fitting on the reference side. Among them, the HoughLinesP function can identify the reference side of the bar marker in the marker image more quickly and accurately, and has relatively high processing efficiency.
[0077] The above embodiments will be illustrated below with examples, in which the charging station is provided with two bar-shaped visual signs.
[0078] See Figures 4 to 8 As shown, Figure 4 This is an image of a charging station provided in an embodiment of this application. Figure 5 This is a binarized image provided in an embodiment of this application. Figure 6 This is a filtered image provided in an embodiment of this application. Figure 7 This is an identification image provided in an embodiment of this application. Figure 8 This is a fitted image provided in an embodiment of this application. Figures 4 to 6 The visual identifier 200 is displayed as multiple discrete visual identifier areas. Figure 7 and Figure 8 The visual identifier 200 is displayed as a continuous visual identifier area.
[0079] First, the charging station is photographed using a vision module to obtain an image of the charging station (e.g., ...). Figure 4 As shown in the image, due to the occlusion of visual markers by grass clippings or fallen leaves in the outdoor working environment, the corresponding visual markers in the charging station image appear as multiple discrete visual marker regions. Using a visual recognition algorithm, the rectangular region containing the charging station (e.g., ...) is determined from the charging station image. Figure 4 The portion within the blue box is shown in the image. Using the portion within the blue box as the rectangular region and the portion outside the blue box as the remaining portion, the pixel values of the remaining portion are set to 0. Simultaneously, the portion within the rectangular region is binarized to obtain a binarized image (e.g., ...). Figure 5As shown in the image. In the binarized image, it can be seen that the area outside the blue box corresponding to the charging station image is displayed as black, while the area inside the blue box is displayed as either black or white. In subsequent image processing, the area outside the blue box is not processed and is always displayed as black. The binarized image also shows interference from grass information around the corresponding discrete visual marker areas (corresponding to the visual markers of the charging station). To reduce noise, a morphological opening operation is performed on the binarized image to obtain a filtered image (such as...). Figure 6 As shown in the figure, the filtered image contains only information about the corresponding discrete visual marker regions. Further morphological closing operations are performed on the filtered image to merge the discrete visual marker regions, resulting in a marker image containing continuous visual marker regions (e.g., ...). Figure 7 As shown). Figure 8 As shown, based on the continuous visual marker regions in the marker image, the contour lines of the continuous visual marker regions are identified, and the longest side of the contour line (in) is selected. Figure 8 In this process, straight lines can be fitted to the two edges closest to the two sides of the image to obtain fitted lines. Each visual identifier corresponds to one fitted line, and in this example, two fitted lines will be obtained. The two fitted lines are extended to the lower boundary line of the identifier image to obtain two intersection points, and then the center reference line is determined based on the two intersection points.
[0080] This application also provides a lawnmower robot, including a control module, which is used to execute any of the above methods.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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: Multiple discrete visual signage regions corresponding to a charging station image are acquired. The charging station image is obtained by a vision module capturing a charging station, and the charging station is equipped with visual signs. Multiple discrete visual label regions are merged using morphological closing operations to obtain a label image containing continuous visual label regions; Based on the continuous visual marker regions in the marker 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 acquisition of multiple discrete visual identifier regions corresponding to the charging station image includes: Obtain the corresponding binarized image of the charging station; The noise portion in the binarized image is removed by morphological opening operations to obtain the plurality of discrete visual identifier regions.
3. The method for controlling a lawnmower robot to return to a charging station according to claim 2, characterized in that, The size of the structuring element corresponding to the morphological closing operation is taken as the first size, and the size of the structuring element corresponding to the morphological opening operation is taken as the second size, wherein the first size is larger than the second size.
4. The method for controlling a lawnmower robot to return to a charging station according to claim 2, characterized in that, The acquisition of the corresponding binarized image of the charging station image includes: Using a visual recognition algorithm, a rectangular region containing the charging station is determined from the image of the charging station; The rectangular region in the charging station image is binarized with pixel values of 0 or 1. The pixel values of the remaining part of the charging station image after removing the rectangular region are set to 0 to obtain the binarized image.
5. The method for controlling a lawnmower robot to return to a charging station according to claim 4, characterized in that, The step of binarizing the rectangular region in the charging station image with pixel values of 0 or 1 includes: The corresponding region image of the rectangular region is converted to HSV to obtain the chroma, saturation and brightness of all pixels in the region image; Based on the specified numerical ranges of chroma, saturation, and brightness, the pixel values of pixels in the region 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 region image whose chroma, saturation, and brightness are at least outside the corresponding specified numerical ranges are set to 0, so as to achieve binarization processing.
6. The method for controlling a lawnmower robot to return to a charging station according to claim 1, characterized in that, The continuous visual identifier region includes two bar identifiers. Determining the center reference line of the charging station based on the continuous visual identifier region in the identifier image includes: Obtain the fitted lines corresponding to the two bar icons in the icon image; Extend the two fitted lines to the upper or lower boundary line of the labeled image to obtain two intersection points located on the same boundary line; The center reference line of the charging station is determined based on the two intersection points.
7. The method for controlling a lawnmower robot to return to a charging station according to claim 6, characterized in that, The step of obtaining the fitted line corresponding to the two bar icons in the icon image includes: Extract the outline containing multiple sides corresponding to each bar icon in the icon image; For each bar icon, the longest side of the outline corresponding to the bar icon is used as a reference side, and a straight line is fitted to the reference side to obtain the fitted line.
8. The method for controlling a lawnmower robot to return to a charging station according to claim 7, characterized in that, The HoughLinesP function is used to fit a straight line to the reference edge.
9. The method for controlling a lawnmower robot to return to a charging station according to claim 6, characterized in that, The central reference line passes through the midpoint of the two intersection points, and the slope of the central reference line is the average of the slopes of the two fitted lines.
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
Multisource perception positioning system suitable for smart networked car
CN109405824A
Line structured light center line extraction method and storage medium
CN110866924A
Robot autonomous charging method and system based on machine vision
CN114895675A
Charging pile, charging pile system, pile returning method and device and mowing robot
CN116331025A