Image acquisition method and device of underwater cleaning machine

By collecting the initial environmental image in the underwater cleaning machine and obtaining the imaging quality parameters, and dynamically adjusting the fill light status, the problem of low image acquisition quality caused by inconsistent lighting is solved, and efficient image acquisition and visual recognition are achieved in the global mobile cleaning scenario.

CN120602788APending Publication Date: 2025-09-05SUZHOU SMOROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510912849.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

During the underwater cleaning process, existing pool cleaning robots have low image acquisition quality due to inconsistent lighting environments, making it difficult to accurately determine fill light requirements and unable to meet the image acquisition requirements of global mobile cleaning scenarios.

Method used

By collecting the initial environmental image and obtaining imaging quality parameters such as brightness, exposure and noise level, the fill light status of the fill light device is dynamically adjusted to adapt to the lighting requirements of different areas, achieving a fast and accurate fill light solution.

Benefits of technology

It improves the visual recognition effect of underwater cleaning machines, avoids the lag of fill light operation, is suitable for global mobile cleaning scenarios of underwater cleaning machines, reduces the difficulty of determining fill light requirements, and improves the efficiency and quality of image acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602788A_ABST
    Figure CN120602788A_ABST
Patent Text Reader

Abstract

The invention provides an image acquisition method and device for an underwater cleaning machine. The method comprises the following steps: acquiring an initial environment image; obtaining imaging quality parameters of the initial environment image, wherein the imaging quality parameters comprise image parameters related to image acquisition environment brightness; determining a dimming parameter of the light supplementing device according to the imaging quality parameter; adjusting the light supplementing state of the light supplementing device according to the dimming parameter; and acquiring a target environment image based on the image acquisition environment after the light supplementing state adjustment. According to the method, the underwater cleaning machine can execute light supplement operation in time when underwater environment light cannot meet the requirement for collecting high-quality images, so that the underwater cleaning machine dynamically regulates and controls the light supplement environment according to the imaging quality in the visual recognition process; and in the whole moving process, the light supplementing requirements of all underwater areas are accurately determined and met, and the problem that single light supplementing operation of the underwater cleaning machine is difficult to match the global light environment adjustment requirements when the light intensity of the underwater environment is not uniform is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of cleaning robots, and in particular to an image acquisition method and device for an underwater cleaning machine. Background Art

[0002] An underwater cleaning robot is a cleaning robot developed to meet underwater cleaning needs. It can clean the underwater part of structures and filter water, such as a pool cleaning robot used to clean the bottom of a swimming pool.

[0003] The chassis of a pool cleaning robot is usually provided with a walking mechanism, which can be propelled by the walking mechanism after startup, and move independently on the bottom of the pool to complete a covered cleaning path. At present, some pool cleaning robots are equipped with image acquisition devices, which are used to visually identify the pool environment by taking pictures of the environment, such as the pool terrain, the distribution of pollutants or the type of pollutants, obstacles inside the pool, or the activities of people in areas inside and outside the pool. Due to the influence of the pool layout environment, the running time of the pool cleaning robot, etc., when the visual recognition function needs to be run, the image acquisition area may be affected by factors such as the indoor environment, weather, and the intensity of light in different operating periods, resulting in a lighting environment that is not suitable for image acquisition, making the quality of the collected image extremely low, and reducing the recognition accuracy. In view of this, existing pool cleaning robots with visual recognition functions are additionally equipped with light-emitting units (such as fill lights) so that when insufficient ambient light is detected, the brightness of the surrounding environment can be enhanced by the fill light, thereby capturing clear images.

[0004] However, the inside of a swimming pool is an underwater space with a large volume. Usually, the light intensity environment of each area in the space is not completely consistent. When the pool cleaning robot cleans the pool underwater, it cleans, moves, and collects images at the same time. In view of this, if the fill light is turned off or controlled according to the ambient light intensity of a certain local area when operating in the pool cleaning robot, it is very easy to cause the actual fill light intensity to not match the current fill light demand after the pool cleaning robot moves to the next area because the ambient light intensity of the next area relative to the current area changes. It is difficult to accurately determine the fill light demand of each underwater area based on the global movement demand of the pool cleaning robot inside the pool, and it is impossible to improve the light intensity conditions of the overall image acquisition environment for the large-area mobile cleaning scene of the pool cleaning robot. Summary of the Invention

[0005] In view of this, embodiments of the present application provide an image acquisition method and device for an underwater cleaning machine to at least solve or alleviate the above-mentioned problems.

[0006] According to a first aspect of an embodiment of the present application, there is provided an image acquisition method for an underwater cleaning machine, which is applied to the underwater cleaning machine. The underwater cleaning machine includes an image acquisition device for acquiring an image of an underwater environment and a fill light device. The method includes:

[0007] Collect initial environment images;

[0008] Acquiring imaging quality parameters of the initial environment image, wherein the imaging quality parameters include at least one image parameter related to the brightness of the image acquisition environment;

[0009] determining a dimming parameter of the fill light device according to the imaging quality parameter;

[0010] adjusting the fill light state of the fill light device according to the dimming parameters;

[0011] Based on the image acquisition environment after the fill light state is adjusted, the target environment image is acquired.

[0012] According to a second aspect of an embodiment of the present application, an image acquisition device for an underwater cleaning machine is provided. The image acquisition device is applied to the underwater cleaning machine, and the underwater cleaning machine further includes a fill light device. The image acquisition device includes:

[0013] Image acquisition module, used to acquire initial environment images;

[0014] a parameter determination module, configured to obtain imaging quality parameters of the initial environment image, the imaging quality parameters including at least one image parameter related to the brightness of the image acquisition environment; and determine a dimming parameter of the fill light device based on the imaging quality parameters;

[0015] A parameter adjustment module, configured to adjust the fill light state of the fill light device according to the dimming parameters;

[0016] The image acquisition module is used to acquire a target environment image based on the image acquisition environment after the fill light state is adjusted.

[0017] According to a third aspect of an embodiment of the present application, an underwater cleaning machine is provided, comprising: a processor; and a memory for storing a program; wherein the program comprises instructions, which, when executed by the processor, cause the processor to execute the image acquisition method for the underwater cleaning machine provided in the first aspect above.

