A method, system, device and storage medium for adjusting lighting of a lawn mower

By installing a camera and lighting array at the bottom of the weeder to adjust the lighting brightness in real time, the problem of large weed identification errors in automated mechanical weeding technology is solved, and weeding efficiency and accuracy are improved, especially under harsh light conditions.

CN118510099BActive Publication Date: 2024-09-27QILU ZHONGKE INST OF OPTICAL PHYSICS & ENG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410979802.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-09-27
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

In the existing automated mechanical weeding technology, weed identification errors are large. Especially in shadows, cloudy days, rainy days and poor light at night, weeds between rows are difficult to identify, resulting in low weeding efficiency.

Method used

Install a camera and a symmetrically distributed lighting array at the bottom of the weeder, identify the number and area of ​​crop rows by obtaining images of the working area, calculate the brightness of the lighting array lamp beads, and adjust the lighting brightness of each lamp bead in real time while the weeder is moving. to provide sufficient brightness and automatically adjust lighting intensity.

Benefits of technology

It improves the identification rate and weeding efficiency of weeds between rows, especially in harsh light environments, enhances the accuracy and efficiency of weed identification, and saves energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118510099B
    Figure CN118510099B
Patent Text Reader

Abstract

The present invention discloses a method, system, device and storage medium for adjusting the lighting of a weeder, which is applied to a lighting adjustment device installed at the bottom of the weeder, wherein the lighting adjustment device comprises a camera and lighting arrays symmetrically distributed on both sides of the camera, and the method comprises: obtaining an image of a working area through the camera, and identifying the number of crop rows and the area where the crop rows are located in the image of the working area; calculating the world coordinates of the area where the crop rows are located; determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array; and adjusting the lighting brightness of each lamp bead in real time during the movement of the weeder. The lighting arrays are arranged on both sides of the camera to provide sufficient brightness, and the brightness of the lighting arrays is automatically adjusted according to the number of crop rows and the results of area recognition. The lighting intensity is adjusted in real time according to the movement of the weeder and the changes in the crop rows, which is conducive to the identification of weeds between rows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of weeding, and in particular to a lighting adjustment method, system, equipment and storage medium for a weeder. Background Art

[0002] Currently, the main methods of weeding are manual weeding, chemical weeding and mechanical weeding. Manual weeding is inefficient, and the use of pesticides in chemical weeding is harmful and pollutes the environment.

[0003] In the currently widely developed automated mechanical weeding and laser weeding technologies, the weed recognition process is often subject to the following limitations: (1) The camera obtains real-time images, but there are shadows around the weeds, causing recognition errors; (2) The operation of weeding equipment is often accompanied by cloudy and rainy weather and poor lighting conditions at night, which reduces the weed recognition rate; (3) Weeds between rows are more easily overlooked, making them more difficult to identify. Summary of the invention

[0004] The main purpose of the present invention is to provide a method, system, device and storage medium for adjusting the lighting of a weeder, wherein lighting arrays are arranged on both sides of a camera to provide sufficient brightness, and the brightness of the lighting arrays is automatically adjusted according to the number of crop rows and the result of area recognition. The lighting intensity is adjusted in real time according to the movement of the weeder and the change of the crop rows, which is conducive to the identification of weeds between rows.

[0005] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:

[0006] According to a first aspect of an embodiment of the present application, a method for adjusting lighting of a lawn mower is provided, which is applied to a lighting adjustment device installed at the bottom of the lawn mower, wherein the lighting adjustment device includes a camera and lighting arrays symmetrically distributed on both sides of the camera, and the method includes:

[0007] Acquire an image of the working area through the camera, and identify the number of crop rows and the area where the crop rows are located in the image of the working area;

[0008] Calculating the world coordinates of the region where the crop row is located;

[0009] Determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array;

[0010] The lighting brightness of each lamp bead is adjusted in real time while the lawn mower is moving.

[0011] Optionally, identifying the number of crop rows and the area where the crop rows are located in the working area image includes:

[0012] Performing grayscale processing and enhancement processing on the working area image;

[0013] Dividing the working area image into regions to obtain a plurality of sub-regions;

[0014] Identify crop feature points in each sub-region;

[0015] The number of crop rows and the area where the crop rows are located are determined according to the crop feature points.

[0016] Optionally, identifying the crop feature points of each sub-region includes:

[0017] For each sub-region n , n= 1,2,…, N The cumulative sum of the pixel values ​​in each column is expressed as ; Among them, the working area image is divided into There are equal-sized sub-regions, each of which contains ;

[0018] like , determine whether there is a crop row area within the range, and store the feature point in the feature point set P n .

[0019] Optionally, determining the number of crop rows and the area where the crop rows are located according to the crop feature points includes:

[0020] The feature point collection P n middle y Axis coordinates in ascending order x The axis coordinates are arranged in ascending order. y Under the condition of the same coordinates, when adjacent x Difference of axis coordinates When , it is determined that a new crop row boundary is identified and the number of crop rows is determined to be C , the difference area is determined as the crop row spacing;

[0021] use N The characteristic points of the same crop row boundary in the region determine the maximum value of the crop row spacing, and the left and right maximum values ​​of the region where the single crop row is located are fitted with two straight lines respectively, and a total of 2 straight lines are fitted. C Boundary straight lines, composed C Image areas that require interline lighting , is the area where the crop rows are located.

[0022] Optionally, calculating the world coordinates of the region where the crop row is located includes:

[0023] The boundary coordinates of the area where the crop row is located are calculated according to the following formula Convert to world coordinates :

[0024] Among them, the image x Direction and y The pixel sizes in the directions are and , C Image areas that require interline lighting The area corresponding to the actual crop row in the world coordinate system can be expressed as ;in R is the rotation matrix, r The rotation matrix obtained by camera calibration R The internal parameters of T are the translation vector, T x , T y The translation vector obtained by camera calibration T The internal parameters of

[0025] Optionally, the step of adjusting the lighting brightness of each lamp bead in real time during the movement of the lawn mower comprises:

[0026] The camera is used to obtain an image of the working area in real time during the movement of the lawn mower;

[0027] If the area where the identified crop row is located and the edge area of ​​the environment are smaller than the set threshold, the lamp bead partition is readjusted to change the lighting brightness;

[0028] If the crop row cannot be identified, readjust the lighting brightness of each lamp bead;

[0029] If a new crop row is identified, the step of calculating the world coordinates of the area where the crop row is located is re-executed.

[0030] Optionally, determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array includes:

[0031] Classify the lamp beads according to the radial attenuation rate and coordinate position of each lamp bead in the lighting array to obtain lamp beads in the crop row lighting area and lamp beads in the non-crop row lighting area;

[0032] The illumination brightness of the lamp beads in the crop row illumination area is adjusted to a first preset illumination brightness through PWM;

[0033] The lighting brightness of the lamp beads in the non-crop row lighting area is adjusted to a second preset lighting brightness through PWM.

[0034] According to a second aspect of an embodiment of the present application, a lighting adjustment system for a lawn mower is provided, which is applied to a lighting adjustment device installed at the bottom of the lawn mower, wherein the lighting adjustment device comprises a camera and lighting arrays symmetrically distributed on both sides of the camera, and the system comprises:

[0035] an identification module, used to obtain an image of the working area through the camera, and identify the number of crop rows and the area where the crop rows are located in the image of the working area;

[0036] A coordinate conversion module, used for calculating the world coordinates of the area where the crop row is located;

[0037] A lamp bead area division module, used to determine the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array;

[0038] The brightness adjustment module is used to adjust the lighting brightness of each lamp bead in real time while the lawn mower is moving.

[0039] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0040] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method described in the first aspect above.

