Out-of-focus detection method, apparatus, device, and storage medium

By calibrating the mapping relationship between ambient light and sharpness in the out-of-focus calibration area of ​​the calibrated vehicle, the accuracy problem of lens out-of-focus detection in the electronic exterior rearview mirror system was solved, ensuring image clarity and improving driving safety and regulatory compliance.

CN116567201BActive Publication Date: 2025-12-19合肥疆程技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310528504.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2025-12-19
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

Existing camera lens defocus detection solutions cannot accurately determine lens defocus in electronic exterior rearview mirror systems, resulting in blurred images, affecting driving safety, and failing to meet regulatory standards.

Method used

By calibrating the mapping relationship between ambient light and sharpness in the out-of-focus calibration area of ​​the calibration vehicle, the effective ambient brightness and current sharpness are obtained using the camera. It is then determined whether the current brightness and sharpness are within the target brightness and sharpness range, and an out-of-focus warning message is generated.

Benefits of technology

Accurately detect whether the electronic exterior rearview mirror system is out of focus under different ambient light conditions, generate out-of-focus warning information, ensure image clarity, improve driving safety, and meet regulatory requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116567201B_ABST
    Figure CN116567201B_ABST
Patent Text Reader

Abstract

The application provides a defocus detection method, device, equipment and storage medium, and the defocus detection method is applied to an electronic outside rearview mirror system. An effective environment brightness, a current brightness and a current definition of a target vehicle defocus detection area are obtained through a camera, a target brightness level corresponding to the effective environment brightness is determined according to an effective environment brightness and an environment light and definition mapping relationship. If it is determined that the current brightness is in a target brightness interval but the current definition is not in a target definition interval, it is determined that the electronic outside rearview mirror system is out of focus, a defocus prompt information is generated and reported to a body controller of the target vehicle. A detection scheme for whether the electronic outside rearview mirror system is in a defocus state is provided, a defocus prompt information is generated for reminding when the electronic outside rearview mirror system is out of focus, so that the electronic outside rearview mirror system meets the regulation requirements, and it is ensured that the image obtained through the electronic outside rearview mirror system in the driving process is clear, and the driving safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a defocus detection method and device, equipment and storage medium. BACKGROUND

[0002] The electronic outside rearview mirror system (CMS) is formed by components such as a high-definition camera, an image sensor, an imaging processor, a display screen, etc. Compared with the traditional rearview mirror, the electronic outside rearview mirror system not only conforms to the aerodynamic design better, but also has a considerable improvement in the visual angle and night tolerance. The regulation standard GB15084 of the CMS clearly states that "detecting optical defocus and prompting the user" is a function that must be met by the functional safety part. At the same time, optical defocus will make the image blurred and the definition reduced, which will directly affect the driver's observation of the outside rearview field and endanger driving safety.

[0003] The current camera lens defocus detection scheme mainly uses the gradient statistical feature of the picture. Generally, the higher the gradient value, the richer the edge information of the picture, and the clearer the image. If the picture itself has little texture, even if it is not defocused, the gradient statistical information will be very small, and the gradient value measured under different brightness conditions will be different. In the case of overexposure or underexposure, the gradient value is inaccurate. These three reasons all lead to the fact that the detection scheme cannot accurately judge the lens defocus on the CMS. Therefore, there is an urgent need for a defocus detection scheme for the CMS to meet the regulation standards of the functional safety part of the CMS and ensure driving safety. SUMMARY

[0004] The present application provides a defocus detection method, device, equipment and storage medium for the CMS to provide a defocus detection method to meet the regulation standards of the functional safety part of the CMS and ensure driving safety.

[0005] In a first aspect, the present application provides a defocus detection method applied to an electronic outside rearview mirror system, comprising:

[0006] obtaining an effective environmental brightness, a current brightness and a current definition of a target vehicle defocus detection area;

[0007] determining a target brightness level corresponding to the effective environmental brightness according to the effective environmental brightness and an ambient light and definition mapping relationship, wherein the ambient light and definition mapping relationship is obtained by defocus calibration of a defocus calibration area of a calibration vehicle, and the calibration vehicle and the target vehicle are the same type of vehicle;

[0008] If it is determined that the current brightness is in the target brightness interval corresponding to the target brightness level and the current sharpness is in the target sharpness interval corresponding to the target brightness level, it is determined that the electronic outside rearview mirror system is not out of focus.

[0009] In a possible design, if it is determined that the current brightness is in the target brightness interval but the current sharpness is not in the target sharpness interval, an out-of-focus prompt information is generated, and the out-of-focus prompt information is reported to a body controller of the target vehicle.

[0010] If it is determined that the current brightness is not in the target brightness interval, an invalid prompt information is generated, where the invalid prompt information is used to represent that the current brightness is invalid.

[0011] In a possible design, before the target brightness level corresponding to the effective ambient brightness is determined according to the effective ambient brightness and the ambient light-sharpness mapping relationship, the method further includes:

[0012] The out-of-focus calibration area of the calibration vehicle is determined according to all-view pixels of the calibration camera, where the out-of-focus calibration area and the out-of-focus detection area are the same area of the same vehicle type.

[0013] Feature images of the out-of-focus calibration area are respectively captured by the calibration camera under a plurality of brightness levels, to obtain a feature image set.

[0014] The brightness interval and the sharpness interval corresponding to each brightness level are obtained according to the feature image set, to generate the ambient light-sharpness mapping relationship, where each brightness level corresponds to an ambient brightness interval.

[0015] In a possible design, the feature images of the out-of-focus calibration area are respectively captured by the calibration camera under a plurality of brightness levels, to obtain a feature image set, including:

[0016] Under a first feature brightness corresponding to each brightness level, images of the out-of-focus calibration area are respectively captured by the calibration camera through each first feature lens and each second feature lens, to correspondingly obtain a first feature image set and a second feature image set.

[0017] Under a second feature brightness corresponding to each brightness level, images of the out-of-focus calibration area are respectively captured by the calibration camera through each first feature lens and each second feature lens, to correspondingly obtain a third feature image set and a fourth feature image set.

[0018] The feature image set includes the first feature image set, the second feature image set, the third feature image set and the fourth feature image set obtained under each luminance level, the first feature luminance and the second feature luminance are maximum luminance and minimum luminance in the environmental luminance interval respectively, and the power of each first feature lens is greater than the power of each second feature lens.

[0019] In a possible design, the acquiring of the luminance interval and the definition interval corresponding to each luminance level according to the feature image set to generate the environmental light and definition mapping relationship includes:

[0020] The luminance and definition of each first feature image are acquired according to the first feature image set obtained under each luminance level, to obtain the first feature luminance interval and the first feature definition interval of each luminance level;

[0021] The luminance and definition of each second feature image are acquired according to the second feature image set obtained under each luminance level, to obtain the second feature luminance interval and the second feature definition interval of each luminance level;

[0022] The luminance and definition of each third feature image are acquired according to the third feature image set obtained under each luminance level, to obtain the third feature luminance interval and the third feature definition interval of each luminance level;

[0023] The luminance and definition of each fourth feature image are acquired according to the fourth feature image set obtained under each luminance level, to obtain the fourth feature luminance interval and the fourth feature definition interval of each luminance level;

[0024] The maximum luminance and the minimum luminance corresponding to each luminance level are acquired according to the first feature luminance interval, the second feature luminance interval, the third feature luminance interval and the fourth feature luminance interval corresponding to each luminance level, to obtain the luminance interval corresponding to each luminance level;

[0025] The maximum definition and the minimum definition corresponding to each luminance level are acquired according to the first feature definition interval, the second feature definition interval, the third feature definition interval and the fourth feature definition interval corresponding to each luminance level, to obtain the definition interval corresponding to each luminance level;

[0026] The environmental light and definition mapping relationship is generated according to the luminance interval under each luminance level and the definition interval under each luminance level.

[0027] In a possible design, the power of each first feature lens is sequentially increased, and the center of the calibration camera is aligned with the center of each first feature lens.

[0028] In a possible design, the power of each second feature lens is sequentially decreased, and the center of the calibration camera is aligned with the center of each second feature lens.

[0029] In a possible design, the method further includes:

[0030] According to the full-view pixel, a starting pixel is obtained, and a body specified region of the calibration vehicle is obtained, and the full-view region corresponding to the full-view pixel fully covers the body specified region.