[0018] According to a fourth aspect of an embodiment of the present application, a non-transitory computer-readable storage medium is provided, wherein the storage medium stores computer instructions, and when the computer instructions are executed by a computer device, the image acquisition method of the underwater cleaning machine described in the first aspect above is implemented.

[0019] According to another aspect of an embodiment of the present application, a computer program product is provided, wherein the computer program product includes computer instructions, and the computer instructions instruct a computing device to execute the image acquisition method of the underwater cleaning machine described in the first aspect.

[0020] According to the image acquisition scheme for the underwater cleaning machine provided in the embodiment of the present application, an initial environmental image is acquired during the underwater cleaning process, and imaging quality parameters of the initial environmental image are obtained. The imaging quality parameters include at least one image parameter related to the brightness of the image acquisition environment. The fill light state of the fill light device is adjusted according to the imaging quality parameters, so that when the underwater ambient light cannot make the acquired image meet the image quality requirements, the underwater cleaning machine can promptly perform the fill light operation. Compared with the simple fill light method of the existing swimming pool cleaning robot that turns the fill light on or off based on the light intensity detection results of a certain underwater area, the image acquisition method of the present application can be applied to the global mobile cleaning scene of the underwater cleaning machine. The fill light scheme of the underwater cleaning machine in each mobile area is quickly and accurately determined by the image acquisition results of the current mobile area, and feedback dynamic dimming is used. The fill-light solution of this application does not determine the fill-light solution by collecting ambient light parameters, eliminating the need to consider issues such as the accuracy, effectiveness, and detection period of ambient light parameter collection. This reduces the difficulty of determining fill-light requirements and improves the efficiency of detecting fill-light requirements. It avoids the lag in performing fill-light operations after detecting light intensity using a photosensitive device, and improves the defect of a single fill-light solution that does not match the different fill-light requirements of various underwater areas. This method can capture clear images of the target environment throughout the entire process based on the image acquisition environment after adjusting the fill-light state, thereby improving the visual recognition effect of underwater cleaning machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0022] Figure 1 This is a flow chart of an image acquisition method for an underwater cleaning machine according to an embodiment of the present application;

[0023] Figure 2 is a flow chart of an image acquisition method for an underwater cleaning machine according to another embodiment of the present application;

[0024] Figure 3 is a flow chart of an image acquisition method for an underwater cleaning machine according to another embodiment of the present application;

[0025] Figure 4is a flow chart of an image acquisition method for an underwater cleaning machine according to another embodiment of the present application;

[0026] Figure 5 is a flow chart of an image acquisition method for an underwater cleaning machine according to another embodiment of the present application;

[0027] Figure 6 is a schematic diagram of an image acquisition device of an underwater cleaning machine according to an embodiment of the present application;

[0028] Figure 7 Schematic diagram of an underwater cleaning machine according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] The present application is described below based on examples, but the present application is not limited to these examples. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without describing these details. To avoid obscuring the essence of the present application, well-known methods, processes, and procedures are not described in detail. In addition, the drawings are not necessarily drawn to scale.

[0030] An underwater cleaning robot is a robot capable of automatically completing underwater cleaning tasks. Using built-in sensors and intelligent algorithms, the underwater cleaning robot can autonomously perceive its surroundings and autonomously perform cleaning operations along a pre-set or on-site cleaning path. The present application provides an image acquisition method for an underwater cleaning robot, which is applicable to the underwater cleaning robot. The following describes this image acquisition method for an underwater cleaning robot in detail through multiple embodiments.

[0031] Figure 1 This is a flow chart of an image acquisition method for an underwater cleaning machine according to an embodiment of the present application. Figure 1 As shown, the image acquisition method of the underwater cleaning machine includes the following steps:

[0032] Step 101: Acquire an initial environment image.

[0033] The underwater cleaning machine includes an image acquisition device for capturing images of the underwater environment. The underwater cleaning machine uses this image acquisition device to capture images of the environment. The image acquisition device can be a panoramic imaging device, a self-cleaning image acquisition device, an image enhancement acquisition device, or the like. The present application does not limit the type of image acquisition device.

[0034] The initial environment image is an environment image that provides reference information for adjusting the fill light state of the fill light device. Exemplarily, the initial environment image includes at least one of the following:

[0035] Environmental images collected when entering each underwater cleaning zone. These can include multiple areas, such as deep water, shallow water, and sloped areas connecting deep and shallow water, divided according to the underwater terrain. They can also include areas divided according to preset area values, such as dividing a swimming pool with an overall area of ​​A into several cleaning zones of a×a.

[0036] Environmental images captured at intervals of a first preset duration during the underwater cleaning process. That is, during the underwater cleaning process, an environmental image is captured at intervals of a first preset duration as an initial environmental image.

[0037] Step 102: Acquire imaging quality parameters of the initial environment image, where the imaging quality parameters include at least one image parameter related to the brightness of the image acquisition environment.

[0038] Imaging quality parameters refer to the parameters obtained from the image, which can be changed by changes in the light intensity and brightness conditions of the image acquisition environment and directly or indirectly affect the imaging quality effect.

[0039] Optionally, the imaging quality parameters include at least one of the following: image brightness; exposure parameters; and image noise level. Exemplarily, the exposure parameters may include: a dark pixel ratio and / or a highlight pixel ratio. The dark pixel ratio is the proportion of dark pixels in the pixels of the initial environment image, where dark pixels are pixels with grayscale values ​​below a first grayscale threshold. The highlight pixel ratio is the proportion of highlight pixels in the pixels of the initial environment image, where highlight pixels are pixels with grayscale values ​​above a second grayscale threshold. The first grayscale threshold is less than the second grayscale threshold. The underwater cleaning machine determines the imaging quality parameters of the initial environment image based on the basic parameters of the initial environment image. For example, the image brightness of the initial environment image may be calculated based on the RGB values ​​of the pixels in the initial environment image, where the RGB values ​​refer to the values ​​of the red (Red, R), green (Green, G), and blue (Blue, B) channels of the pixels. For another example, the number of dark pixels in the initial environment image may be counted to calculate the proportion of dark pixels in the initial environment image; and / or the number of highlight pixels in the initial environment image may be counted to calculate the proportion of highlight pixels in the initial environment image. For another example, the image noise level is calculated based on the RGB values ​​of pixels in the initial environment image.

