Haze detection method and device

By performing grayscale and differential processing on the weather image set of the vehicle environment, combined with the connected area area parameters and environmental data, the accuracy problem of the existing haze detection method is solved, the haze detection accuracy and user experience are improved, and the haze detection accuracy is improved and the user experience is improved. early warning service.

CN118692040APending Publication Date: 2024-09-24DONGFENG MOTOR GRP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410727949.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing haze detection methods are too simple and can easily lead to inaccurate detection results due to interference factors, reducing user experience.

Method used

By obtaining the weather image set of the environment where the vehicle is located, convert it into a grayscale image set and determine the haze risk level. If the risk level is high, differential processing is performed, and the haze level is determined based on the connected area area parameters. The fine particle concentration and meteorological data are combined to improve Detection accuracy.

Benefits of technology

It improves the accuracy of haze detection, reduces errors caused by interference factors, improves user experience, and provides early warning services by uploading haze levels, improving interactivity between vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692040A
    Figure CN118692040A
Patent Text Reader

Abstract

The invention discloses a haze detection method and device. The method comprises the steps that a weather image set of a target environment where a first target vehicle is located is acquired; the weather image set is converted into a gray level image set, the haze risk level of the target environment is determined according to a first area parameter of a target effective area of the gray level image set, and the target effective area is an area with the gray level value smaller than a gray level threshold value in the gray level image set; and if the haze risk level is greater than or equal to a preset risk level, performing differential processing on the weather image set to obtain a differential image set, and determining the haze level of the target environment according to a second area parameter of a target connected region of the differential image set. According to the technical scheme, the haze detection accuracy of the environment where the vehicle is located can be improved, and then the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of haze detection, and in particular, relates to a haze detection method and device. Background Art

[0002] As air pollution becomes increasingly serious, smog weather poses a severe challenge to users' driving safety. At present, most vehicles use built-in sensors to detect fine particle concentration (PM2.5) index to detect smog weather, but the above method is too simple to judge smog weather, and it is likely that other influencing factors (such as water mist, etc.) will cause inaccurate smog detection results, thereby reducing user experience. Summary of the invention

[0003] The embodiments of the present application provide a haze detection method and device, which can improve the haze detection accuracy of the vehicle's environment, at least to a certain extent, and thus improve the user experience.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0005] According to a first aspect of an embodiment of the present application, a haze detection method is provided, comprising:

[0006] Acquire a weather image set of a target environment where a first target vehicle is located;

[0007] Converting the weather image set into a grayscale image set, and determining the haze risk level of the target environment according to a first area parameter of a target effective area of ​​the grayscale image set, wherein the target effective area is an area in the grayscale image set where the grayscale value is less than a grayscale threshold;

[0008] If the haze risk level is greater than or equal to the preset risk level, the weather image set is differentially processed to obtain a differential image set, and the haze level of the target environment is determined according to a second area parameter of a target connected area of ​​the differential image set.

[0009] In some embodiments of the present application, based on the above solution, the first target vehicle is provided with an image acquisition device, and acquiring a weather image set of the target environment where the first target vehicle is located includes:

[0010] Acquire a set of environmental images acquired by the image acquisition device;

[0011] Determine the target viewing angle height of the image acquisition device according to the field of view of the image acquisition device and the preset safe vehicle distance of the first target vehicle, wherein the target viewing angle height refers to the expected image acquisition height of the image acquisition device with the plane where the center of the lens of the image acquisition device is located as the reference plane;

[0012] A target pixel height corresponding to the target viewing angle height is acquired, and the weather image set corresponding to the target pixel height is extracted from the environmental image set.

[0013] In some embodiments of the present application, based on the above scheme, the grayscale image set includes N frames of grayscale images, where N is a positive integer, and determining the haze risk level of the target environment according to the first area parameter of the target effective area of ​​the grayscale image set includes:

[0014] Acquire a first area parameter of a target effective area of ​​each frame of the grayscale image;

[0015] The haze risk level of the target environment is determined according to the mean value and / or the median value of the N first area parameters, wherein the mean value and / or the median value of the N first area parameters is positively correlated with the haze risk level.