[0031] According to the starting pixel and the size of the body specified region, the body specified region is evenly divided into unit regions.

[0032] A target unit region is obtained, and the target unit region is determined as the defocus calibration region.

[0033] In a possible design, each first feature lens and each second feature lens includes a myopic lens or a hyperopic lens.

[0034] In a second aspect, the present application provides a defocus detection device, applied to an electronic outside rearview mirror system, and including:

[0035] The acquisition module is configured to acquire an effective ambient brightness, and a current brightness and a current clarity of a target vehicle defocus detection region.

[0036] The first processing module is configured to determine a target brightness level corresponding to the effective ambient brightness according to the effective ambient brightness and an ambient light and clarity mapping relationship, the ambient light and clarity mapping relationship being obtained by performing defocus calibration on a defocus calibration region of a calibration vehicle, and the calibration vehicle and the target vehicle being the same model vehicle.

[0037] The second processing module is configured to determine that the electronic outside rearview mirror system is not defocused if it is determined that the current brightness is in a target brightness interval corresponding to the target brightness level and the current clarity is in a target clarity interval corresponding to the target brightness level.

[0038] In a possible design, the second processing module is further configured to:

[0039] If it is determined that the current brightness is in the target brightness interval but the current sharpness is not in the target sharpness interval, a defocus prompt information is generated, and the defocus prompt information is reported to a body controller of the target vehicle;

[0040] If it is determined that the current brightness is not in the target brightness interval, an invalid prompt information is generated, which is used to represent that the current brightness is invalid.

[0041] In a possible design, the defocus detection apparatus further includes a calibration module, and the calibration module includes:

[0042] A first calibration submodule is configured to determine a defocus calibration area of the calibration vehicle according to all-view pixels of a calibration camera, the defocus calibration area being a same area of the same vehicle type as the defocus detection area;

[0043] A second calibration submodule is configured to capture feature images of the defocus calibration area at multiple brightness levels respectively by using the calibration camera to obtain a feature image set;

[0044] A third calibration submodule is configured to obtain a brightness interval and a sharpness interval corresponding to each brightness level respectively according to the feature image set, so as to generate the environment light and sharpness mapping relationship, and each brightness level corresponds to an environment brightness interval.

[0045] In a possible design, the second calibration submodule is specifically configured to:

[0046] At a first feature brightness corresponding to each brightness level, the calibration camera captures images of the defocus calibration area respectively through each first feature lens and each second feature lens to obtain a first feature image set and a second feature image set;

[0047] At a second feature brightness corresponding to each brightness level, the calibration camera captures images of the defocus calibration area respectively through each first feature lens and each second feature lens to obtain a third feature image set and a fourth feature image set;

[0048] The feature image set includes the first feature image set, the second feature image set, the third feature image set and the fourth feature image set obtained at each brightness level, the first feature brightness and the second feature brightness are maximum brightness and minimum brightness in the environment brightness interval respectively, and the degree of each first feature lens is greater than the degree of each second feature lens.

[0049] In a possible design, the third calibration submodule is specifically configured to:

[0050] Based on the first feature image set obtained at each brightness level, the brightness and sharpness of each first feature image are obtained, and the first feature brightness range and the first feature sharpness range at each brightness level are obtained.

[0051] Based on the set of second feature images obtained at each brightness level, the brightness and sharpness of each second feature image are obtained, thus obtaining the second feature brightness range and the second feature sharpness range for each brightness level;

[0052] Based on the set of third feature images obtained at each brightness level, the brightness and sharpness of each third feature image are obtained, and the brightness range and sharpness range of the third feature for each brightness level are obtained.

[0053] Based on the set of fourth feature images obtained at each brightness level, the brightness and sharpness of each fourth feature image are obtained, and the fourth feature brightness range and fourth feature sharpness range of each brightness level are obtained.

[0054] The maximum and minimum brightness values ​​corresponding to each brightness level are obtained based on the first characteristic brightness interval, the second characteristic brightness interval, the third characteristic brightness interval, and the fourth characteristic brightness interval corresponding to each brightness level, so as to obtain the brightness interval corresponding to each brightness level;

[0055] The maximum and minimum sharpness values ​​corresponding to each brightness level are obtained based on the first, second, third, and fourth characteristic sharpness intervals corresponding to each brightness level, so as to obtain the sharpness interval corresponding to each brightness level; the ambient light and sharpness mapping relationship is generated based on the brightness interval and sharpness interval under each brightness level.

[0056] In one possible design, the diopter of each of the first feature lenses increases sequentially, and the center of the calibration camera is aligned with the center of each of the first feature lenses.

[0057] In one possible design, the diopter of each of the second feature lenses decreases sequentially, and the center of the calibration camera is aligned with the center of each of the second feature lenses.

[0058] In one possible design, the acquisition module is specifically used for:

[0059] The full-view pixels are obtained from a starting pixel, and a designated area of a vehicle body of the calibration vehicle is obtained, wherein the full-view pixels fully cover the designated area of the vehicle body;

[0060] The designated area of the vehicle body is divided into unit areas according to the starting pixel and the size of the designated area of the vehicle body;

[0061] A target unit area is obtained, and the target unit area is determined as the defocus calibration area.

[0062] In a possible design, each of the first feature lens and the second feature lens comprises a myopic lens or a hyperopic lens.

[0063] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory connected to the processor in communication;

[0064] The memory stores computer-executable instructions;

[0065] The processor executes the computer-executable instructions stored in the memory to implement any one of the possible defocus detection methods provided in the first aspect.

[0066] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement any one of the possible defocus detection methods provided in the first aspect.

[0067] In a fifth aspect, the present application provides a computer program product, comprising computer-executable instructions, and the computer-executable instructions are executed by a processor to implement any one of the possible defocus detection methods provided in the first aspect.

[0068] The application provides a defocus detection method, device and equipment and a storage medium. The defocus detection method is applied to an electronic outside rearview mirror system. First, the effective ambient brightness, the current brightness and the current definition of the defocus detection area of a target vehicle are obtained by using a camera. Then, the target brightness level corresponding to the effective ambient brightness is determined according to the effective ambient brightness and the ambient light-definition mapping relationship. The ambient light-definition mapping relationship is obtained by defocus calibration of the defocus detection area of the target vehicle. If the current brightness is in the target brightness interval corresponding to the target brightness level and the current definition is in the target definition interval corresponding to the target brightness level, it is determined that the electronic outside rearview mirror system is not defocused. If the current definition is not in the target definition interval, it is determined that the electronic outside rearview mirror system is defocused. Defocus prompt information is generated and reported to the body controller of the target vehicle. The application provides a detection scheme for determining whether the electronic outside rearview mirror system is in a defocused state under different ambient light conditions. When defocus occurs, defocus prompt information is generated to remind the driver. The application ensures that the image obtained by the electronic outside rearview mirror system during driving is clear, improves driving safety, and meets the regulatory requirements. BRIEF DESCRIPTION OF DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0070] Figure 1 An application scenario diagram is provided for the embodiments of the present application.

[0071] Figure 2 A flowchart of a defocus detection method is provided for the embodiments of the present application.

[0072] Figure 3 A defocus calibration flowchart is provided for the embodiments of the present application.

[0073] Figure 4 A camera installation diagram is provided for the embodiments of the present application.

[0074] Figure 5 A camera field of view diagram is provided for the embodiments of the present application.

[0075] Figure 6 A flowchart of generating an ambient light-definition mapping relationship is provided for the embodiments of the present application.

[0076] Figure 7A structural schematic diagram of a defocus detection device provided for an embodiment of the present application is shown in FIG. 1.

[0077] Figure 8 A structural schematic diagram of another defocus detection device provided for an embodiment of the present application is shown in FIG. 2.

[0078] Figure 9 A structural schematic diagram of an electronic device provided for an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION

[0079] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to various alternative embodiments as well. The following description is not limited to the exemplary embodiments, but rather, is applicable to any apparatuses or methods in accordance with the present application, in addition to those explicitly described herein.