[0040] Step 103: Determine the dimming parameters of the fill light device according to the imaging quality parameters.

[0041] The underwater cleaning machine is pre-set with a correspondence between quality parameters and dimming parameters, and the dimming parameters corresponding to the imaging quality parameters are determined based on the correspondence. The correspondence can be represented by a linear or nonlinear function, or by a mapping relationship.

[0042] Alternatively, the underwater cleaning machine is provided with a target imaging quality. During the process of capturing environmental images multiple times, based on the comparison between the actual imaging quality parameters of each captured image and the target imaging quality, a dimming parameter is determined that can make the imaging quality of the current environmental image close to or equal to the target imaging quality, and the imaging quality is improved to the target imaging quality through at least one comparison adjustment. For example, in a case where the imaging quality parameter is reflected by the brightness of the image and the target imaging quality is reflected by the preset brightness, the actual brightness value of the captured image is compared with the preset brightness value. If the actual brightness value is lower than the preset brightness value, the fill light intensity of the fill light is increased by a fixed value, and the image capture and brightness comparison operations are repeated. If the actual brightness value still does not reach the preset brightness value standard, the fill light intensity is further increased by a fixed value until the two are close to or equal. The entire fill light process involves multiple step-by-step adjustments, so that the fill light intensity is correspondingly increased or decreased according to the changes in the brightness of the image during multiple captures to avoid over-adjustment.

[0043] Alternatively, the corresponding value of the dimming parameter can be determined based on the specific difference between the image quality parameter and the target image quality. For example, in the above example scenario, the corresponding fill light intensity value can be directly determined based on the brightness difference between the actual brightness value of the image and the preset brightness value, so that dimming can be achieved through a single adjustment.

[0044] Step 104: Adjust the fill light state of the fill light device according to the dimming parameters.

[0045] The underwater cleaning machine adjusts the brightness parameters of the fill light device according to the dimming parameters, for example, raising or lowering (including lowering to 0 or turning off the fill light) the brightness of the fill light device according to the dimming parameters.

[0046] Step 105 : capturing a target environment image based on the image capturing environment after the fill light state is adjusted.

[0047] After adjusting the fill light state of the fill light device, the target environment image is captured under the adjusted image capture environment.

[0048] In the above embodiment, the two operations of capturing the initial environment image and capturing the target environment image may be two consecutive execution actions or two discontinuous execution actions.

[0049] The entire image acquisition and lighting process described above can be performed either during the non-visual recognition phase after the underwater cleaning machine is launched, preparing for the activation of the visual recognition function, or during the visual recognition process, optimizing the image acquisition environment in real time based on the actual visual recognition situation. The initial and / or target environment images can be used solely for lighting adjustment or for both lighting adjustment and visual recognition.

[0050] During the mobile cleaning process of the underwater cleaning machine, the underwater cleaning machine executes steps 101 to 104 to complete parameter adjustment of the fill light device, and then collects an environmental image based on the image collection environment after the fill light state is adjusted. Subsequently, the underwater cleaning machine determines the image quality of each environmental image it captures. If the image quality of the environmental image does not meet the preset image quality requirements, the environmental image is used as the initial environmental image for this adjustment, and steps 102 to 104 are executed to complete a parameter adjustment of the fill light device. If the image quality of the environmental image meets the preset image quality requirements, the parameters of the fill light device are not adjusted, and the collection of environmental images continues. Alternatively, the underwater cleaning machine captures an initial environmental image at intervals of a first preset time length, and steps 102 to 104 are executed to complete a parameter adjustment of the fill light device. Alternatively, the underwater cleaning machine captures an initial environmental image at intervals of a first preset time length, and steps 102 to 104 are executed to complete a parameter adjustment of the fill light device. Alternatively, the underwater cleaning machine captures an initial environmental image at intervals of a first preset time length, and if the image quality of the initial environmental image does not meet the preset image quality requirements, steps 102 to 104 are executed to complete a parameter adjustment of the fill light device. If the image quality of the initial environmental image meets the preset image quality requirements, the parameters of the fill light device are not adjusted, and the collection of environmental images continues.

[0051] In summary, the image acquisition method for an underwater cleaning machine provided in this embodiment captures an initial environmental image during the underwater cleaning process and obtains imaging quality parameters of the initial environmental image. The imaging quality parameters include at least one image parameter related to the brightness of the image acquisition environment. The fill light status of the fill light device is adjusted according to the imaging quality parameters, enabling the underwater cleaning machine to promptly perform fill light operations when the underwater ambient light cannot make the captured image meet the image quality requirements. Compared to the simple fill light method of existing swimming pool cleaning robots that turns the fill light on or off based on the light intensity detection results of a certain underwater area, the image acquisition method of the present application can be applied to the global mobile cleaning scenario of the underwater cleaning machine. The fill light scheme of the underwater cleaning machine in each mobile area is quickly and accurately determined by the image acquisition results of the current mobile area, and feedback dynamic dimming is used. The fill-light solution of this application does not determine the fill-light solution by collecting ambient light parameters, eliminating the need to consider issues such as the accuracy, effectiveness, and detection period of ambient light parameter collection. This reduces the difficulty of determining fill-light requirements and improves the efficiency of detecting fill-light requirements. It avoids the lag in performing fill-light operations after detecting light intensity using a photosensitive device, and improves the defect of a single fill-light solution that does not match the different fill-light requirements of various underwater areas. This method can capture clear images of the target environment throughout the entire process based on the image acquisition environment after adjusting the fill-light state, thereby improving the visual recognition effect of underwater cleaning machines.

[0052] In some embodiments, as Figure 2 As shown, the imaging quality parameter includes image brightness, and the step of determining the dimming parameter of the fill light device according to the image brightness can be realized as follows:

[0053] Step 1031: If the image brightness is lower than a first brightness threshold, determine a first brightness parameter of the fill light device, and the first brightness parameter is used to increase the brightness of the fill light device; and / or, if the image brightness is higher than a second brightness threshold, determine a second brightness parameter of the fill light device, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first brightness threshold is less than the second brightness threshold.

[0054] Before determining the brightness parameter, the image brightness of the initial environment image is calculated. Exemplarily, the calculation process of the image brightness of the initial environment image includes:

[0055] 1) Grayscale the initial environment image to obtain the corresponding grayscale image.

[0056] Calculate the grayscale value of each pixel in the initial environment image. The calculation formula is:

[0057] Gray=A1×R+A2×G+A3×B;

[0058] Where Gray represents the grayscale value of the pixel, R represents the value of the R channel, G represents the value of the G channel, and B represents the value of the B channel. A1 is the weight based on the human eye's sensitivity to red light, A2 is the weight based on the human eye's sensitivity to green light, and A3 is the weight based on the human eye's sensitivity to blue light. Generally, the value of A1 is 0.299, the value of A2 is 0.587, and the value of A3 is 0.114. In the grayscale value calculation formula, A1, A2, and A3 can be modified, and customized grayscale can be achieved by redistributing the weights.

[0059] 2) Calculate the mean value of the grayscale image and determine the mean value as the image brightness of the initial environment image.

[0060] Sum the grayscale values ​​of all pixels in the grayscale image and divide it by the total number of pixels. The formula is as follows:

[0061]

[0062] Among them, Gray Mean Represents the mean of the grayscale image, Gray i Represents the grayscale value of the i-th pixel, and N is the total number of pixels in the grayscale image.

[0063] The underwater cleaning machine is preset with a first brightness threshold. If the brightness of the initial environment image is lower than the first brightness threshold, a first brightness parameter is determined based on the brightness of the initial environment image, and the first brightness parameter is used to increase the brightness of the fill light device. Alternatively, the underwater cleaning machine is preset with a second brightness threshold. If the brightness of the initial environment image is higher than the second brightness threshold, a second brightness parameter is determined based on the brightness of the initial environment image, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first brightness threshold is lower than the second brightness threshold.

[0064] Exemplarily, the underwater cleaning machine determines a brightness parameter corresponding to the image brightness of the initial environment image based on the correspondence between image brightness and the brightness parameter of the fill light. For example, the underwater cleaning machine may be pre-set with multiple image brightness value ranges, each corresponding to its own brightness parameter. The target value range to which the image brightness of the initial environment image belongs is determined, and the brightness parameter corresponding to the target value range is determined as the first brightness parameter or the second brightness parameter. As another example, the underwater cleaning machine may be pre-set with a function of image brightness and fill light brightness parameter, using the image brightness of the initial environment image as the independent variable of the function to calculate the corresponding first brightness parameter or the second brightness parameter.

[0065] In other embodiments, Figure 3 As shown, the imaging quality parameters include exposure parameters, and the step of determining the dimming parameters of the fill light device according to the exposure parameters can be realized as follows:

[0066] Step 1032: If the exposure parameter indicates that the initial ambient image is underexposed, determine a first brightness parameter of the fill light device, and the first brightness parameter is used to increase the brightness of the fill light device; and / or, if the exposure parameter indicates that the initial ambient image is overexposed, determine a second brightness parameter of the fill light device, and the second brightness parameter is used to decrease the brightness of the fill light device.

[0067] The underwater cleaning machine determines the brightness parameter corresponding to the image brightness of the initial environment image based on the correspondence between the exposure parameter and the brightness parameter of the fill light. For example, the underwater cleaning machine may be pre-set with multiple exposure parameter value ranges, each of which corresponds to a respective brightness parameter. A target value range is determined for the exposure parameter of the initial environment image, and the brightness parameter corresponding to the target value range is determined as the first brightness parameter or the second brightness parameter. In another example, the underwater cleaning machine may be pre-set with a function of the exposure parameter and the fill light brightness parameter, using the exposure parameter of the initial environment image as the independent variable of the function to calculate the corresponding first brightness parameter or the second brightness parameter.

[0068] Optionally, the exposure parameters include a dark pixel ratio reflecting the size of the underexposed area; if the dark pixel ratio is higher than a first ratio threshold, a first brightness parameter of the fill light device is determined; wherein the dark pixel ratio is the proportion of dark pixels in the pixels of the initial environmental image, and dark pixels are pixels whose grayscale values ​​are lower than the first grayscale threshold. The first brightness parameter of the fill light device is determined based on the dark pixel ratio. For example, based on the corresponding relationship between the value range of the dark pixel ratio and the brightness parameter, the brightness parameter corresponding to the target value range of the dark pixel ratio in the initial environmental image is determined as the first brightness parameter; for another example, based on the functional relationship between the dark pixel ratio and the brightness parameter, the first brightness parameter corresponding to the dark pixel ratio in the initial environmental image is calculated.

[0069] Optionally, the exposure parameters include a ratio of highlighted pixels reflecting the size of the overexposed area; if the ratio of highlighted pixels is higher than a second ratio threshold, a second brightness parameter of the fill light device is determined; wherein the ratio of highlighted pixels is the proportion of highlighted pixels in the pixels of the initial environmental image, and highlighted pixels are pixels whose grayscale values ​​are higher than the second grayscale threshold. The second brightness parameter of the fill light device is determined based on the ratio of highlighted pixels. For example, based on the corresponding relationship between the value range of the ratio of highlighted pixels and the brightness parameter, the brightness parameter corresponding to the target value range of the ratio of highlighted pixels in the initial environmental image is determined as the second brightness parameter; for example, based on the functional relationship between the ratio of highlighted pixels and the brightness parameter, the second brightness parameter corresponding to the ratio of highlighted pixels in the initial environmental image is calculated.

[0070] For example, the dark pixel ratio and the bright pixel ratio are calculated as follows:

[0071] 1) Grayscale the initial environment image to obtain the corresponding grayscale image.