[0016] In some embodiments of the present application, based on the above scheme, the weather image set includes M frames of weather images, where M is a positive integer, and performing differential processing on the weather image set to obtain a differential image set, and determining the haze level of the target environment according to the second area parameter of the target connected area of ​​the differential image set, includes:

[0017] Performing a differential operation on the weather images of two adjacent frames to obtain a corresponding differential image, and performing morphological processing on each of the differential images to obtain a corresponding binary image;

[0018] The haze level of the target environment is determined according to the mean value and / or median value of the second area parameters of the M-1 binary images, wherein the mean value and / or median value of the second area parameters of the M-1 binary images is positively correlated with the haze level.

[0019] In some embodiments of the present application, based on the above solution, when determining the haze level of the target environment according to the second area parameter of the target connected area of ​​the differential image set, the method further includes:

[0020] Acquiring environmental detection parameters of the target environment, wherein the environmental detection parameters include fine particle concentration data and / or meteorological data;

[0021] The haze level of the target environment is determined according to the second area parameter of the target connected area of ​​the differential image set and the environment detection parameter.

[0022] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0023] Send anti-smog reminder information to users;

[0024] If the anti-smog operation instruction of the user is received, the target actuator is controlled to perform the anti-smog operation according to the anti-smog operation instruction.

[0025] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0026] Obtaining an actual speed of the first target vehicle;

[0027] If the actual vehicle speed does not match the haze level, the first target vehicle is controlled to travel at a limited speed.

[0028] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0029] In response to a trigger signal for entering the anti-haze mode, according to a preset anti-haze operation of the anti-haze mode by a user, a target actuator is controlled to perform the preset anti-haze operation.

[0030] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0031] The haze level of the target environment is uploaded to a server, so that the server issues an early warning to a second target vehicle according to the haze level of the target environment, and the target path planning of the second target vehicle includes the target environment.

[0032] According to a second aspect of an embodiment of the present application, a haze detection device is provided, comprising:

[0033] An acquisition unit, used to acquire a weather image set of a target environment where a first target vehicle is located;

[0034] A first determining unit is used to convert the weather image set into a grayscale image set, and determine the haze risk level of the target environment according to a first area parameter of a target effective area of ​​the grayscale image set, wherein the target effective area is an area in the grayscale image set whose grayscale value is less than a grayscale threshold;

[0035] The second determination unit is used to perform differential processing on the weather image set to obtain a differential image set if the haze risk level is greater than or equal to a preset risk level, and determine the haze level of the target environment according to a second area parameter of a target connected area of ​​the differential image set.

[0036] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one computer program instruction is stored. The at least one computer program instruction is loaded and executed by a processor to implement the operations performed by any method described in the first aspect.

[0037] According to a fourth aspect of an embodiment of the present application, a vehicle is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement operations performed by any method of the first aspect.

[0038] One or more technical solutions provided by the embodiments of the present invention achieve at least the following technical effects or advantages:

[0039] The present application obtains a weather image set of a target environment where a first target vehicle is located, converts the weather image set into a grayscale image set, and preliminarily determines the haze risk level of the target environment based on a first area parameter of a target effective area of ​​the grayscale image set. In order to avoid the problem of brightness deviation of the grayscale image set due to the presence of interference factors (such as water mist, sunlight, etc.), which in turn leads to errors in haze weather detection results, the present application performs differential processing on the weather image set to obtain a differential image set when the haze risk level is greater than or equal to a preset risk level, and determines the haze level of the target environment based on a second area parameter of the target connected area of ​​the differential image set, thereby improving the haze detection accuracy of the vehicle's environment and thereby improving user experience.

[0040] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0042] Figure 1 A flow chart of a haze detection method according to an embodiment of the present application is shown;

[0043] Figure 2 The structure diagram of the haze detection device according to the embodiment of the present application is shown;

[0044] Figure 3 A schematic diagram of the structure of a computer system of a vehicle suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION

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

[0046] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0047] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0048] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0049] It should also be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those shown or described.

[0050] See also Figure 1 , shows a flow chart of the haze detection method of an embodiment of the present application.

[0051] like Figure 1 As shown, according to the first aspect of the embodiment of the present application, a haze detection method is provided, which can be executed in a vehicle-mounted intelligent terminal, such as a vehicle controller, and the method includes but is not limited to being implemented by steps S1 to S3:

[0052] Step S1. Obtain a weather image set of a target environment where a first target vehicle is located;

[0053] In some embodiments, an environmental image set of the vehicle's environment can be collected by an image acquisition device (such as a camera, a vehicle-mounted camera, etc.) set on the first target vehicle. The environmental image set mainly refers to the visual images within a certain area in front of the vehicle's field of view. The visual images within the above-mentioned area may affect the user's driving vision, so they need to be collected and analyzed in a focused manner.

[0054] In some embodiments, acquiring a weather image set of a target environment where the first target vehicle is located includes:

[0055] Step S11. Acquire a set of environmental images acquired by the image acquisition device;

[0056] It can be understood that the image acquisition device can be a vehicle-mounted camera, and the field of view of the vehicle-mounted camera can simulate the vehicle-side perspective, such as the perspective of a user looking at the front area from the driving seat, so that the collected environmental image set is an image that is strongly related to the user's driving vision; in addition, after the image acquisition device collects the environmental image set, the environmental image set is sent to the vehicle controller, and the vehicle controller processes and analyzes the environmental image set.

[0057] Step S12. Determine the target viewing angle height of the image acquisition device according to the field of view of the image acquisition device and the preset safe vehicle distance of the first target vehicle, wherein the target viewing angle height refers to the expected image acquisition height of the image acquisition device with the plane where the center of the lens of the image acquisition device is located as the reference plane;

[0058] Specifically, according to the field of view angle a of the image acquisition device and the preset safe vehicle distance M of the first target vehicle, the target viewing angle height H of the image acquisition device is determined by the following formula:

[0059]

[0060] It should be noted that when the visible sight distance (i.e., visibility sight distance) is greater than the preset safe vehicle distance, the image acquisition device can actually collect a larger range of environmental images, and interference areas such as the sky may appear; and when the visible sight distance is less than or equal to the preset safe vehicle distance, the image acquisition device can actually collect a smaller range of environmental images, that is, it can only collect environmental images within the visible sight distance. Then, when the visible sight distance (i.e., visibility sight distance) is greater than the preset safe vehicle distance, by setting the target viewing angle height (i.e., the image acquisition height expected by the image acquisition device), interference areas such as the sky can be excluded as much as possible, because interference areas such as the sky account for a large proportion of the area in the environmental image set obtained from the vehicle-side perspective, and the sky area will not change due to short-distance changes in the vehicle position, which will lead to deviations in the subsequent results of haze risk level determination based on the grayscale image set and haze level determination based on the differential image set (high brightness of the sky area). Therefore, the embodiment of the present application defines a target viewing angle height based on the plane where the visual center of the image acquisition device is located, that is, the vertical distance (height difference) between the plane where the visual center of the image acquisition device is located, and determines the parameter value of the target viewing angle height based on the field of view angle of the image acquisition device and the preset safe vehicle distance.

[0061] It can be understood that, based on the above, the maximum field of view of the image acquisition device in the embodiment of the present application should not be too large, so as to avoid excessive collection of images of interference areas such as the sky. For example: if the field of view threshold is set to 150 degrees, the field of view used by the image acquisition device during the image acquisition process does not exceed 150 degrees; and if the maximum field of view of the image acquisition device itself does not reach 150 degrees, for example, the maximum field of view is 120 degrees, then the field of view used by the image acquisition device during the image acquisition process can be 120 degrees.

[0062] It should be noted that the preset safe distance can be adaptively set according to the different working conditions of the vehicle. For example, the preset safe distance can be set to 100m on urban roads, and the preset safe distance can be set to 200m on highways, etc. The specific settings can be based on actual application needs, and will not be listed one by one here.

[0063] Step S13: Obtain a target pixel height corresponding to the target viewing angle height, and extract the weather image set corresponding to the target pixel height from the environmental image set.

[0064] It can be understood that the target viewing angle height is the actual distance value and needs to be converted into pixel distance. Therefore, by converting the target viewing angle height into the target pixel height, the weather image set corresponding to the target pixel height can be determined. At this time, the weather image set excludes interference areas such as the sky, which can improve the accuracy of subsequent haze risk level judgment based on grayscale image sets and haze level judgment based on differential image sets.