[0080] The terms "first", "second", "third", "fourth" and the like in the description and in the claims, where they occur, are used as labels for nouns that they precede, and do not necessarily describe a relationship with, or order of, such terms. It should be understood that the use of such terms is only to distinguish one element from another element, and does not imply a relationship or order between the elements so distinguished. For example, a first element could be discussed as being, for example, "prior to", or "subsequent to", a second element. It should be understood that the use of such language is used herein to merely illustrate the nature of the relationship between a first and a second element, and does not imply a required order or sequence of occurrence between elements so distinguished. Furthermore, the terms "comprise" (and any form of comprise, such as "comprises" and "comprising"), "have" (and any form of have, such as "has" and "having"), "include" (and any form of include, such as "includes" and "including") and the like, are used in the following description and claims to specify the presence of stated features, steps or elements, but they do not preclude the presence or addition of one or more other features, steps, procedures, elements or groups thereof.

[0081] The current camera lens defocus detection scheme is mainly through picture gradient statistical features. Generally, the higher the gradient value, the richer the edge information of the picture, and the clearer the image. If the picture itself has little texture, even if it is not defocused, the gradient statistical information will be very little, and the gradient value measured under different brightness conditions will be different. In the case of overexposure or underexposure, the gradient value is inaccurate. These three reasons all lead to the fact that the detection scheme cannot accurately judge the lens defocus on the CMS.

[0082] To solve the above problems in the prior art, the application provides a defocus detection method, device and equipment and a storage medium. The application provides the application concept of the defocus detection method, which comprises the following steps: first, performing defocus calibration on a defocus calibration area of a calibration vehicle of the same model as a target vehicle to obtain an environment light and definition mapping relationship; and then, based on the environment light and definition mapping relationship, detecting whether the electronic outside rearview mirror system arranged on the target vehicle is defocused. When performing the defocus detection, first, the effective environment brightness and the current brightness and definition of the defocus detection area of the target vehicle are obtained by a camera included in the electronic outside rearview mirror system; then, the target brightness level corresponding to the effective environment brightness is obtained according to the effective environment brightness through the environment light and definition mapping relationship; then, it is determined whether the current brightness of the defocus detection area is in the target brightness interval corresponding to the target brightness level; if yes, it is further determined whether the current definition is in the target definition area corresponding to the target brightness level; if yes, it is indicated that the electronic rearview mirror system arranged on the target vehicle is not defocused; if the current definition is not in the target definition area corresponding to the target brightness level, it is indicated that the electronic rearview mirror system arranged on the target vehicle is defocused, a defocus prompt information is generated, and the defocus prompt information is reported to the body controller of the target vehicle. In addition, if the current brightness is not in the target brightness interval corresponding to the target brightness level, it is indicated that the current brightness obtained is invalid data. After obtaining the environment light and definition mapping relationship by performing defocus calibration on a vehicle of the same model, the defocus of the electronic outside rearview mirror system of all vehicles of the same model can be detected based on the environment light and definition mapping relationship, a defocus detection scheme for the electronic outside rearview mirror system is provided, it is ensured that the images captured by the electronic outside rearview mirror system during driving are clear, and thus the driving safety is improved, and the requirements of regulations for the electronic outside rearview mirror system are met.

[0083] In the following, an exemplary application scenario of the embodiments of the application is introduced.

[0084] Figure 1An application scenario provided by an embodiment of the present application is shown in the figure. The electronic outside rearview mirror system 100 is composed of a high-definition camera, an image sensor, an imaging processor, a display screen and other components. Compared with the traditional rearview mirror, the electronic outside rearview mirror system 100 not only conforms to the aerodynamic design better, but also has a considerable improvement in the visual angle and the night tolerance. The electronic outside rearview mirror system 100 is configured on the vehicle 200 to ensure the safe driving of the vehicle 200. In the application process of the electronic outside rearview mirror system 100, the function of “detecting optical defocus and prompting the user” is a necessary function of the functional safety part of the electronic outside rearview mirror system 100. Moreover, optical defocus will make the image captured by the electronic outside rearview mirror system 100 blurred, the definition reduced, and then affect the driver's observation of the outside rearview field of the vehicle 200, endangering the driving safety. Then, the defocus detection scheme realized by the picture gradient statistical characteristics adopted by the traditional rearview mirror cannot accurately judge the lens defocus condition of the electronic outside rearview mirror system 100 in the application of the electronic outside rearview mirror system 100 due to various reasons.

[0085] In view of this, an embodiment of the present application provides a defocus detection method applied to the electronic outside rearview mirror system 100. For a calibration vehicle 300 of the same model as the vehicle 200, the environmental light and definition mapping relationship is obtained through defocus calibration before leaving the factory, so as to realize the detection of whether the electronic outside rearview mirror system (such as the electronic outside rearview mirror system 100) configured on any vehicle (such as the vehicle 200) of the same model as the calibration vehicle 300 has a defocus condition based on the environmental light and definition mapping relationship, ensure that the images captured by the electronic outside rearview mirror system 100 during driving are clear, improve the driving safety, and at the same time meet the regulatory requirements for the electronic outside rearview mirror system 100.

[0086] It is worth noting that, Figure 1 The vehicle 200 and the calibration vehicle 300 in the above are exemplified by a car. In some embodiments, they can also be various vehicles such as two-wheeled vehicles or three-wheeled vehicles configured with an electronic outside rearview mirror system. The type of vehicle is not limited in the embodiments of the present application. In addition, the above application scenario is only illustrative. The defocus detection method, device, equipment and storage medium provided by the embodiments of the present application include but are not limited to the application in the above application scenario.

[0087] Figure 2 A flowchart of a defocus detection method provided by an embodiment of the present application is shown in the figure. The defocus detection method can be applied to an electronic outside rearview mirror system configured on a target vehicle. As shown in Figure 2 The defocus detection method provided by the embodiment of the present application includes:

[0088] S101: Obtain the effective ambient brightness, and the current brightness and current sharpness of the out-of-focus detection region of the target vehicle.

[0089] The target vehicle is configured with an electronic outside rearview mirror system when it leaves the factory, and the driver of the target vehicle can observe the situation of the outside rearview field of the target vehicle through the outside rearview mirror system. In this step, the electronic outside rearview mirror system can obtain the current brightness and the current sharpness of the out-of-focus detection region of the target vehicle.

[0090] Further, the brightness of the scene environment in which the target vehicle is located, i.e. the current ambient brightness, can also be obtained. However, since the scene environment can appear too dark or too bright, such as almost pure black at night, the electronic outside rearview mirror system needs to obtain the effective ambient brightness for out-of-focus detection. For example, after the electronic outside rearview mirror system obtains the current ambient brightness, it judges the effectiveness of the current ambient brightness. If it is determined to be effective, the effective current ambient brightness is determined as the effective ambient brightness for further execution of subsequent steps. Conversely, if it is determined to be invalid, the current ambient brightness is re-obtained. Alternatively, the judgment of the effectiveness of the current ambient brightness can be realized by setting an effective brightness interval, such as determining that the current ambient brightness is effective if it is within the effective brightness interval, otherwise it is invalid. The effective brightness interval can set an effective brightness maximum value and an effective brightness minimum value according to the actual working conditions to filter the too bright or too dark scene environment.

[0091] In addition, it should be noted that the effective brightness interval can be set according to each ambient brightness interval corresponding to the brightness level in the ambient light and sharpness mapping relationship, so that the effective ambient brightness can be matched to the corresponding brightness level in the ambient light and sharpness mapping relationship.

[0092] The out-of-focus detection region refers to the specified shooting region of the electronic outside rearview mirror system, which is determined by the configuration position of the electronic outside rearview mirror system on the target vehicle, such as the door handle position. The electronic outside rearview mirror system includes a camera, which can shoot the image of the out-of-focus detection region to obtain the to-be-detected image, and then calculate the brightness and sharpness of the to-be-detected image through the imaging processor and other components of the electronic outside rearview mirror system, i.e. to obtain the current brightness (represented as Y value) and the current sharpness (represented as FV value) of the out-of-focus detection region. The camera is also used to collect the current ambient brightness.

[0093] S102: Determine the target brightness level corresponding to the effective ambient brightness according to the effective ambient brightness and the ambient light and sharpness mapping relationship.

[0094] The environment light and sharpness mapping relationship is obtained by defocusing calibration on a defocusing calibration region of a calibration vehicle, and the calibration vehicle and the target vehicle are the same type of vehicle. The environment light and sharpness mapping relationship is obtained by defocusing calibration on a defocusing calibration region of a calibration vehicle, and the calibration vehicle and the target vehicle are the same type of vehicle. For the target vehicle belonging to the same type of vehicle as the calibration vehicle, the defocusing calibration region of the calibration vehicle is defocused and calibrated to obtain the environment light and sharpness mapping relationship. The environment light and sharpness mapping relationship includes the respective brightness intervals and sharpness intervals corresponding to each brightness level. Each brightness level corresponds to an environment brightness interval. In addition, the defocusing calibration region of the calibration vehicle and the defocusing detection region of the target vehicle are the same region for the same type of vehicle.