[0072] 2) Count the number of pixels at each grayscale level (0-255), where each grayscale value corresponds to a grayscale level.

[0073] 3) Determine the number of pixels in the grayscale image whose grayscale values ​​are less than the first grayscale threshold to obtain the number of dark pixels; calculate the ratio of the number of dark pixels to the total number of pixels in the grayscale image to obtain the dark pixel ratio.

[0074] The number of dark pixels is calculated as follows:

[0075] The calculation formula for the dark pixel ratio is as follows: Low Ratio =N low / N;

[0076] Among them, N low = represents the number of dark pixels, H(k) represents the number of pixels with gray value k, K1 represents the gray value that is one gray level lower than the preset first gray threshold. For example, the first gray threshold is set to 15, and K1 is 14. LowRatio represents the dark pixel ratio, and N is the total number of pixels in the image.

[0077] 4) Determine the number of pixels in the grayscale image whose grayscale values ​​are greater than the second grayscale threshold to obtain the number of highlighted pixels; calculate the ratio of the number of highlighted pixels to the total number of pixels in the grayscale image to obtain the ratio of highlighted pixels.

[0078] The formula for calculating the number of highlighted pixels is as follows:

[0079] The calculation formula for the highlight pixel ratio is as follows: Ratio =N high / N;

[0080] Among them, N high Indicates the number of highlighted pixels, H(k) indicates the number of pixels with grayscale value k, K2 indicates the grayscale value that is one grayscale level higher than the set second grayscale threshold. For example, the second grayscale threshold is set to 240, and the value of K2 is 241. High Ratio Indicates the ratio of highlighted pixels, and N is the total number of pixels in the image.

[0081] For example, the first ratio threshold is set to 10%. If the ratio of dark pixels exceeds 10%, it indicates that the initial ambient image is underexposed, and the first brightness parameter of the fill light device is determined. Alternatively, the second ratio threshold is set to 5%. If the ratio of bright pixels exceeds 5%, it indicates that the initial ambient image is overexposed, and the second brightness parameter of the fill light device is determined.

[0082] Optionally, the grayscale thresholds (including the first grayscale threshold and the second grayscale threshold) are set based on water turbidity. For example, the underwater cleaning machine measures the water turbidity once every second preset time interval, and then determines a corresponding grayscale threshold based on the measured water turbidity parameters. The original grayscale threshold is corrected based on the determined grayscale threshold to adapt to the light scattering ability of water bodies with different turbidity levels, so that the dimming parameters and the actual fill light effect are more closely matched.

[0083] Alternatively, the cleaning task performed by the underwater cleaning machine can be divided into multiple cleaning stages, and different grayscale thresholds can be set for each cleaning stage. Each time a new cleaning stage is entered, the original grayscale threshold is corrected according to the grayscale threshold corresponding to the new cleaning stage. The multiple cleaning stages can be obtained by analyzing the historical changes in water turbidity and dividing the cleaning tasks performed by the underwater cleaning machine. For example, the historical changes in water turbidity refer to the changes in water turbidity when the underwater cleaning machine performs historical cleaning tasks. This can be the changes in water turbidity during a single historical cleaning task, or the combined changes in water turbidity during multiple historical cleaning tasks.

[0084] As the underwater cleaning machine's cleaning time increases, the amount of pollutants in the water decreases, the water turbidity decreases, and the underwater light scattering effect weakens. Therefore, the first grayscale threshold used can be set to a larger value, and the second grayscale threshold used can be set to a smaller value. For example, the later the cleaning stage, the larger the first grayscale threshold used, and the smaller the second grayscale threshold used.

[0085] In other embodiments, Figure 4 As shown, the imaging quality parameter includes the image noise level, and the step of determining the dimming parameter of the fill light device according to the image noise level can be realized as follows:

[0086] Step 1033: If the image noise level is higher than a first level threshold, determine a first brightness parameter of the fill light device, and the first brightness parameter is used to increase the brightness of the fill light device; and / or, if the image noise level is lower than a second level threshold, determine a second brightness parameter of the fill light device, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first level threshold is greater than the second level threshold.

[0087] Before determining the brightness parameter, the image noise level of the initial environment image is calculated. Exemplarily, the process of calculating the image noise level of the initial environment image includes:

[0088] 1) Divide the initial environment image into multiple image regions, each image region includes c×c pixels, and c is an integer greater than 1.

[0089] 2) For each image region, calculate the average grayscale value of the pixels in the image region.

[0090] The calculation formula for the average gray value of the image area D is:

[0091] μ=∑ (x,y)∈D I(x,y) / c 2 ;

[0092] Where μ represents the average grayscale value of the image region D, (x, y)∈D represents that the pixel (x, y) belongs to the image region D, I(x, y) represents the grayscale value of the pixel (x, y), and c 2 Represents the total number of pixels in the image area D.

[0093] 3) Calculate the average variance of the image area based on the average grayscale value of the image area.

[0094] The calculation formula of the mean square error of the image area D is:

[0095] σ D 2 =∑ (x,y)∈D (I(x,y)-μ) 2 / c 2 ;

[0096] Among them, σ D 2 represents the average variance of the image region D.

[0097] 4) Determine the image noise level of the initial environment image based on the average variance of the multiple image regions.

[0098] Optionally, the average variances of multiple image regions are averaged to obtain the image noise level of the initial environment image. Alternatively, a target image region whose average variance is lower than a variance threshold is determined from multiple image regions, and the average variances of the target image region are averaged to obtain the image noise level of the initial environment image. For example, if the variance threshold is 60, the average variance σ is determined to be D 2 The target image area is lower than 60, and then the average variance of the target image area is averaged to obtain the image noise level of the initial environment image. The higher the value obtained by averaging the average variance of the target image area, the higher the noise level of the initial environment image.

[0099] The underwater cleaning machine is preset with a first level threshold. If the image noise level of the initial environmental image is higher than the first level threshold, a first brightness parameter is determined based on the image noise level of the initial environmental image, and the first brightness parameter is used to increase the brightness of the fill light device. Alternatively, the underwater cleaning machine is preset with a second level threshold. If the image noise level of the initial environmental image is lower than the second level threshold, a second brightness parameter is determined based on the image noise level of the initial environmental image, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first level threshold is greater than the second brightness threshold.