[0041] In summary, the embodiments of the present application provide a method, system, device and storage medium for adjusting the lighting of a lawn mower, which are applied to a lighting adjustment device installed at the bottom of the lawn mower, wherein the lighting adjustment device includes a camera and a lighting array symmetrically distributed on both sides of the camera, wherein the camera is used to obtain an image of the working area, and the number of crop rows and the area where the crop rows are located are identified in the image of the working area; the world coordinates of the area where the crop rows are located are calculated; the lamp bead partitioning is completed according to the position of the lamp beads in the lighting array, and the lighting brightness of the lamp beads in each area is determined; and the lighting brightness of each lamp bead is adjusted in real time during the movement of the lawn mower. The lighting arrays are set on both sides of the camera to provide sufficient brightness, and the brightness of the lighting arrays is automatically adjusted according to the number of crop rows and the results of area recognition. The lighting intensity is adjusted in real time according to the movement of the lawn mower and the changes in the crop rows, which is conducive to the identification of weeds between rows. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0043] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0044] Figure 1 A method for adjusting lighting of a lawn mower provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of a lighting adjustment device for a lawn mower provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the lighting adjustment device provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the overall process provided for the embodiments of the present application;

[0048] Figure 5 A block diagram of a lighting adjustment system for a lawn mower provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;

[0050] Figure 7 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present application is shown.

[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0054] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0055] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0056] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0057] The present invention is mainly aimed at weeding between rows, and non-inter-row weeds can be directly removed without the need to identify the weeds and crops.

[0058] The illumination range and lighting brightness in the embodiments of the present application are both identified by an illumination sensor.

[0059] Figure 1 A method for adjusting the lighting of a lawn mower provided in an embodiment of the present application is shown, which is applied to a lighting adjustment device installed at the bottom of the lawn mower, the lighting adjustment device comprising a camera and lighting arrays symmetrically distributed on both sides of the camera, and the method comprises:

[0060] Step 101: acquiring an image of a working area through the camera, and identifying the number of crop rows and the area where the crop rows are located in the image of the working area;

[0061] Step 102: Calculate the world coordinates of the area where the crop row is located;

[0062] Step 103: determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array;

[0063] Step 104: The lighting brightness of each lamp bead is adjusted in real time while the lawn mower is moving.

[0064] In a possible implementation, in step 101, identifying the number of crop rows and the area where the crop rows are located in the working area image includes:

[0065] The working area image is subjected to grayscale processing and enhancement processing; the working area image is divided into regions to obtain a plurality of sub-regions; crop feature points of each sub-region are identified; and the number of crop rows and the region where the crop rows are located are determined according to the crop feature points.

[0066] In a possible implementation manner, identifying the crop feature points of each sub-region includes:

[0067] For each sub-region n , n= 1,2,…, N The cumulative sum of each column of pixel values ​​is expressed as ; Among them, the working area image is divided into There are equal-sized sub-regions, each of which contains ;like , determine whether there is a crop row area within the range, and store the feature point in the feature point set P n .

[0068] In a possible implementation manner, determining the number of crop rows and the region where the crop rows are located according to the crop feature points includes:

[0069] The feature point collection P n middle y Axis coordinates in ascending order x The axis coordinates are arranged in ascending order. y Under the condition of the same coordinates, when adjacent x Difference of axis coordinates When , it is determined that a new crop row boundary is identified and the number of crop rows is determined to be C , the difference area is determined as the crop row spacing; using N The characteristic points of the same crop row boundary in the region determine the maximum value of the crop row spacing, and the left and right maximum values ​​of the region where the single crop row is located are fitted with two straight lines respectively, and a total of 2 straight lines are fitted. C Boundary straight lines, composed C Image areas that require interline lighting , is the area where the crop rows are located.

[0070] In a possible implementation, in step 102, calculating the world coordinates of the region where the crop row is located includes:

[0071] The boundary coordinates of the area where the crop row is located are calculated according to the following formula Convert to world coordinates :

[0072]

[0073]