[0065] Step S2. converting the weather image set into a grayscale image set, and determining the haze risk level of the target environment according to a first area parameter of a target effective area of ​​the grayscale image set, wherein the target effective area is an area in the grayscale image set whose grayscale value is less than a grayscale threshold;

[0066] It is understandable that since the smaller the gray value, the darker the object, and haze weather will cause the environment to be dim, the area in the gray image set with a gray value less than the gray threshold is identified as the target effective area, and the haze risk level can be determined based on the area of ​​the target effective area in the gray image set. Specifically, if the target environment has the risk of haze weather, after the weather image set is converted into a gray image set, the area of ​​the gray image set with a smaller gray value should be larger. By pre-setting the effective area area value range corresponding to different haze risk levels, the haze risk level of the target environment can be determined according to the area value or proportion of the target effective area.

[0067] In some embodiments, the grayscale image set includes N frames of grayscale images, where N is a positive integer, and determining the haze risk level of the target environment according to the first area parameter of the target effective area of ​​the grayscale image set includes:

[0068] Step S21. Acquire the first area parameter of the target effective area of ​​each frame of the grayscale image;

[0069] It can be understood that the image acquisition device is capable of real-time acquisition of the weather image set of the target environment where the first target vehicle is located. Therefore, the acquired weather image set can be a video stream, which includes multiple frames of weather images, that is, the grayscale image set obtained by subsequent conversion includes N frames of grayscale images, and the area value or proportion of the effective area less than the grayscale threshold in each frame of grayscale image is obtained.

[0070] Step S22. Determine the haze risk level of the target environment according to the mean value and / or the median value of the N first area parameters, wherein the mean value and / or the median value of the N first area parameters is positively correlated with the haze risk level.

[0071] For example: the preset haze risk levels include L1 (mild), L2 (moderate) and severe (L3), and each haze risk level corresponds to a value range of the effective area. For example, the value range corresponding to L1 is greater than or equal to the first area threshold T1 and less than the second area threshold T2, the value range corresponding to L2 is greater than or equal to the second area threshold T2 and less than the third area threshold T3, and the value range corresponding to L3 is greater than the third area threshold T3. If the area value (or proportion) of the target effective area is less than L1, it is considered that there is no haze weather risk. Therefore, according to the value range corresponding to the mean and / or median of the N first area parameters, the haze risk level of the target environment can be determined.

[0072] Step S3. If the haze risk level is greater than or equal to the preset risk level, the weather image set is differentially processed to obtain a differential image set, and the haze level of the target environment is determined according to the second area parameter of the target connected area of ​​the differential image set.

[0073] It is understandable that if there are interference factors such as water mist and sunlight in the target environment, the grayscale value of some or all areas in the grayscale image set will be too large (i.e., the water mist is white and the sunlight is brighter), but the actual visibility of the front area from the vehicle-side field of view is very poor (i.e., it is likely to be smog weather), resulting in misjudgment of smog weather, for example, it is actually smog weather, but the judgment result based on the grayscale image set is that there is no smog weather. Therefore, in order to solve the above problem, the embodiment of the present application further determines the smog level of the target environment according to the second area parameter of the target connected area of ​​the differential image set when the smog risk level is greater than or equal to the preset risk level, for example, greater than or equal to L1 (mild), thereby improving the vehicle's perception and judgment capabilities of smog weather through dual detection and improving the vehicle's intelligence level.

[0074] In some embodiments, the weather image set includes M frames of weather images, where M is a positive integer, and performing differential processing on the weather image set to obtain a differential image set, and determining the haze level of the target environment according to a second area parameter of a target connected area of ​​the differential image set, includes:

[0075] Step S31. performing a differential operation on the weather images of two adjacent frames to obtain a corresponding differential image, and performing morphological processing on each of the differential images to obtain a corresponding binary image;

[0076] For example: take the first frame weather image as the background image and the second frame weather image as the foreground, perform differential image set, and obtain the corresponding binary image by performing morphological processing on the differential image set. For example, the value of the dark connected area in the binary image is 0, and the value of the bright connected area is 1, wherein the dark connected area may be a black connected area.