[0100] For example, the first horizontal threshold is 40; if the image noise level of the initial environment image is higher than 40, a first brightness parameter is determined based on the image noise level of the initial environment image to increase the fill light intensity based on the first brightness parameter. The second horizontal threshold is 20; if the image noise level of the initial environment image is lower than 20, a second brightness parameter is determined based on the image noise level of the initial environment image to reduce the fill light intensity based on the second brightness parameter.

[0101] Exemplarily, the underwater cleaning machine determines the brightness parameter corresponding to the image noise level of the initial environment image based on the correspondence between the noise level and the brightness parameter of the fill light. For example, the underwater cleaning machine is preset with multiple noise level value ranges, each noise level value range corresponding to its own brightness parameter; the target value range to which the image noise level of the initial environment image belongs is determined, and the brightness parameter corresponding to the target value range is determined as the first brightness parameter or the second brightness parameter. For another example, the underwater cleaning machine is preset with a function of the noise level and the brightness parameter of the fill light, and the image noise level of the initial environment image is used as the independent variable of the function to calculate the corresponding first brightness parameter or the second brightness parameter.

[0102] In other embodiments, Figure 5 As shown, there are at least two types of imaging quality parameters. Then, the step of determining the dimming parameters of the fill light device according to the quality parameters can be implemented as follows:

[0103] Step 1034: Obtain a preset weight corresponding to each imaging quality parameter; and calculate a weighted sum of at least two imaging quality parameters according to the preset weight corresponding to each imaging quality parameter.

[0104] Optionally, the imaging quality parameters include at least two of the following: image brightness, exposure parameters, and image noise level. The exposure parameters include at least one of the following: a ratio of bright pixels and a ratio of dark pixels.

[0105] Different types of imaging quality parameters may have the same or different corresponding weights. The weight of each imaging quality parameter can be set based on the degree to which the imaging quality parameter is affected by ambient light. Assuming that the imaging quality parameters include image brightness F1 and image noise level F2, the preset weight G1 corresponding to image brightness and the preset weight G2 corresponding to image noise level are obtained. The weighted sum F of the two is: F = G1 × F1 + G2 × F2.

[0106] Step 1035: If the weighted sum is lower than the first weight threshold, determine a first brightness parameter of the fill light device, and the first brightness parameter is used to increase the brightness of the fill light device; and / or, if the weighted sum is higher than the second weight threshold, determine a second brightness parameter of the fill light device, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first weight threshold is less than the second weight threshold.

[0107] The underwater cleaning machine is preset with a first weight threshold. If the weighted sum corresponding to the initial environmental image is lower than the first weight threshold, a first brightness parameter is determined based on the weighted sum corresponding to the initial environmental image, and the first brightness parameter is used to increase the brightness of the fill light device. Alternatively, the underwater cleaning machine is preset with a second weight threshold. If the weighted sum corresponding to the initial environmental image is higher than the second weight threshold, a second brightness parameter is determined based on the weighted sum corresponding to the initial environmental image, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first weight threshold is lower than the second weight threshold.

[0108] Exemplarily, the underwater cleaning machine determines the brightness parameter corresponding to the weighted sum based on the correspondence between the sum value and the brightness parameter of the fill light. For example, the underwater cleaning machine may be pre-set with multiple weighted sum value ranges, each corresponding to a respective brightness parameter. The target value range to which the weighted sum belongs is determined, and the brightness parameter corresponding to the target value range is determined as the first brightness parameter or the second brightness parameter. In another example, the underwater cleaning machine may be pre-set with a function of the sum value and the fill light brightness parameter, using the weighted sum corresponding to the initial environment image as the independent variable of the function to calculate the first brightness parameter or the second brightness parameter.

[0109] To sum up, the image acquisition method for the underwater cleaning machine provided in this embodiment can adjust the fill light state of the fill light device according to one or more imaging quality parameters, so that when the underwater ambient light cannot make the collected image meet the image quality requirements, the underwater cleaning machine can perform the fill light operation in time, avoiding the lag of performing the fill light operation after detecting the light intensity through the photosensitive device, and then based on the image acquisition environment after the fill light state is adjusted, a clear target environment image is collected, thereby improving the visual recognition effect of the underwater cleaning machine.

[0110] For example, using a single imaging quality parameter to adjust the fill light status of a fill light device simplifies the calculation of the imaging quality parameter and can speed up fill light adjustment. Another example is using multiple imaging quality parameters to adjust the fill light status of a fill light device, which can better assess the current ambient light conditions, thereby adjusting the fill light status more accurately and with higher precision.

[0111] The fill light device on the underwater cleaning machine may include multiple fill light components, and the fill light ranges of the multiple fill light components do not overlap. Accordingly, the fill light adjustment of the fill light device can be adjusted according to the implementation requirements.

[0112] After capturing an initial ambient image, the initial ambient image is divided into multiple image partitions corresponding to the fill light ranges of multiple fill light components. Then, dimming parameters for the fill light components corresponding to the fill light ranges of each image partition are sequentially determined, including: obtaining imaging quality parameters for each image partition; determining the dimming parameters for the fill light components corresponding to the fill light ranges based on the imaging quality parameters of each image partition. Finally, the fill light status of each fill light component is adjusted based on the dimming parameters of the fill light components in each fill light range.

[0113] For the detailed implementation process of the above steps, please refer to the description in the above embodiment, which will not be repeated here.

[0114] To sum up, the image acquisition method of the underwater cleaning machine provided in this embodiment adjusts the dimming parameters of the fill light components in different fill light ranges according to the imaging quality parameters of different image areas, which can achieve precise fill light for various areas in the underwater environment, thereby obtaining high-quality environmental images.

[0115] Figure 6 FIG. 1 shows a schematic diagram of an image acquisition device for an underwater cleaning machine. Figure 6 As shown, the image acquisition device of the underwater cleaning machine is applied to the underwater cleaning machine, and the underwater cleaning machine also includes a fill light device. The image acquisition device includes:

[0116] Image acquisition module 201, used to acquire an initial environment image;

[0117] The parameter determination module 202 is configured to obtain imaging quality parameters of the initial environment image, the imaging quality parameters including at least one image parameter related to the brightness of the image acquisition environment; and determine the dimming parameters of the fill light device based on the imaging quality parameters.

[0118] The parameter adjustment module 203 is used to adjust the fill light state of the fill light device according to the dimming parameters;

[0119] The image acquisition module 201 is configured to acquire a target environment image based on the image acquisition environment after the fill light state is adjusted.

[0120] In one possible implementation, the imaging quality parameter includes image brightness; the parameter determination module 202 is used to determine a first brightness parameter of the fill light device if the image brightness is lower than a first brightness threshold, and the first brightness parameter is used to increase the brightness of the fill light device; and / or, if the image brightness is higher than a second brightness threshold, determine a second brightness parameter of the fill light device, and the second brightness parameter is used to lower the brightness of the fill light device; wherein the first brightness threshold is less than the second brightness threshold.

[0121] In one possible implementation, the imaging quality parameter includes an exposure parameter; the parameter determination module 202 is configured to determine a first brightness parameter of the fill light device if the exposure parameter indicates that the initial ambient image is underexposed, the first brightness parameter being used to increase the brightness of the fill light device; and / or determine a second brightness parameter of the fill light device if the exposure parameter indicates that the initial ambient image is overexposed, the second brightness parameter being used to decrease the brightness of the fill light device.

[0122] In one possible implementation, the exposure parameters include a dark pixel ratio; the parameter determination module 202 is used to determine a first brightness parameter of the fill light device if the dark pixel ratio is higher than a first ratio threshold; wherein the dark pixel ratio is the proportion of dark pixels in the pixels of the initial environmental image, and the dark pixels are pixels whose grayscale values ​​are lower than the first grayscale threshold.

[0123] In one possible implementation, the exposure parameters include a highlight pixel ratio; the parameter determination module 202 is used to determine a second brightness parameter of the fill light device if the highlight pixel ratio is higher than a second ratio threshold; wherein the highlight pixel ratio is the proportion of highlight pixels in the pixels of the initial environment image, and the highlight pixels are pixels whose grayscale values ​​are higher than the second grayscale threshold.

[0124] In a possible implementation, the grayscale threshold is set based on the turbidity of the water body.

[0125] In one possible implementation, the exposure parameters include an image noise level; the parameter determination module 202 is configured to determine a first brightness parameter of the fill light device if the image noise level is higher than a first level threshold, the first brightness parameter being used to increase the brightness of the fill light device; and / or, if the image noise level is lower than a second level threshold, determine a second brightness parameter of the fill light device, the second brightness parameter being used to decrease the brightness of the fill light device; wherein the first level threshold is greater than the second level threshold.

[0126] In one possible implementation, there are at least two types of imaging quality parameters; the parameter determination module 202 is used to obtain a preset weight corresponding to each imaging quality parameter; based on the preset weight corresponding to each imaging quality parameter, a weighted sum of at least two imaging quality parameters is calculated; if the weighted sum is lower than a first weight threshold, a first brightness parameter of the fill light device is determined, and the first brightness parameter is used to increase the brightness of the fill light device; and / or, if the weighted sum is higher than a second weight threshold, a second brightness parameter of the fill light device is determined, and the second brightness parameter is used to decrease the brightness of the fill light device; wherein the first weight threshold is lower than the second weight threshold.

[0127] In one possible implementation, the fill light device includes multiple fill light components, each of which has a non-overlapping fill light range. A parameter determination module 202 is configured to divide an initial ambient image into multiple image partitions corresponding to the fill light ranges of the multiple fill light components; obtain an imaging quality parameter for each image partition; and determine, based on the imaging quality parameter for each image partition, a dimming parameter for the fill light component within the corresponding fill light range. A parameter adjustment module 203 is configured to adjust the fill light status of each fill light component based on the dimming parameter of the fill light component within each fill light range.

[0128] It should be noted that the image acquisition device of the underwater cleaning machine in this embodiment is used to implement the corresponding image acquisition method of the underwater cleaning machine in the aforementioned method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0129] Figure 7 This is a schematic block diagram of an electronic device provided in an embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the electronic device. A block diagram of the structure of an underwater cleaning machine 300 that can be used in the present application is now described. This is an example of a hardware device that can be applied to various aspects of the present application. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0130] like Figure 7 As shown, the underwater cleaning machine 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. Various programs and data required for the operation of the underwater cleaning device 300 can also be stored in the RAM 303. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0131] Multiple components in the underwater cleaning machine 300 are connected to the I / O interface 305, including: an input unit 306, an output unit 307, a storage unit 308, and a communication unit 309. The input unit 306 can be any type of device that can input information to the underwater cleaning machine 300. The input unit 306 can receive input digital or character information and generate key signal input related to user settings and / or function control of the underwater cleaning machine. The output unit 307 can be any type of device that can present information and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 308 can include, but is not limited to, a magnetic disk or an optical disk. The communication unit 309 allows the underwater cleaning machine 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth™ device, a Wireless Fidelity (WiFi) device, a Worldwide Interoperability for Microwave Access (WiMax) device, a cellular communication device and / or the like.

[0132] The computing unit 301 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated AI computing chips, various computing units for running machine learning model algorithms, digital signal processors (DSP), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above. For example, in some embodiments, the image acquisition method of the cleaning machine of the aforementioned embodiments can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the underwater cleaning machine 300 via ROM 302 and / or communication unit 309. In some embodiments, the computing unit 301 can be configured to perform the image acquisition method of the underwater cleaning machine by any other appropriate means (e.g., by means of firmware).

[0133] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0134] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0135] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0137] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0138] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.

[0139] This application also provides a computer-readable storage medium storing instructions for causing a machine to execute the image acquisition method for an underwater cleaning machine as described herein. Specifically, a system or device equipped with a storage medium can be provided, wherein the storage medium stores software program code that implements the functions of any of the above-described embodiments, and a computer (or CPU or microprocessor unit (MPU)) of the system or device can read and execute the program code stored in the storage medium.