[0074] Among them, the image x Direction and y The pixel sizes in the directions are and , C Image areas that require interline lighting The area corresponding to the actual crop row in the world coordinate system can be expressed as ;in R is the rotation matrix, r The rotation matrix obtained by camera calibration R The internal parameters of T are the translation vector, T x , T y The translation vector obtained by camera calibration T The internal parameters of

[0075] In a possible implementation, in step 103, determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array includes:

[0076] Lamp beads are classified according to the radial attenuation rate and coordinate position of each lamp bead in the lighting array to obtain lamp beads in the crop row lighting area and lamp beads in the non-crop row lighting area; the lighting brightness of the lamp beads in the crop row lighting area is adjusted to a first preset lighting brightness through PWM; the lighting brightness of the lamp beads in the non-crop row lighting area is adjusted to a second preset lighting brightness through PWM.

[0077] In a possible implementation, in step 104, adjusting the lighting brightness of each lamp bead in real time during the movement of the lawn mower includes:

[0078] The camera is used to obtain images of the working area in real time during the movement of the lawn mower; if the area where the identified crop row is located is smaller than the set threshold value and the edge area of ​​the environment, the lighting brightness of each lamp bead is readjusted; if the crop row cannot be identified, the lighting brightness of each lamp bead is readjusted; if a new crop row is identified, the step of calculating the world coordinates of the area where the crop row is located is re-executed.

[0079] Under the conditions of outdoor lighting environment, changing the lighting is more efficient than image processing. In view of the fact that weeds between crop rows are more difficult to identify during the weeding process, combined with the characteristics that weeds are disordered and crops are ordered, adjusting the brightness values ​​of different lighting sequences is conducive to the identification of weeds between rows and is more energy-efficient.

[0080] Figure 2 and Figure 3 The schematic diagram of the structure of the outdoor intelligent lighting system for laser weeding provided by the embodiment of the present application is shown. The outdoor intelligent lighting system is installed at the bottom of the weeder 1, including a lighting array 2, a camera 3, a shock absorbing component 4 and a lifting component 5. The main control is shared with the laser weeder. Two sets of lighting arrays 2 are placed on both sides of the camera 3, and the lighting area can completely cover the camera field of view.

[0081] Among them, the lighting array is equipped to cooperate with the weeding robot to change the working frequency of the lighting system according to the frequency of the camera collecting environmental information, thereby preventing waste of resources and achieving energy saving.

[0082] It should be noted that the method provided in the embodiment of the present application can change the number and placement of the lighting array according to the working environment of the robot. In order to adapt to more variable situations, the number of light sources can be increased, the placement of the light sources can also be changed, and the arrangement of the array can also be changed. The type of light source used can be variable.

[0083] The following is combined with Figure 4 The brightness adjustment method of the lighting array shown is described in detail.

[0084] Phase 1: Before the light source is adjusted, the camera first acquires a frame of image for crop row detection. During weeding, the robot usually crosses multiple crop rows, so it is necessary to identify the number of crop rows and their respective image areas.

[0085] 1.1 Convert the color image into a grayscale image, reduce the noise through Gaussian filtering, perform threshold segmentation, and complete the image binarization;

[0086] The crop is green, so when converting to a grayscale image, a conversion method with a greater green weight is used:

[0087]

[0088] After reducing the noise through Gaussian filtering, the pixels in the grayscale image are thresholded:

[0089]

[0090] in is the pixel value after Gaussian filtering, is the coordinate in the grayscale image after binarization The pixel value at , T is the cutoff threshold.

[0091]

[0092] is the total number of image pixels, where , , so that the green area of ​​the original image corresponds to white, and the background area of ​​the original image is changed to black, with a pixel value of 0.

[0093] 1.2 Divide the image area and identify feature points

[0094] Divide the image vertically into There are equal-sized image regions, each containing , for each region n , n= 1,2,…, N The cumulative sum of the pixel values ​​in each column is expressed as ,when When there is a crop row area within the range, store the feature point in the collection P n .