[0095] Therefore, after obtaining the effective environment brightness, the current brightness and the current sharpness of the defocusing detection region of the target vehicle, the effective environment brightness corresponding brightness level can be determined according to the effective environment brightness, specifically, the environment brightness interval in which the effective environment brightness is located, and the target brightness level corresponding to the environment brightness interval is the target brightness level corresponding to the effective environment brightness. Then, based on the target brightness level corresponding to the effective environment brightness, the environment light and sharpness mapping relationship is used to query the brightness interval and the sharpness interval corresponding to the target brightness level, that is, the target brightness interval corresponding to the target brightness level and the target sharpness interval corresponding to the target brightness level. The environment light and sharpness mapping relationship includes the brightness interval and the sharpness interval corresponding to each brightness level.

[0096] In the environment light and sharpness mapping relationship, different brightness levels correspond to different environment brightnesses, and each environment brightness refers to the brightness of the scene environment of the calibration vehicle. In order to ensure the accuracy of the environment light and sharpness mapping relationship, a brightness tolerance is set for each environment brightness, that is, each brightness level corresponds to an environment brightness with a brightness range, that is, each brightness level corresponds to an environment brightness interval [EV min , EV max ].

[0097] S103: Determine whether the current brightness is in the target brightness interval corresponding to the target brightness level.

[0098] Determine whether the current brightness obtained is in the target brightness interval determined in step S102, for example, determine whether the current brightness is greater than or equal to the minimum value of the target brightness interval and less than or equal to the maximum value of the target brightness interval. If yes, it means that the current brightness is in the target brightness interval, and step S104 is further executed, that is, it is determined whether the current sharpness obtained is in the target sharpness interval determined in step S102. If no, it means that the current brightness is not in the target brightness interval, which may occur when the defocusing detection region is considered to be blocked or blocked by other objects, and step S107 is executed to prevent defocusing misjudgment.

[0099] S104: Determine whether the current definition is in the target definition interval corresponding to the target brightness level.

[0100] After determining that the current brightness is in the target brightness interval, it is further determined whether the current definition is in the target definition interval, such as determining whether the current definition is greater than or equal to the minimum value of the target definition interval and less than or equal to the maximum value of the target definition interval. If the result is yes, the current definition is in the target definition interval, it is determined that the electronic outside rearview mirror system is not out of focus, i.e. step S106, and then the next out-of-focus detection is continued, i.e. step S101 is executed. Otherwise, if the result is no, i.e. it is determined that the current brightness is in the target brightness interval but the current definition is not in the target definition interval, it indicates that the electronic outside rearview mirror system is out of focus, and step S105 is further executed.

[0101] S105: Generate an out-of-focus prompt information and report the out-of-focus prompt information to the body controller of the target vehicle.

[0102] After the determination of steps S103 and S104, it is determined that the current brightness is in the target brightness interval, but the current definition is not in the target definition interval, which indicates that the electronic outside rearview mirror system is out of focus. The out-of-focus prompt information is generated and reported to the body controller of the target vehicle, so that the body controller knows that the electronic outside rearview mirror system is currently out of focus and reminds the driver. Optionally, the electronic outside rearview mirror system can report the out-of-focus prompt information through CAN communication, and the content of the out-of-focus prompt information is not limited in the embodiments of the present application.

[0103] S106: Determine that the electronic outside rearview mirror system is not out of focus.

[0104] After the determination of steps S103 and S104, if the current brightness is in the target brightness interval and the current definition is in the target definition interval, it indicates that the electronic outside rearview mirror system is not out of focus, and then the next out-of-focus detection is performed, i.e. step S101 is executed.

[0105] S107: Generate an invalid prompt information.

[0106] The invalid prompt information is used to represent that the current brightness is invalid.

[0107] In the determination of step S103, if it is determined that the current brightness is not in the target brightness interval, it indicates that the current brightness is invalid, and it is not necessary to further determine whether the current definition is in the target definition interval. For example, an invalid prompt information can be generated to represent that the collected current brightness is invalid, and step S101 is re-executed to reacquire the valid ambient brightness and the current brightness and the current definition.

[0108] It can be known from the above embodiment description that, by defocusing calibration on the defocusing calibration region of the calibration vehicle, the environment light and the sharpness mapping relationship is obtained, and then the target brightness level corresponding to the effective environment brightness is obtained based on the environment light and the sharpness mapping relationship, and then it is judged whether the current brightness of the defocusing detection region of the target vehicle is in the target brightness interval corresponding to the target brightness level, and whether the current sharpness is in the target sharpness interval corresponding to the target brightness level, if both are in, it indicates that the electronic outside rearview mirror system is not defocused; if the former is yes and the latter is no, it indicates that the electronic outside rearview mirror system is defocused, and then a defocusing prompt information is generated and reported to the body controller of the target vehicle; if the former is no, the latter does not need to be further executed, that is, it is determined that the current brightness is invalid. A defocusing detection method is provided for the electronic outside rearview mirror system. Among them, only one vehicle needs to be defocused to obtain the environment light and the sharpness mapping relationship, and then based on the environment light and the sharpness mapping relationship, the detection of whether the electronic outside rearview mirror system is defocused can be completed for any vehicle of the same type as the vehicle that has been defocused, so that the defocusing detection method can be widely used in the field of vehicle defocusing detection. And, the environment light and the sharpness mapping relationship obtained by defocusing calibration includes the brightness interval and the sharpness interval corresponding to each brightness level, so that different brightness scene environments can use the defocusing detection method provided by the embodiment of the application, increase the fault tolerance, prevent misjudgment, and improve the detection accuracy. In addition, after determining that the electronic outside rearview mirror system is defocused, a defocusing prompt information is generated and reported to the body controller of the target vehicle, so that the electronic outside rearview mirror system has the functions of detecting optical defocusing and improving user safety, and ensures driving safety.

[0109] The defocusing detection method provided by the embodiment of the application is applied to the electronic outside rearview mirror system, and the effective environment brightness, the current brightness and the current sharpness of the defocusing detection region of the target vehicle are first acquired, and then the target brightness level corresponding to the effective environment brightness is determined according to the effective environment brightness and the environment light and the sharpness mapping relationship, wherein the environment light and the sharpness mapping relationship is obtained by defocusing calibration on the defocusing detection region of the target vehicle. If it is determined that the current brightness is in the target brightness interval corresponding to the target brightness level and the current sharpness is in the target sharpness interval corresponding to the target brightness level, it is determined that the electronic outside rearview mirror system is not defocused. On the contrary, if it is determined that the current brightness is in the target brightness interval but the current sharpness is not in the target sharpness interval, it indicates that the electronic outside rearview mirror system is defocused, a defocusing prompt information is generated and reported to the body controller of the target vehicle. A detection scheme for whether the electronic outside rearview mirror system is in a defocused state under different environment light is provided, a defocusing prompt information is generated when defocusing to remind the driver, to ensure that the image obtained through the electronic outside rearview mirror system during driving is clear, to improve driving safety, and to make the electronic outside rearview mirror system meet the regulatory requirements.

[0110] In a possible design, before step S102, the defocus detection method provided in the embodiments of the present application can further include the following steps as shown in Figure 3 Figure 3 The defocus calibration of the defocus calibration area of the calibration vehicle can obtain the ambient light and the clarity mapping relationship. As shown in Figure 3

[0111] S201: determining a defocus calibration area of a calibration vehicle according to full field of view pixels of a calibration camera.

[0112] The defocus calibration area of the calibration vehicle is determined based on the field of view of the calibration camera 10. The installation schematic diagram of the calibration camera 10 is as shown in Figure 4 For example, the calibration camera 10 is fixedly installed through the clamping slot 11, and the installation position of the calibration camera 10 is fixed and the angle and height are not adjustable. In the normal installation condition, the shooting area of the calibration camera 10 can cover the specified area of the vehicle body of the calibration vehicle, and the specified area of the vehicle body of the calibration vehicle includes the defocus calibration area.

[0113] In a possible design, the possible implementation of step S201 includes the following steps.