[0077] Step S32. Determine the haze level of the target environment according to the mean and / or median value of the second area parameters of the M-1 binary images, wherein the mean and / or median value of the second area parameters of the M-1 binary images is positively correlated with the haze level.

[0078] For example: the preset haze levels include F1 (mild), F2 (moderate) and severe (F3), and each haze level corresponds to a value range of the area of ​​the dark connected region. For example, the value range corresponding to F1 is greater than or equal to the first connected region area threshold t1 and less than the second connected region area threshold t2, the value range corresponding to F2 is greater than or equal to the second connected region area threshold t2 and less than the third connected region area threshold t3, and the value range corresponding to F3 is greater than the third connected region area threshold t3. If the area value (or proportion) of the dark connected region is less than F1, it is considered that there is no haze weather. Therefore, according to the mean and / or median value of the second area parameter of M-1 binary images, the haze level of the target environment can be determined.

[0079] In some embodiments of the present application, based on the above solution, when determining the haze level of the target environment according to the second area parameter of the target connected area of ​​the differential image set, the method further includes:

[0080] 1) Acquiring environmental detection parameters of the target environment, wherein the environmental detection parameters include fine particle concentration data and / or meteorological data;

[0081] PM2.5 is a key indicator for measuring the concentration of fine particulate matter in the atmosphere, and can be detected by the existing PM2.5 sensor of the first target vehicle; in addition, meteorological data can be obtained through cloud servers and other backends, including but not limited to temperature, humidity, wind speed and other information, which are closely related to the formation and spread of haze. Therefore, using environmental detection parameters as reference data for determining the haze level of the target environment can further reduce the probability of misjudgment and improve the accuracy of haze detection.

[0082] Based on the above, by utilizing the vehicle's existing PM2.5 sensors and meteorological information system, the corresponding environmental detection parameters can be obtained without any additional costs.

[0083] 2) Determining the haze level of the target environment according to the second area parameter of the target connected area of ​​the differential image set and the environment detection parameter.

[0084] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0085] Step S4. Sending anti-smog reminder information to the user;

[0086] It is understandable that when smog weather is detected, if the user does not perform anti-smog operations, such as not turning on the fog lights, not closing the windows, not turning on the air purification, and driving too fast, etc., an anti-smog reminder message can be sent to the user, such as through voice broadcast, text display, etc. to remind the user to perform corresponding operations.

[0087] Step S5: If the anti-smog operation instruction of the user is received, the target actuator is controlled to perform the anti-smog operation according to the anti-smog operation instruction.

[0088] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0089] Obtaining an actual speed of the first target vehicle;

[0090] If the actual vehicle speed of the first target vehicle does not match the haze level, the first target vehicle is controlled to travel at a limited speed.

[0091] The mismatch between the actual speed of the first target vehicle and the haze level mainly means that the vehicle speed is too fast, which poses a driving safety risk. If the user does not issue a speed reduction instruction, such as reducing the throttle opening, the vehicle controller automatically limits the speed of the vehicle to ensure driving safety.

[0092] In some embodiments, after determining the haze level of the target environment, the method further includes:

[0093] In response to a trigger signal for entering the anti-haze mode, according to a preset anti-haze operation of the anti-haze mode by a user, a target actuator is controlled to perform the preset anti-haze operation.

[0094] It can be understood that the trigger signal of the anti-smog mode may refer to an instruction issued by the user to enter the anti-smog mode, such as issuing the instruction through the anti-smog mode network button, or issuing the instruction through voice "enter anti-smog mode"; in addition, the trigger signal of the anti-smog mode may also be detecting that the haze level of the target environment is greater than or equal to a preset haze level, such as the haze level is moderate, etc., so that the anti-smog mode can be automatically entered to reduce user operation.

[0095] It is understandable that the vehicle side has a pre-set smog mode, and users can customize anti-smog operations such as turning on fog lights, turning on purifiers, closing windows, etc. in smog mode, or other personalized habits, such as real-time voice broadcast of smog data, etc. After detecting smog weather, the user can be prompted whether to turn on the smog mode, or the vehicle can automatically enter the smog mode to reduce user operations, thereby combining vehicle-side data with user behavior to provide users with customized services and improve user experience.

[0096] In some embodiments of the present application, based on the above solution, after determining the haze level of the target environment, the method further includes:

[0097] The haze level of the target environment is uploaded to a server, so that the server issues an early warning to a second target vehicle according to the haze level of the target environment, and the target path planning of the second target vehicle includes the target environment.

[0098] For example: the first target vehicle is car A, and the second target vehicle is car B. Car A is currently in area C, and car B will pass through area C on the way to its destination. Assuming that the current haze level in area C is severe, after car A reports the haze level in area C to the server, the server can issue an early warning to car B, such as notifying car B that there is severe haze in area C and suggesting that the target path be re-planned. Car B can then re-plan the target path based on the prompt to ensure driving safety and driving experience.

[0099] Based on the above disclosed content, the embodiment of the present application obtains the weather image set of the target environment where the first target vehicle is located, converts the weather image set into a grayscale image set, and preliminarily determines the haze risk level of the target environment according to the first area parameter of the target effective area of ​​the grayscale image set. In order to avoid the problem that the brightness deviation of the grayscale image set is caused by the presence of interference factors (such as water mist, sunlight, etc.), and then causes errors in the haze weather detection results, the present application performs differential processing on the weather image set to obtain a differential image set when the haze risk level is greater than or equal to the preset risk level, and determines the haze level of the target environment according to the second area parameter of the target connected area of ​​the differential image set, thereby improving the haze detection accuracy of the environment where the vehicle is located, thereby improving the user experience. In addition, after determining the haze level of the environment where the vehicle is located, the corresponding anti-haze service is provided to the user, thereby improving the user experience. In addition, after uploading the haze level of the environment where the vehicle is located to the server, the server can notify other vehicles to issue haze warnings according to the actual situation, thereby improving the interaction between vehicles and further improving the user experience.

[0100] See also Figure 2 , shows a structural diagram of a haze detection device in an embodiment of the present application.

[0101] like Figure 2 As shown, according to the second aspect of the embodiment of the present application, a haze detection device 200 is provided, comprising:

[0102] An acquisition unit 201 is used to acquire a weather image set of a target environment where a first target vehicle is located;

[0103] A first determining unit 202 is used to convert the weather image set into a grayscale image set, and determine the haze risk level of the target environment according to a first area parameter of a target effective area of ​​the grayscale image set, wherein the target effective area is an area in the grayscale image set whose grayscale value is less than a grayscale threshold;

[0104] The second determination unit 203 is used to perform differential processing on the weather image set to obtain a differential image set if the haze risk level is greater than or equal to a preset risk level, and determine the haze level of the target environment according to a second area parameter of a target connected area of ​​the differential image set.

[0105] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one computer program instruction is stored, and the at least one computer program instruction is loaded and executed by a processor to implement the operations performed by any method of the first aspect.

[0106] The computer readable storage medium may be a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the computer readable storage medium of the present application is not limited thereto, and in the present application, the readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0107] The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0108] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0109] See also Figure 3 , which is a schematic diagram of the structure of a computer system of a vehicle suitable for implementing an embodiment of the present application.

[0110] According to a fourth aspect of an embodiment of the present application, a vehicle is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement operations performed by any method of the first aspect.

[0111] like Figure 3 As shown, the vehicle 400 is represented in the form of a general computing device. The components of the vehicle 400 may include, but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).

[0112] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 executes the steps described in the above “Embodiment Method” section of this specification according to various exemplary implementations of the present application.

[0113] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .

[0114] The storage unit 420 may also include a program / utility 424 having a set (at least one) of program modules 425, such program modules 425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0115] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0116] The vehicle 400 may also communicate with one or more external devices 500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the vehicle 400, and / or any device that enables the vehicle 400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. Furthermore, the vehicle 400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the vehicle 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the vehicle 400, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0117] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hard wiring, or a combination of any of these. In addition, each functional unit may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed in multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0121] The above description is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims

1. A haze detection method, characterized in that: include: Acquire a weather image set of a target environment where a first target vehicle is located; Converting the weather image set into a grayscale image set, and determining the haze risk level of the target environment according to a first area parameter of a target effective area of ​​the grayscale image set, wherein the target effective area is an area in the grayscale image set where the grayscale value is less than a grayscale threshold; If the haze risk level is greater than or equal to the preset risk level, the weather image set is differentially processed to obtain a differential image set, and the haze level of the target environment is determined according to a second area parameter of a target connected area of ​​the differential image set.