[0095] 1.3 Determine the number of crop rows and maximum area

[0096] Point Set P n middle y Axis coordinates in ascending order x The axis coordinates are arranged in ascending order. y Under the condition of the same coordinates, when adjacent x Difference of axis coordinates When , the new crop row boundary is identified and the number of crop rows is determined to be C , the difference area is the crop row spacing.

[0097] 1.4 Fitting crop row boundary lines

[0098] use N The characteristic points of the same crop row boundary in the region determine the maximum value of the crop row spacing, and the left and right maximum values ​​of the region where the single crop row is located are fitted with two straight lines respectively, and a total of 2 straight lines are fitted. C Boundary straight lines, composed C Image areas that require interline lighting .

[0099] The second stage: convert the area where the crop row is located from boundary coordinates to world coordinates.

[0100] The pixel The corresponding world coordinates Make connections:

[0101]

[0102]

[0103] Where R and T are the rotation matrix and translation vector of the camera respectively, ceil means rounding up to an integer, and the image is x Direction and y The pixel sizes in the directions are and .

[0104] The above formula can be expressed as:

[0105] Therefore, the pixel World coordinates to ground The conversion relationship is:

[0106]

[0107] therefore C Image areas that require interline lighting The area corresponding to the actual crop row in the world coordinate system can be expressed as ; R is the rotation matrix, T is the translation vector, where the data r and T x , T y is the value inside the matrix. r is the internal parameter of the camera calibration rotation matrix, and T is the internal parameter of the translation vector obtained by camera calibration.

[0108] The third stage: combining the position and radial attenuation rate of each lamp bead, the LED lamp bead is partitioned according to the area where the crop row is located, and the brightness of the LED lamp bead in the lighting array corresponding to the crop row is adjusted. The lighting brightness of the crop row lighting area is adjusted to the preset high value under the current environment, and the lighting brightness of the non-crop row lighting area is adjusted to the preset low value under the current environment.

[0109] 3.1 Determine the range of lamp beads that have lighting effects on crop rows

[0110] At array height h Under certain conditions, the radial attenuation rate of each LED lamp bead in the array Determines the lighting range of the light source, where is the coordinate point of the light source coordinate corresponding to the world coordinate system. Therefore, for the area where the crop row is located For example, not every lamp bead affects the illumination of the area. The lighting array area that can affect the area is .

[0111] 3.2 Use the illumination sensor outside the robot to identify the illumination under the current natural ambient light conditions, and read the high value of the lighting brightness under the external environment from the preset database and low lighting brightness , adjust the illumination value of the crop row lighting area, including:

[0112] 3.2.1 In order to better control inter-row weeds, the crop row lighting area lamp beads Adjust the lighting brightness to the preset level via PWM .

[0113] 3.2.2 Other lamp beads are also adjusted to the preset fixed value through PWM .

[0114] Phase 4: Real-time detection of crop distribution. When the robot is moving straight, the position of the crop row during image detection remains unchanged. However, it needs to be readjusted in special situations, such as when approaching the edge of the environment, when no crop row is detected, and when a new crop row is detected.

[0115] 4.1 The moving position is predicted normally, and in the newly acquired frame, the y-axis coordinate difference between the crop and the edge area When , the robot is considered to be close to the edge of the field environment, , at this time, return to the third stage, redefine the range of lamp beads that have an impact on the crop rows, and reduce the brightness of some lamp beads;

[0116] 4.2 When no crop row is detected, return to the third stage and reduce the brightness of all lamp beads;

[0117] 4.3 When a new crop row is detected, the process returns to the first stage to complete the crop row detection.

[0118] When the robot is moving straight, the position of the crop row during image detection remains unchanged. However, when the robot turns and detects a new crop row, the crop row judgment must be re-made.