[0114] First, the corresponding starting pixel is set according to the full field of view pixels of the calibration camera, and the specified area of the vehicle body of the calibration vehicle is obtained. The field of view area corresponding to the full field of view pixels of the calibration camera can fully cover the specified area of the vehicle body. Then, the specified area of the vehicle body is divided into average regions according to the starting pixel and the size of the specified area of the vehicle body, to obtain each unit region. Then, a plurality of adjacent unit regions are selected from the each unit region, and the selected plurality of adjacent unit regions are target unit regions. Then, the target unit regions are determined as the defocus calibration area, and the calibration camera shoots the defocus calibration area.

[0115] For example, the full field of view pixels of the calibration camera 10 are 1920*1080, as shown in Figure 5 ​​If the full field of view of the calibration camera 10 is shown, the start pixel (StartX, StartY) can be set as (1420, 0), and a designated area of the vehicle body, such as a designated area of the vehicle body with a size (width, height) = (500, 1080), can be selected. Then, the designated area of the vehicle body can be divided into 5 columns and 8 rows according to the start pixel and the size of the designated area of the vehicle body, and each pixel area with a size of 100*135 obtained by the division is a unit area. Several adjacent unit areas are selected as the defocus calibration area. It can be understood that the full field of view pixel, the start pixel, and the average area division can be set according to specific conditions in actual working conditions, and the designated area of the vehicle body is determined according to the configuration position of the electronic outside rearview mirror system on the vehicle during production of the vehicle. For example, as shown in Figure 5 the outside rearview field of view area 201 of the calibration vehicle (as shown by the black dashed box in Figure 5 ) is the designated area of the vehicle body, which is divided into 5 columns and 8 rows, for example, to obtain each unit area (as shown by the area filled with "0" and "1" in Figure 5 ), and four adjacent unit areas filled with "1" are selected as the defocus calibration area 2011 (as shown by the black solid box in Figure 5 ), to complete the determination of the defocus calibration area of the calibration vehicle.

[0116] S202: Capture feature images of the defocus calibration area under multiple brightness levels by the calibration camera to obtain a feature image set.

[0117] As shown in Figure 4 and Figure 5 , the calibration camera 10 is fixed and arranged by the clamping slot 11, and the arrangement position is fixed and the angle and height are not adjustable. In the normal arrangement, the full field of view of the calibration camera 10 when shooting is shown in Figure 5 . The image of the defocus calibration area 2011 can be captured by the calibration camera 10. In order to simulate different brightness scenarios that the target vehicle encounters during normal driving, a solar simulator can simulate multiple brightness levels corresponding to the environmental brightness. The calibration camera 10 captures the defocus calibration area 2011 under the environmental brightness corresponding to each brightness level to obtain the feature images of the defocus calibration area, thereby forming a feature image set. The feature image set is a set of feature images under the environmental brightness corresponding to each brightness level.

[0118] In some embodiments, the possible implementation of step S202 includes:

[0119] Referring to Figure 4 and Figure 5As shown, under the ambient brightness corresponding to each brightness level, the calibration camera 10 transmits the defocus calibration area 2011 through the feature lens 12 to take a picture, and by adjusting the power of the feature lens 12, the calibration camera 10 can change the clarity of the image taken by the defocus calibration area 2011. Since the ambient brightness corresponding to each brightness level is set with a brightness tolerance, that is, each brightness level corresponds to an ambient brightness interval, therefore, the defocus calibration area 2011 is taken under the ambient brightness corresponding to each brightness level, which can be taken under the first feature brightness and the second feature brightness corresponding to each brightness level. Wherein, the first feature brightness corresponding to each brightness level refers to the maximum brightness EVmaxin the ambient brightness interval corresponding to each brightness level. max The second feature brightness corresponding to each brightness level refers to the minimum brightness EVminin the ambient brightness interval corresponding to each brightness level.

[0120] For example, under the first feature brightness corresponding to each brightness level, the calibration camera 10 transmits the defocus calibration area 2011 through each first feature lens to take a picture, and sequentially obtains each first feature image. Wherein, the power of each first feature lens can be sequentially increased, and the calibration camera 10 transmits each first feature lens to take a picture, and the shooting effect obtained is different. For example, the power of the first feature lens is sequentially increased from 0 degree, and a first feature lens is replaced every 50 degrees, when the power is increased to a certain degree, the first shooting effect obtained may change from clear to blurred, when the first shooting effect changes, such as from gradually clear to suddenly blurred, or the first shooting effect reaches the first preset effect, the shooting through the first feature lens under the first feature brightness is stopped. Each first feature image obtained under the first feature brightness corresponding to each brightness level constitutes a first feature image set. The first preset effect can be observed by the naked eye, or a first preset clarity can be set, which is not limited by the embodiments of the present application. In addition, when the calibration camera 10 takes a picture, the center of the calibration camera is aligned with the center of each first feature lens, and each first feature lens can be fixed by the support 13 as shown, and the distance l between the support 13 and the calibration camera 10 is kept unchanged. Figure 4 As shown, the support 13 is fixed, and the distance l between the support 13 and the calibration camera 10 is kept unchanged.

[0121] Meanwhile, at the first characteristic brightness corresponding to each brightness level, the image of the out-of-focus calibration area 2011 is captured by the calibration camera 10 through each second characteristic lens respectively, and each second characteristic image is obtained in turn. The power of each second characteristic lens can decrease in turn, and the calibration camera 10 captures the image through each second characteristic lens, and the capturing effect obtained is different. For example, the first characteristic lens is from 0 degree and increases in turn, and correspondingly, the power of the second characteristic lens decreases from 0 degree in turn, and a second characteristic lens is replaced every 50 degrees of decrease. When the power decreases to a certain degree, the second capturing effect obtained may change from blurred to clear. When the second capturing effect changes and reaches the second preset effect, the capturing through the second characteristic lens at the first characteristic brightness is stopped. Each second characteristic image obtained by capturing at the first characteristic brightness corresponding to each brightness level constitutes a second characteristic image set. The second preset effect can be observed by the naked eye, or a second preset clarity can be set, which is not limited by the embodiments of the present application. In addition, when the calibration camera 10 captures the image, the center of the calibration camera 10 is aligned with the center of each second characteristic lens, and each second characteristic lens can be fixed by the support 13 as shown in Figure 4 The power of the first characteristic lens is greater than the power of each second characteristic lens. It can be seen that the characteristic lens 12 includes each first characteristic lens and each second characteristic lens, the support 13 is used to fix the characteristic lens 12, each first characteristic lens and each second characteristic lens can be myopic lens or hyperopic lens, and the power coverage range of the characteristic lens 12 can be set according to the actual working condition, for example, it can be -300 degrees to 300 degrees, and the power difference of each characteristic lens is not limited by the embodiments of the present application, and the power difference is described by taking 50 degrees as an example.

[0122] At this point, by capturing the out-of-focus calibration area through each first characteristic lens and each second characteristic lens at the first characteristic brightness corresponding to each brightness level, the first characteristic image set and the second characteristic image set can be obtained correspondingly. Correspondingly, the third characteristic image set and the fourth characteristic image set can be obtained by using the same way as above at the second characteristic brightness corresponding to each brightness level, wherein the third characteristic image set is composed of each third characteristic image, and the fourth characteristic image set is composed of each fourth characteristic image.

[0123] For example, at the second characteristic brightness corresponding to each luminance level, the calibration camera 10 respectively captures the image of the out-of-focus calibration area 2011 through each first characteristic lens, and sequentially obtains each third characteristic image. The power of each first characteristic lens can be sequentially increased, and the calibration camera 10 captures the image through each first characteristic lens, and the obtained capturing effect is different. For example, the power of the first characteristic lens is sequentially increased from 0 degree, and a first characteristic lens is replaced every 50 degrees. When the power is increased to a certain degree, the third capturing effect obtained may change from clear to blurred. When the third capturing effect changes, for example, when the third capturing effect changes from gradually clear to suddenly blurred or the third capturing effect reaches a third preset effect, the capturing through the first characteristic lens at the second characteristic brightness is stopped. The third characteristic images obtained at the second characteristic brightness corresponding to each luminance level form a third characteristic image set. The third preset effect can be observed by the naked eye, or a third preset clarity can be set, which is not limited in the embodiments of the present application. In addition, when the calibration camera 10 captures the image, the center of the calibration camera is aligned with the center of each first characteristic lens. Each first characteristic lens can be fixed by the support 13 as shown in FIG. 1, and the distance l between the support 13 and the calibration camera 10 is kept unchanged. Figure 4