[0140] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of this application.

[0141] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROMs, Compact Disk-Recordable (CD-R), Compact Disk-ReWritable (CD-RW), Digital Video Disk-Random Access Memory (DVD-ROM), Digital Video Disk-Random Access Memory (DVD-RAM), Digital Video Disk-ReWritable (DVD-RW), DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer via a communications network.

[0142] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to perform any corresponding operation in the above-mentioned multiple method embodiments.

[0143] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0144] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded via a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as a professional integrated circuit (ASIC) or a field programmable gate array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown here.

[0145] Those skilled in the art will appreciate that the units and method steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this application.

[0146] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.

Claims

1. An image acquisition method for an underwater cleaning machine, characterized in that: Applied to an underwater cleaning machine, the underwater cleaning machine includes a light-filling device, and the method includes: Collect initial environment images; Acquiring imaging quality parameters of the initial environment image, wherein the imaging quality parameters include at least one image parameter related to the brightness of the image acquisition environment; determining a dimming parameter of the fill light device according to the imaging quality parameter; adjusting the fill light state of the fill light device according to the dimming parameters; Based on the image acquisition environment after the fill light state is adjusted, the target environment image is acquired.

2. The method according to claim 1, characterized in that The imaging quality parameter includes image brightness; Determining the dimming parameters of the fill light device according to the imaging quality parameters includes: If the image brightness is lower than a first brightness threshold, determining a first brightness parameter of the fill light device, wherein the first brightness parameter is used to increase the brightness of the fill light device; and / or, If the image brightness is higher than a second brightness threshold, determining a second brightness parameter of the fill light device, wherein the second brightness parameter is used to reduce the brightness of the fill light device; The first brightness threshold is smaller than the second brightness threshold.

3. The method according to claim 1, characterized in that The imaging quality parameters include exposure parameters; Determining the dimming parameters of the fill light device according to the imaging quality parameters includes: If the exposure parameter indicates that the initial ambient image is underexposed, determining a first brightness parameter of the fill light device, wherein the first brightness parameter is used to increase the brightness of the fill light device; and / or, If the exposure parameter indicates that the initial environment image is overexposed, a second brightness parameter of the fill light device is determined, and the second brightness parameter is used to reduce the brightness of the fill light device.

4. The method according to claim 3, characterized in that The exposure parameters include dark pixel ratio; If the exposure parameter indicates that the initial environment image is underexposed, determining a first brightness parameter of the fill light device includes: If the dark pixel ratio is higher than a first ratio threshold, determining the first brightness parameter of the fill light device; The dark pixel ratio is the proportion of dark pixels in the pixels of the initial environment image, and the dark pixels are pixels whose grayscale values ​​are lower than a first grayscale threshold.

5. The method according to claim 3, characterized in that The exposure parameters include the ratio of highlight pixels; If the exposure parameter indicates that the initial environment image is overexposed, determining the second brightness parameter of the fill light device includes: If the ratio of the highlighted pixels is higher than a second ratio threshold, determining the second brightness parameter of the fill light device; The highlighted pixel ratio is the proportion of highlighted pixels in the pixels of the initial environment image, and the highlighted pixels are pixels whose grayscale values ​​are higher than a second grayscale threshold.

6. The method according to claim 4 or 5, characterized in that The grayscale threshold is set based on the turbidity of the water body.

7. The method according to claim 1, characterized in that The exposure parameters include image noise level; Determining the dimming parameters of the fill light device according to the imaging quality parameters includes: If the image noise level is higher than a first level threshold, determining a first brightness parameter of the fill light device, wherein the first brightness parameter is used to increase the brightness of the fill light device; and / or, If the image noise level is lower than a second level threshold, determining a second brightness parameter of the fill light device, wherein the second brightness parameter is used to reduce the brightness of the fill light device; The first level threshold is greater than the second level threshold.

8. The method according to claim 1, characterized in that The number of types of the imaging quality parameters is at least two; Determining the dimming parameters of the fill light device according to the imaging quality parameters includes: Obtaining a preset weight corresponding to each of the imaging quality parameters; Calculating a weighted sum of at least two of the imaging quality parameters according to a preset weight corresponding to each of the imaging quality parameters; If the weighted sum is lower than a first weight threshold, determining a first brightness parameter of the fill light device, wherein the first brightness parameter is used to increase the brightness of the fill light device; and / or if the weighted sum is higher than a second weight threshold, determining a second brightness parameter of the fill light device, wherein the second brightness parameter is used to decrease the brightness of the fill light device; The first weight threshold is smaller than the second weight threshold.

9. The method according to claim 1, characterized in that The fill light device includes a plurality of fill light components, and the fill light ranges of the plurality of fill light components do not overlap; The obtaining of the imaging quality parameter of the initial environment image includes: Dividing the initial environment image into a plurality of image partitions corresponding to the fill light ranges of the plurality of fill light components; Obtaining imaging quality parameters of each of the image partitions; Determining the dimming parameters of the fill light device according to the imaging quality parameters includes: Determining, according to the imaging quality parameters of each of the image partitions, a dimming parameter of the fill light component corresponding to the fill light range; The step of adjusting the fill light state of the fill light device according to the dimming parameter includes: The fill light status of each fill light component is adjusted respectively according to the dimming parameters of the fill light component in each fill light range.

10. An image acquisition device for an underwater cleaning machine, characterized in that: The image acquisition device is applied to an underwater cleaning machine, which also includes a fill light device. The image acquisition device includes: Image acquisition module, used to acquire initial environment images; a parameter determination module, configured to obtain imaging quality parameters of the initial environment image, the imaging quality parameters including at least one image parameter related to the brightness of the image acquisition environment; and determine a dimming parameter of the fill light device based on the imaging quality parameters; A parameter adjustment module, configured to adjust the fill light state of the fill light device according to the dimming parameters; The image acquisition module is used to acquire a target environment image based on the image acquisition environment after the fill light state is adjusted.