[0119] In summary, the embodiment of the present application provides a method for adjusting the lighting of a lawn mower, which is applied to a lighting adjustment device installed at the bottom of the lawn mower, wherein the lighting adjustment device includes a camera and a lighting array symmetrically distributed on both sides of the camera, wherein the camera is used to obtain an image of the working area, and the number of crop rows and the area where the crop rows are located are identified in the image of the working area; the world coordinates of the area where the crop rows are located are calculated; the lighting brightness of each lamp bead is determined according to the position of the lamp bead in the lighting array; and the lighting brightness of each lamp bead is adjusted in real time during the movement of the lawn mower. Lighting arrays are set on both sides of the camera to provide sufficient brightness, and the brightness of the lighting arrays is automatically adjusted according to the number of crop rows and the results of area recognition. The lighting intensity is adjusted in real time according to the movement of the lawn mower and the changes in the crop rows, which is conducive to the identification of weeds between rows.

[0120] Based on the same technical concept, the embodiment of the present application also provides a lighting adjustment system for a lawn mower, such as Figure 5As shown, the lighting adjustment device is applied to the bottom of the lawn mower, the lighting adjustment device includes a camera and a lighting array symmetrically distributed on both sides of the camera, and the system includes:

[0121] The recognition module 501 is used to obtain an image of the working area through the camera, and recognize the number of crop rows and the area where the crop rows are located in the image of the working area;

[0122] A coordinate conversion module 502, used to calculate the world coordinates of the area where the crop row is located;

[0123] A lamp bead area division module 503, used to determine the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array;

[0124] The brightness adjustment module 504 is used to adjust the lighting brightness of each lamp bead in real time during the running of the lawn mower.

[0125] The present application also provides an electronic device corresponding to the method provided in the above embodiment. Figure 6 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. The electronic device 20 may include: a processor 200, a memory 201, a bus 202 and a communication interface 203, wherein the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and the processor 200 executes the method provided by any of the aforementioned embodiments of the present application when running the computer program.

[0126] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one physical port 203 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0127] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs, and the processor 200 executes the programs after receiving execution instructions. The method disclosed in any implementation of the aforementioned embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.

[0128] The processor 200 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.

[0129] The electronic device provided in the embodiment of the present application and the method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, operated or implemented by them.

[0130] The present application also provides a computer-readable storage medium corresponding to the method provided in the above embodiment. Figure 7 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the method provided in any of the aforementioned embodiments is executed.

[0131] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0132] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0133] It should be noted that:

[0134] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the application is not directed to any specific programming language. It should be understood that the content of the application described herein can be realized using various programming languages, and the description of the specific language above is to disclose the best mode of implementation of the application.

[0135] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0136] Similarly, it should be understood that in order to streamline the present application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.

[0137] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0138] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0139] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the creation device of the virtual machine according to the embodiment of the present application. The present application can also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0140] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

[0141] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

[0142] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A method for adjusting lighting of a lawn mower, characterized in that: The method is applied to a lighting adjustment device installed at the bottom of a lawn mower, the lighting adjustment device comprising a camera and lighting arrays symmetrically distributed on both sides of the camera, and comprising: Acquire an image of the working area through the camera, and identify the number of crop rows and the area where the crop rows are located in the image of the working area; Calculating the world coordinates of the region where the crop row is located; Determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array; The lighting brightness of each lamp bead is adjusted in real time while the lawn mower is moving; The method of adjusting the lighting brightness of each lamp bead in real time during the movement of the lawn mower comprises: The camera is used to obtain an image of the working area in real time during the movement of the lawn mower; If the distance between the identified crop row area and the edge area of ​​the environment is smaller than the set threshold, the lamp bead partition and the lighting brightness of each lamp bead are readjusted; If the crop row cannot be identified, readjust the lighting brightness of each lamp bead; If a new crop row is identified, the step of calculating the world coordinates of the area where the crop row is located is re-executed; The step of determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array comprises: Classify the lamp beads according to the radial attenuation rate and coordinate position of each lamp bead in the lighting array to obtain lamp beads in the crop row lighting area and lamp beads in the non-crop row lighting area; The lighting brightness of the lamp beads in the crop row lighting area is adjusted to a first preset lighting brightness through PWM; The lighting brightness of the lamp beads in the non-crop row lighting area is adjusted to a second preset lighting brightness through PWM.