[0124] At the same time, at the second characteristic brightness corresponding to each luminance level, the calibration camera 10 respectively captures the image of the out-of-focus calibration area 2011 through each second characteristic lens, and sequentially obtains each fourth characteristic image. The power of each second characteristic lens can be sequentially decreased, and the calibration camera 10 captures the image through each second characteristic lens, and the obtained capturing effect is different. For example, the power of the first characteristic lens is sequentially increased from 0 degree, and the power of the second characteristic lens is sequentially decreased from 0 degree. A second characteristic lens is replaced every 50 degrees. When the power is decreased to a certain degree, the second capturing effect obtained may change from blurred to clear. When the fourth capturing effect changes or the fourth capturing effect reaches a fourth preset effect, the capturing through the second characteristic lens at the second characteristic brightness is stopped. The fourth characteristic images obtained at the second characteristic brightness corresponding to each luminance level form a fourth characteristic image set. The fourth preset effect can be observed by the naked eye, or a fourth preset clarity can be set, which is not limited in the embodiments of the present application. In addition, when the calibration camera 10 captures the image, the center of the calibration camera 10 is aligned with the center of each second characteristic lens. Each second characteristic lens can be fixed by the support 13 as shown in FIG. 1, and the distance l between the support 13 and the calibration camera 10 is kept unchanged. Figure 4

[0125] At this point, the images at the first characteristic brightness and the second characteristic brightness corresponding to each luminance level are obtained, and a characteristic image set is formed. ​​

[0126] S203: Obtain the luminance interval and the sharpness interval corresponding to each luminance level respectively according to the feature image set, to generate the ambient light and sharpness mapping relationship.

[0127] Each luminance level corresponds to an ambient luminance interval, and each ambient luminance interval corresponds to a maximum luminance, i.e., a first feature luminance, and a minimum luminance, i.e., a second feature luminance. For example, there are 10 luminance levels, and each luminance level corresponds to an ambient luminance interval (as shown in the first column of Table 1). Based on the first feature image set, the second feature image set, the third feature image set, and the fourth feature image set obtained under each luminance level obtained in step S202, the luminance interval and the sharpness interval corresponding to each luminance level are obtained, to generate the ambient light and sharpness mapping relationship as shown in Table 1. As shown in Table 1, the ambient light and sharpness mapping relationship includes the luminance interval and the sharpness interval corresponding to each luminance level.

[0128] Table 1

[0129]

[0130] In a possible design, the possible implementation of step S203 can be as shown in Figure 6 . Figure 6 A flowchart for generating an ambient light and sharpness mapping relationship is provided in an embodiment of the present application. As shown in Figure 6 , the embodiment of the present application includes:

[0131] S301: Obtain the feature luminance and the feature sharpness of each first feature image according to the first feature image set obtained under each luminance level, to obtain the first feature luminance interval and the first feature sharpness interval of each luminance level.

[0132] For the image obtained by transmitting the first feature lens under the first feature luminance corresponding to each luminance level, i.e., each first feature image in the first feature image set, the luminance and the sharpness of each first feature image are obtained, a luminance interval is formed according to the luminance of each first feature image obtained, and the luminance interval is determined as the first feature luminance interval, which refers to the luminance interval in which the luminance of each first feature image is located. Correspondingly, a sharpness interval is obtained according to the sharpness of each first feature image obtained, and the sharpness interval is determined as the first feature sharpness interval, which refers to the sharpness interval in which the sharpness of each first feature image is located.

[0133] S302: Obtain the luminance and the sharpness of each second feature image according to the second feature image set obtained under each luminance level, to obtain the second feature luminance interval and the second feature sharpness interval of each luminance level.

[0134] For each second feature image in the second feature image set, the brightness and the sharpness of each second feature image are obtained. According to the brightness of each second feature image, a brightness interval is formed, and the brightness interval is determined as the second feature brightness interval. The second feature brightness interval refers to the brightness interval in which the brightness of each second feature image is located. Correspondingly, according to the sharpness of each second feature image, a sharpness interval is obtained, and the sharpness interval is determined as the second feature sharpness interval. The second feature sharpness interval refers to the sharpness interval in which the sharpness of each second feature image is located.

[0135] S303: The brightness and the sharpness of each third feature image are obtained according to the third feature image set obtained under each brightness level. The third feature brightness interval and the third feature sharpness interval of each brightness level are obtained.

[0136] For each third feature image in the third feature image set, the brightness and the sharpness of each third feature image are obtained. According to the brightness of each third feature image, a brightness interval is formed, and the brightness interval is determined as the third feature brightness interval. The third feature brightness interval refers to the brightness interval in which the brightness of each third feature image is located. Correspondingly, according to the sharpness of each third feature image, a sharpness interval is obtained, and the sharpness interval is determined as the third feature sharpness interval. The third feature sharpness interval refers to the sharpness interval in which the sharpness of each third feature image is located.

[0137] S304: The brightness and the sharpness of each fourth feature image are obtained according to the fourth feature image set obtained under each brightness level. The fourth feature brightness interval and the fourth feature sharpness interval of each brightness level are obtained.

[0138] For each fourth feature image in the fourth feature image set, the brightness and the sharpness of each fourth feature image are obtained. According to the brightness of each fourth feature image, a brightness interval is formed, and the brightness interval is determined as the fourth feature brightness interval. The fourth feature brightness interval refers to the brightness interval in which the brightness of each fourth feature image is located. Correspondingly, according to the sharpness of each fourth feature image, a sharpness interval is obtained, and the sharpness interval is determined as the fourth feature sharpness interval. The fourth feature sharpness interval refers to the sharpness interval in which the sharpness of each fourth feature image is located.

[0139] S305: Obtain the maximum luminance value and the minimum luminance value corresponding to each luminance level according to the first characteristic luminance interval, the second characteristic luminance interval, the third characteristic luminance interval and the fourth characteristic luminance interval corresponding to each luminance level, to obtain the luminance interval corresponding to each luminance level.

[0140] S306: Obtain the maximum sharpness value and the minimum sharpness value corresponding to each luminance level according to the first characteristic sharpness interval, the second characteristic sharpness interval, the third characteristic sharpness interval and the fourth characteristic sharpness interval corresponding to each luminance level, to obtain the sharpness interval corresponding to each luminance level.

[0141] For luminance, each luminance level corresponds to four luminance intervals, namely the first characteristic luminance interval, the second characteristic luminance interval, the third characteristic luminance interval and the fourth characteristic luminance interval. A maximum luminance value and a minimum luminance value are obtained from the four luminance intervals. The obtained maximum luminance value is the maximum luminance value corresponding to the current luminance level, and the obtained minimum luminance value is the minimum luminance value corresponding to the current luminance level. According to the maximum luminance value and the minimum luminance value, the luminance interval corresponding to the current luminance level is obtained.

[0142] For sharpness, each luminance level also corresponds to four sharpness intervals, namely the first characteristic sharpness interval, the second characteristic sharpness interval, the third characteristic sharpness interval and the fourth characteristic sharpness interval. A maximum sharpness value and a minimum sharpness value are obtained from the four sharpness intervals. The obtained maximum sharpness value is the maximum sharpness value corresponding to the current sharpness level, and the obtained minimum sharpness value is the minimum sharpness value corresponding to the current sharpness level. According to the maximum sharpness value and the minimum sharpness value, the sharpness interval corresponding to the current luminance level is obtained.

[0143] For example, four luminance intervals and four sharpness intervals for the luminance level of 0 are obtained through steps S301 to S304. A maximum luminance value (Y0max) and a minimum luminance value (Y0min) are obtained from the four luminance intervals, and a maximum sharpness value (FV0max) and a minimum sharpness value (FV0min) are obtained from the four sharpness intervals. Then, the luminance interval ([Y0min, Y0max]) and the sharpness interval ([FV0min, FV0max]) for the luminance level of 0 are obtained. Similarly, the luminance intervals and the sharpness intervals for other corresponding luminance levels are obtained, that is, the values in the third column (luminance interval) and the fourth column (sharpness interval) in Table 1 are obtained for each luminance level shown in the second column in Table 1.