2. The method according to claim 1, characterized in that The first target vehicle is provided with an image acquisition device, and the step of acquiring a weather image set of a target environment where the first target vehicle is located comprises: Acquire a set of environmental images acquired by the image acquisition device; Determine the target viewing angle height of the image acquisition device according to the field of view of the image acquisition device and the preset safe vehicle distance of the first target vehicle, wherein the target viewing angle height refers to the expected image acquisition height of the image acquisition device with the plane where the center of the lens of the image acquisition device is located as the reference plane; A target pixel height corresponding to the target viewing angle height is acquired, and the weather image set corresponding to the target pixel height is extracted from the environmental image set.

3. The method according to claim 1, characterized in that The grayscale image set includes N frames of grayscale images, where N is a positive integer, and determining the haze risk level of the target environment according to the first area parameter of the target effective area of ​​the grayscale image set includes: Acquire a first area parameter of a target effective area of ​​each frame of the grayscale image; The haze risk level of the target environment is determined according to the mean value and / or the median value of the N first area parameters, wherein the mean value and / or the median value of the N first area parameters is positively correlated with the haze risk level.

4. The method according to claim 1, characterized in that The weather image set includes M frames of weather images, where M is a positive integer. The weather image set is subjected to differential processing to obtain a differential image set, and the haze level of the target environment is determined according to a second area parameter of a target connected area of ​​the differential image set, including: Performing a differential operation on the weather images of two adjacent frames to obtain a corresponding differential image, and performing morphological processing on each of the differential images to obtain a corresponding binary image; The haze level of the target environment is determined according to the mean value and / or median value of the second area parameters of the M-1 binary images, wherein the mean value and / or median value of the second area parameters of the M-1 binary images is positively correlated with the haze level.

5. The method according to claim 1, characterized in that When determining the haze level of the target environment according to the second area parameter of the target connected area of ​​the differential image set, the method further includes: Acquiring environmental detection parameters of the target environment, wherein the environmental detection parameters include fine particle concentration data and / or meteorological data; The haze level of the target environment is determined according to the second area parameter of the target connected region of the differential image set and the environment detection parameter.

6. The method according to any one of claims 1 to 5, characterized in that: After determining the haze level of the target environment, the method further includes: Send anti-smog reminder information to users; If the anti-smog operation instruction of the user is received, the target actuator is controlled to perform the anti-smog operation according to the anti-smog operation instruction.

7. The method according to claim 1, characterized in that After determining the haze level of the target environment, the method further includes: Obtaining an actual speed of the first target vehicle; If the actual vehicle speed does not match the haze level, the first target vehicle is controlled to travel at a limited speed.

8. The method according to any one of claims 1 to 5, characterized in that: After determining the haze level of the target environment, the method further includes: In response to a trigger signal for entering the anti-haze mode, according to a preset anti-haze operation of the anti-haze mode by a user, a target actuator is controlled to perform the preset anti-haze operation.

9. The method according to any one of claims 1 to 5, characterized in that: After determining the haze level of the target environment, the method further includes: The haze level of the target environment is uploaded to a server, so that the server issues an early warning to a second target vehicle according to the haze level of the target environment, and the target path planning of the second target vehicle includes the target environment.

10. A haze detection device, characterized in that: include: An acquisition unit, used to acquire a weather image set of a target environment where a first target vehicle is located; A first determining unit is used to convert the weather image set into a grayscale image set, and determine the haze risk level of the target environment according to a first area parameter of a target effective area of ​​the grayscale image set, wherein the target effective area is an area in the grayscale image set whose grayscale value is less than a grayscale threshold; The second determination unit is used to perform differential processing on the weather image set to obtain a differential image set if the haze risk level is greater than or equal to a preset risk level, and determine the haze level of the target environment according to a second area parameter of a target connected area of ​​the differential image set.

Citation Information

Patent Citations

  • Image type smoke fire disaster detection method and system

    CN102708651A

  • Smog weather automatic detection and warning system and device for road traffic

    CN113588507A

  • Haze traffic speed limit reminding device

    CN207809065U