2. The method according to claim 1, characterized in that The step of identifying the number of crop rows and the area where the crop rows are located in the working area image includes: Performing grayscale processing and enhancement processing on the working area image; Dividing the working area image into regions to obtain a plurality of sub-regions; Identify crop feature points in each sub-region; The number of crop rows and the area where the crop rows are located are determined according to the crop feature points.

3. The method according to claim 2, characterized in that The identifying of the crop feature points of each sub-region includes: For each sub-region n , n= 1,2,…, N The cumulative sum of the pixel values ​​in each column is expressed as ; Among them, the working area image is divided into There are equal-sized sub-regions, each of which contains ; like , determine whether there is a crop row area within the range, and store the feature point in the feature point set P n .

4. The method according to claim 3, characterized in that The step of determining the number of crop rows and the area where the crop rows are located according to the crop feature points comprises: The feature point collection P n middle y Axis coordinates in ascending order x The axis coordinates are arranged in ascending order. y Under the condition of the same coordinates, when adjacent x Difference of axis coordinates When , it is determined that a new crop row boundary is identified and the number of crop rows is determined to be C , the difference area is determined as the crop row spacing; use N The characteristic points of the same crop row boundary in the region determine the maximum value of the crop row spacing, and the left and right maximum values ​​of the region where the single crop row is located are fitted with two straight lines respectively, and a total of 2 straight lines are fitted. C Boundary straight lines, composed C Image areas that require interline lighting , is the area where the crop rows are located.

5. The method according to claim 4, characterized in that The calculating the world coordinates of the region where the crop row is located comprises: The boundary coordinates of the area where the crop row is located are calculated according to the following formula Convert to world coordinates : Among them, the image x Direction and y The pixel sizes in the directions are and , C Image areas that require interline lighting The area corresponding to the actual crop row in the world coordinate system can be expressed as in R is the rotation matrix, r The rotation matrix obtained by camera calibration R The internal parameters of T are the translation vector, T x 、T y The translation vector obtained by camera calibration T The internal parameters of 6. A lighting adjustment system for a lawn mower, characterized in that: The lighting adjustment device is applied to be installed at the bottom of a lawn mower, the lighting adjustment device comprises a camera and lighting arrays symmetrically distributed on both sides of the camera, and the system comprises: an identification module, used to obtain an image of the working area through the camera, and identify the number of crop rows and the area where the crop rows are located in the image of the working area; A coordinate conversion module, used for calculating the world coordinates of the area where the crop row is located; A lamp bead area division module, used to determine the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array; The brightness adjustment module is used to adjust the lighting brightness of each lamp bead in real time while the lawn mower is moving; The method of adjusting the lighting brightness of each lamp bead in real time during the movement of the lawn mower comprises: The camera is used to obtain an image of the working area in real time during the movement of the lawn mower; If the distance between the identified crop row area and the edge area of ​​the environment is smaller than the set threshold, the lamp bead partition and the lighting brightness of each lamp bead are readjusted; If the crop row cannot be identified, readjust the lighting brightness of each lamp bead; If a new crop row is identified, the step of calculating the world coordinates of the area where the crop row is located is re-executed; The step of determining the lighting brightness of each lamp bead according to the position of the lamp bead in the lighting array comprises: Classify the lamp beads according to the radial attenuation rate and coordinate position of each lamp bead in the lighting array to obtain lamp beads in the crop row lighting area and lamp beads in the non-crop row lighting area; The lighting brightness of the lamp beads in the crop row lighting area is adjusted to a first preset lighting brightness through PWM; The lighting brightness of the lamp beads in the non-crop row lighting area is adjusted to a second preset lighting brightness through PWM.

7. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1-5.