[0144] S307: generating the ambient light and sharpness mapping relationship according to the luminance interval under each luminance level and the sharpness interval under each luminance level.

[0145] Based on each luminance level (as shown in the second column of Table 1) and the ambient luminance interval corresponding to each luminance level (as shown in the first column of Table 1), the luminance interval (as shown in the third column of Table 1) and the sharpness interval (as shown in the fourth column of Table 1), the ambient light and sharpness mapping relationship under each luminance level shown in Table 1 is constructed, and the generation process of the ambient light and sharpness mapping relationship is completed.

[0146] At this point, the defocus calibration of the defocus calibration region of the calibration vehicle is completed through the steps shown in Figure 3 , and the ambient light and sharpness mapping relationship is obtained.

[0147] In the embodiments of the present application, since the camera of the electronic outside rearview mirror system is a fixed focus lens, it cannot simulate the defocus effect by zooming, so the defocus effect is simulated by replacing the characteristic lens power in a convenient and fast way when performing defocus calibration, and the upper / lower limit values of luminance and sharpness corresponding to defocus are obtained. At the same time, the effectiveness of the defocus detection method provided by the present application can also be verified by replacing the characteristic lens. In addition, a plurality of ambient luminances can be simulated by a sunlight simulator to obtain characteristic images under different ambient luminances, and an ambient light and sharpness mapping relationship is established to adapt to the use of the defocus detection method in different scenes, increase the fault tolerance rate, and prevent misjudgment. In addition, since the installation position of the electronic outside rearview mirror system is consistent for vehicles of the same type, it is only necessary to perform defocus calibration on one vehicle, i.e. the calibration vehicle, and the ambient light and sharpness mapping relationship obtained by defocus calibration is built into the corresponding functional module of all other target vehicles of the same type as the calibration vehicle. Thus, the defocus detection method provided by the present application can be used to detect whether the electronic outside rearview mirror system of the target vehicle is defocused, without the need to repeatedly perform defocus calibration. The functional module may, for example, be an electronic outside rearview mirror system, or it may be another corresponding unit of the target vehicle that has data processing capability.

[0148] Figure 7 A structure diagram of a defocus detection device provided by an embodiment of the present application is shown in Figure 7 , which can be applied to an electronic outside rearview mirror system. As shown in , the defocus detection device 400 provided by the present application includes:

[0149] An acquisition module 401, configured to acquire an effective ambient luminance and a current luminance and a current sharpness of a target vehicle defocus detection region.

[0150] The first processing module 402 is used to determine the target brightness level corresponding to the effective ambient brightness based on the effective ambient brightness and the mapping relationship between ambient light and sharpness. The mapping relationship between ambient light and sharpness is obtained by defocusing the defocused calibration area of ​​the calibration vehicle. The calibration vehicle and the target vehicle are the same model of vehicle.

[0151] The second processing module 403 is used to determine that the electronic exterior rearview mirror system is not out of focus if it is determined that the current brightness is within the target brightness range corresponding to the target brightness level and the current clarity is within the target clarity range corresponding to the target brightness level.

[0152] In one possible design, the second processing module 403 is also used for:

[0153] If it is determined that the current brightness is within the target brightness range but the current sharpness is not within the target sharpness range, a defocusing warning message is generated and reported to the body controller of the target vehicle.

[0154] If it is determined that the current brightness is not within the target brightness range, an invalid prompt message is generated. The invalid prompt message is used to indicate that the current brightness is invalid.

[0155] exist Figure 7 On this basis, Figure 8 This is a schematic diagram of another defocus detection device provided in an embodiment of this application, as shown below. Figure 8 As shown, the defocus detection device 400 provided in this embodiment of the application further includes: a calibration module 404; the calibration module 404 includes:

[0156] The first calibration submodule is used to determine the out-of-focus calibration area of ​​the calibration vehicle based on the full field of view pixels of the calibration camera. The out-of-focus calibration area and the out-of-focus detection area are the same area of ​​the same model of vehicle.

[0157] The second calibration submodule is used to capture feature images of the out-of-focus calibration area at multiple brightness levels using a calibration camera, and obtain a set of feature images.

[0158] The third calibration submodule is used to obtain the brightness range and sharpness range corresponding to each brightness level based on the feature image set, so as to generate the mapping relationship between ambient light and sharpness. Each brightness level corresponds to an ambient brightness range.

[0159] In one possible design, the second calibration submodule is specifically used for:

[0160] At the first characteristic brightness corresponding to each brightness level, the image of the out-of-focus calibration area is captured by the calibration camera through each first characteristic lens and each second characteristic lens to obtain the first characteristic image set and the second characteristic image set.

[0161] At the second characteristic brightness corresponding to each luminance level, images of the defocus calibration area are captured through each first characteristic lens and each second characteristic lens respectively by the calibration camera to obtain a third characteristic image set and a fourth characteristic image set;

[0162] The characteristic image set includes the first characteristic image set, the second characteristic image set, the third characteristic image set and the fourth characteristic image set obtained at each luminance level, the first characteristic brightness and the second characteristic brightness are maximum brightness and minimum brightness in the environmental brightness interval respectively, and the power of each first characteristic lens is greater than the power of each second characteristic lens.

[0163] In a possible design, the third calibration submodule is specifically configured to:

[0164] The luminance and the definition of each first characteristic image are obtained according to the first characteristic image set obtained at each luminance level to obtain a first characteristic luminance interval and a first characteristic definition interval of each luminance level.

[0165] The luminance and the definition of each second characteristic image are obtained according to the second characteristic image set obtained at each luminance level to obtain a second characteristic luminance interval and a second characteristic definition interval of each luminance level.

[0166] The luminance and the definition of each third characteristic image are obtained according to the third characteristic image set obtained at each luminance level to obtain a third characteristic luminance interval and a third characteristic definition interval of each luminance level.

[0167] The luminance and the definition of each fourth characteristic image are obtained according to the fourth characteristic image set obtained at each luminance level to obtain a fourth characteristic luminance interval and a fourth characteristic definition interval of each luminance level.

[0168] The maximum luminance and the minimum luminance corresponding to each luminance level are obtained according to the first characteristic luminance interval, the second characteristic luminance interval, the third characteristic luminance interval and the fourth characteristic luminance interval corresponding to each luminance level to obtain a luminance interval corresponding to each luminance level.

[0169] The maximum definition and the minimum definition corresponding to each luminance level are obtained according to the first characteristic definition interval, the second characteristic definition interval, the third characteristic definition interval and the fourth characteristic definition interval corresponding to each luminance level to obtain a definition interval corresponding to each luminance level, and the ambient light and definition mapping relationship is generated according to the luminance interval at each luminance level and the definition interval at each luminance level.

[0170] In a possible design, the power of each first characteristic lens is sequentially increased, and the center of the calibration camera is aligned with the center of each first characteristic lens.

[0171] In a possible design, the powers of each second feature lens are sequentially decreased, and the center of the calibration camera is aligned with the center of each second feature lens.

[0172] In a possible design, the acquisition module 401 is specifically configured to:

[0173] The starting pixel is acquired according to the full-view pixel, and a body specified area of the calibration vehicle is acquired, where the field of view area corresponding to the full-view pixel fully covers the body specified area.

[0174] The body specified area is divided into unit areas according to the starting pixel and the size of the body specified area.

[0175] The target unit area is acquired, and the target unit area is determined as the defocus calibration area.

[0176] In a possible design, each first feature lens and each second feature lens includes a myopic lens or a hyperopic lens.

[0177] The defocus detection device provided in the embodiments of the present application can perform the corresponding steps of the defocus detection method provided in the method embodiments, and the implementation principles and technical effects are similar, which will not be described here again.

[0178] Figure 9 A structural schematic diagram of an electronic device provided in the embodiments of the present application is shown in FIG. 5. Figure 9 As shown in FIG. 5, the electronic device 500 can include a processor 501 and a memory 502 connected with the processor 501.

[0179] The memory 502 is configured to store a program. Specifically, the program can include program code, and the program code includes computer execution instructions.

[0180] The memory 502 can include a high-speed RAM memory, and can also include a non-volatile memory (NoN-volatile memory), for example, at least one disk memory.

[0181] The processor 501 is configured to execute the computer execution instructions stored in the memory 502, so as to implement the defocus detection method.

[0182] The processor 501 can be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0183] Optionally, the memory 502 can be independent or integrated with the processor 501. When the memory 502 is independent of the processor 501, the electronic device 500 can further include:

[0184] A bus 503 is used to connect the processor 501 and the memory 502. The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like, but does not mean that there is only one bus or one type of bus.

[0185] Optionally, in a specific implementation, if the memory 502 and the processor 501 are integrated on a chip, the memory 502 and the processor 501 can communicate through an internal interface.

[0186] The application further provides a computer readable storage medium, which can include a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes, and specifically, the computer readable storage medium stores computer execution instructions, and the computer execution instructions are used for the method in the above embodiments.

[0187] The application further provides a computer program product, which includes computer execution instructions, and the computer instructions are executed by a processor to implement the method in the above embodiments.

[0188] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The application is intended to cover any variations, uses or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the application is indicated by the appended claims.

[0189] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.

Claims

1. A method for detecting defocusing, characterized in that, Applications in electronic exterior rearview mirror systems include: The current ambient brightness is obtained, and it is determined whether the current ambient brightness is within a preset effective brightness range. The effective brightness range is used to filter out scenes that are too bright or too dark. The effective brightness range includes: the minimum effective brightness value and the maximum effective brightness value. If the current ambient brightness is within the effective brightness range, then the current ambient brightness is determined as the effective ambient brightness; if the current ambient brightness is not within the effective brightness range, then the current ambient brightness is re-acquired. Obtain the current brightness and current sharpness of the out-of-focus detection area of ​​the target vehicle; The target brightness level corresponding to the effective ambient brightness is determined based on the effective ambient brightness and the mapping relationship between ambient light and sharpness. The mapping relationship between ambient light and sharpness is obtained by defocusing the defocused calibration area of ​​the calibration vehicle. The calibration vehicle and the target vehicle are the same model of vehicle. The mapping relationship between ambient light and sharpness includes: the brightness range and sharpness range corresponding to each brightness level. Each brightness level corresponds to an ambient brightness range. If it is determined that the current brightness is within the target brightness range corresponding to the target brightness level and the current clarity is within the target clarity range corresponding to the target brightness level, then it is determined that the electronic exterior rearview mirror system is not out of focus.

2. The defocusing detection method according to claim 1, characterized in that, If it is determined that the current brightness is within the target brightness range but the current sharpness is not within the target sharpness range, a defocusing prompt message is generated and the defocusing prompt message is reported to the body controller of the target vehicle. If it is determined that the current brightness is not within the target brightness range, an invalid prompt message is generated, which is used to indicate that the current brightness is invalid.

3. The defocusing detection method according to claim 1, characterized in that, Before determining the target brightness level corresponding to the effective ambient brightness based on the effective ambient brightness and the mapping relationship between ambient light and sharpness, the method further includes: The out-of-focus calibration area of ​​the calibration vehicle is determined based on the full field of view pixels of the calibration camera, and the out-of-focus calibration area and the out-of-focus detection area are the same area of ​​the same model of vehicle; The calibration camera captures feature images of the out-of-focus calibration area at multiple brightness levels to obtain a set of feature images. The brightness range and sharpness range corresponding to each brightness level are obtained from the feature image set to generate the ambient light and sharpness mapping relationship, wherein each brightness level corresponds to an ambient brightness range.

4. The defocusing detection method according to claim 3, characterized in that, The feature image set is obtained by capturing feature images of the out-of-focus calibration area at multiple brightness levels using the calibration camera, including: Under the first characteristic brightness corresponding to each brightness level, the calibration camera captures images of the out-of-focus calibration area through each first characteristic lens and each second characteristic lens, respectively, to obtain a first characteristic image set and a second characteristic image set. At the second characteristic brightness corresponding to each brightness level, the calibration camera captures images of the out-of-focus calibration area through each first characteristic lens and each second characteristic lens, respectively, to obtain a third characteristic image set and a fourth characteristic image set. The feature image set includes the first feature image set, the second feature image set, the third feature image set, and the fourth feature image set obtained at each brightness level. The first feature brightness and the second feature brightness are the maximum brightness and minimum brightness in the ambient brightness range, respectively. The power of each first feature lens is greater than the power of each second feature lens.

5. The defocusing detection method according to claim 4, characterized in that, The step of obtaining the brightness range and sharpness range corresponding to each brightness level based on the feature image set to generate the ambient light and sharpness mapping relationship includes: Based on the first feature image set obtained at each brightness level, the brightness and sharpness of each first feature image are obtained, and the first feature brightness range and the first feature sharpness range at each brightness level are obtained. Based on the set of second feature images obtained at each brightness level, the brightness and sharpness of each second feature image are obtained, thus obtaining the second feature brightness range and the second feature sharpness range for each brightness level; Based on the set of third feature images obtained at each brightness level, the brightness and sharpness of each third feature image are obtained, and the brightness range and sharpness range of the third feature for each brightness level are obtained. Based on the set of fourth feature images obtained at each brightness level, the brightness and sharpness of each fourth feature image are obtained, and the fourth feature brightness range and fourth feature sharpness range of each brightness level are obtained. The maximum and minimum brightness values ​​corresponding to each brightness level are obtained based on the first characteristic brightness interval, the second characteristic brightness interval, the third characteristic brightness interval, and the fourth characteristic brightness interval corresponding to each brightness level, so as to obtain the brightness interval corresponding to each brightness level; The maximum and minimum sharpness values ​​corresponding to each brightness level are obtained based on the first, second, third, and fourth characteristic sharpness intervals corresponding to each brightness level, so as to obtain the sharpness interval corresponding to each brightness level. The ambient light and sharpness mapping relationship is generated based on the brightness range corresponding to each brightness level and the sharpness range corresponding to each brightness level.

6. The defocusing detection method according to claim 4, characterized in that, The diopter of each of the first feature lenses increases sequentially, and the center of the calibration camera is aligned with the center of each of the first feature lenses.

7. The defocusing detection method according to claim 4, characterized in that, The diopter of each of the second feature lenses decreases sequentially, and the center of the calibration camera is aligned with the center of each of the second feature lenses.

8. The defocus detection method according to any one of claims 3-7, characterized in that, The step of determining the out-of-focus calibration area of ​​the calibration vehicle based on the full-view pixels of the calibration camera includes: The starting pixel is obtained based on the full field of view pixels, and a specified area of ​​the vehicle body of the calibrated vehicle is obtained, wherein the field of view area corresponding to the full field of view pixels fully covers the specified area of ​​the vehicle body; The specified area of ​​the vehicle body is divided into average regions based on the starting pixel and the size of the specified area of ​​the vehicle body to obtain each unit region; Obtain the target unit area and determine the target unit area as the defocus calibration area.

9. The defocusing detection method according to claim 6 or 7, characterized in that, Each of the first feature lenses and each of the second feature lenses includes a myopia lens or a hyperopia lens.

10. A defocusing detection device, characterized in that, Applications in electronic exterior rearview mirror systems include: The acquisition module is used to acquire the current ambient brightness and determine whether the current ambient brightness is within a preset effective brightness range. The effective brightness range is used to filter out overly bright or overly dark scene environments, and the effective brightness range includes: a minimum effective brightness value and a maximum effective brightness value. If the current ambient brightness is within the effective brightness range, the current ambient brightness is determined as the effective ambient brightness. If the current ambient brightness is not within the effective brightness range, the current ambient brightness is acquired again. The module also acquires the current brightness and current sharpness of the target vehicle out-of-focus detection area. The first processing module is used to determine the target brightness level corresponding to the effective current ambient brightness based on the effective current ambient brightness and the mapping relationship between ambient light and sharpness. The mapping relationship between ambient light and sharpness is obtained by defocusing the defocused calibration area of ​​the calibration vehicle. The calibration vehicle and the target vehicle are the same model of vehicle. The mapping relationship between ambient light and sharpness includes: the brightness range and sharpness range corresponding to each brightness level, and each brightness level corresponds to an ambient brightness range. The second processing module is used to determine that the electronic exterior rearview mirror system is not out of focus if it is determined that the current brightness is within the target brightness range corresponding to the target brightness level and the current clarity is within the target clarity range corresponding to the target brightness level.

11. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the defocus detection method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the defocus detection method as described in any one of claims 1-9.

13. A computer program product comprising computer-executable instructions, which, when executed by a processor, are used to implement the defocus detection method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Image-quality optimization method and device

    CN103841384A

  • Image processing method and apparatus

    CN105657262A