Method, device and equipment for testing stray light of vehicle-mounted image acquisition module and medium
By acquiring and analyzing the multiple images corresponding to the preset light source, the energy level of stray light in the on-board module is directly determined, which solves the problems of deviations and errors in the test methods in the prior art, and improves the safety of the autonomous driving system.
Patent Information
- Application Number
- CN202411936389.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-04
AI Technical Summary
The methods used in the prior art to test stray light energy levels of vehicle-mounted modules have deviations and errors, which affect the safety of the autonomous driving system.
By acquiring the pixel images, the first brightness image and the second brightness image corresponding to the preset light source, the energy level of stray light in the vehicle-mounted image acquisition module to be tested is determined based on these images, and the energy level of stray light is directly determined by combining the luminance meter with the vehicle-mounted image acquisition module to be tested is used.
The accuracy of stray light energy levels is improved, the safety of the autonomous driving system is ensured, and errors caused by the non-uniformity of the light reduction plate and the approximate calculation of pixel values are avoided.
Smart Images

Figure CN119766992A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of vehicle technology, and in particular to a method, device, equipment and medium for testing stray light of a vehicle-mounted image acquisition module. Background Art
[0002] In the autonomous driving system, the vehicle-mounted module is a key device used to obtain images of roads, traffic signs, etc., and the car will encounter various lighting during driving. When the light enters the vehicle-mounted module, some of the light will form stray light. High-energy stray light will cover small targets in the image, causing the autonomous driving system to be unable to correctly identify them, thus affecting the safety of the vehicle's autonomous driving. Therefore, in order to ensure the safety of autonomous driving, it is necessary to test the energy level of the vehicle-mounted module's stray light.
[0003] In the existing technology, the energy level of stray light is tested indirectly: the brightness of the light source is fixed, and the vehicle-mounted module is placed at a fixed test distance; a neutral density film is covered in front of the lens of the vehicle-mounted module to saturate the pixel value of the light source imaged on the sensor; the image at this time is captured, and the stray light is selected in the image, and the peak value of the digital image is taken; the energy level of stray light is determined by the formula: energy level = (stray light peak value × neutral density film transmittance) / digital image value at the light source. This method introduces a neutral density film. If the uniformity of the neutral density film cannot be guaranteed, the energy level will be deviated, and the energy level is calculated approximately using the pixel value and the neutral density film, which has errors. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment and medium for testing stray light of a vehicle-mounted image acquisition module, which can improve the accuracy of the stray light energy level and ensure the safety of autonomous driving.
[0005] In a first aspect, an embodiment of the present invention provides a method for testing stray light of a vehicle-mounted image acquisition module, comprising:
[0006] Acquire a pixel image, a first brightness image, and a second brightness image corresponding to a preset light source; wherein the pixel image is acquired by an onboard image acquisition module to be tested, and the onboard image acquisition module to be tested includes a first lens; the first brightness image is acquired by a first brightness meter composed of a preset sensor and a second lens, and the second brightness image is acquired by a second brightness meter composed of the preset sensor and the first lens;
[0007] The energy level of stray light in the vehicle-mounted image acquisition module to be tested is determined based on the pixel image, the first brightness image, and the second brightness image.
[0008] In a second aspect, an embodiment of the present invention further provides a testing device for stray light of a vehicle-mounted image acquisition module, the device comprising:
[0009] An image acquisition module, used to acquire a pixel image, a first brightness image and a second brightness image corresponding to a preset light source; wherein the pixel image is acquired by an image acquisition module mounted on a vehicle to be tested, and the image acquisition module mounted on a vehicle to be tested includes a first lens; the first brightness image is acquired by a first brightness meter composed of a preset sensor and a second lens, and the second brightness image is acquired by a second brightness meter composed of the preset sensor and the first lens;
[0010] An energy level determination module is used to determine the energy level of stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image and the second brightness image.
[0011] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for testing stray light of the vehicle-mounted image acquisition module described in an embodiment of the present invention.
[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for testing stray light of a vehicle-mounted image acquisition module described in an embodiment of the present invention when executed.
[0016] The embodiment of the present invention discloses a method, device, equipment and medium for testing stray light of a vehicle-mounted image acquisition module, including: obtaining a pixel image, a first brightness image and a second brightness image corresponding to a preset light source; wherein the pixel image is acquired by a vehicle-mounted image acquisition module to be tested, and the vehicle-mounted image acquisition module to be tested includes a first lens; the first brightness image is acquired by a first brightness meter composed of a preset sensor and a second lens, and the second brightness image is acquired by a second brightness meter composed of a preset sensor and the first lens; and the energy level of the stray light in the vehicle-mounted image acquisition module to be tested is determined based on the pixel image, the first brightness image and the second brightness image. The above technical scheme can accurately determine the energy level of stray light, and specifically considers obtaining the pixel image of the preset light source collected by the on-board image acquisition module to be tested, the first brightness image of the preset light source collected by the first brightness meter, and the second brightness image of the preset light source collected by the second brightness meter; at the same time, the energy level of the stray light in the on-board image acquisition module to be tested is determined according to the pixel image, the first brightness image, and the second brightness image. Compared with the prior art, the technical scheme provided in this embodiment does not use a dimming film, and does not use pixel values and dimming films to approximately calculate the energy level of stray light. Instead, the energy level of the stray light is directly determined by using a method of combining a brightness meter with the on-board image acquisition module to be tested. There is no intermediate conversion and attenuation process, thereby improving the accuracy of the stray light energy level. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a method for testing stray light of a vehicle-mounted image acquisition module in Embodiment 1 of the present invention;
[0018] Figure 2 It is a flow chart of a method for testing stray light of a vehicle-mounted image acquisition module in Embodiment 2 of the present invention;
[0019] Figure 3 It is a structural schematic diagram of a stray light testing device for a vehicle-mounted image acquisition module in Embodiment 3 of the present invention;
[0020] Figure 4 It is a structural schematic diagram of an electronic device in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0021] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0022] Embodiment 1
[0023] Figure 1This is a flow chart of a method for testing stray light of a vehicle-mounted image acquisition module provided in the first embodiment of the present invention. This embodiment is applicable to the case where the energy level of stray light in the vehicle-mounted image acquisition module to be tested is tested. The method can be executed by a testing device for stray light of a vehicle-mounted image acquisition module. The device can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc. Specifically, it includes the following steps:
[0024] S110, obtaining a pixel image, a first brightness image, and a second brightness image corresponding to a preset light source.
[0025] In this embodiment, the preset light source can be understood as a preset point light source, such as a sunlight source, a laser light source, etc. Further, the pixel image is collected by the on-board image acquisition module to be tested. Specifically, the on-board image acquisition module to be tested is used to shoot the preset light source to obtain a pixel image corresponding to the preset light source, wherein the pixel image is represented by a pixel value. Among them, the on-board image acquisition module to be tested can be understood as a vehicle-mounted camera, and the on-board image acquisition module to be tested includes a first lens.
[0026] In this embodiment, the first brightness image is collected by a first brightness meter composed of a preset sensor and a second lens. Specifically, the first brightness meter is used to shoot a preset light source to obtain a first brightness image corresponding to the preset light source, wherein the first brightness image is represented by a brightness value. The first brightness meter is a two-dimensional brightness meter, the preset sensor can be understood as an image sensor, and the second lens can be understood as a calibration lens of the first brightness meter.
[0027] In this embodiment, the second brightness image is collected by a second brightness meter composed of a preset sensor and a first lens. Specifically, the second brightness meter is used to shoot a preset light source to obtain a second brightness image corresponding to the preset light source, wherein the second brightness image is characterized by a brightness value. The second brightness meter is a two-dimensional brightness meter, the preset sensor can be understood as an image sensor, and the first lens is a lens of the vehicle-mounted image acquisition module to be tested. Specifically, the second lens in the first brightness meter is replaced with the first lens of the vehicle-mounted image acquisition module to be tested, so that the preset sensor and the first lens form a second brightness meter.
[0028] Furthermore, the vehicle-mounted image acquisition module to be tested further includes: a first sensor; wherein the first sensor can be understood as an image sensor. Specifically, the first lens in the vehicle-mounted image acquisition module to be tested is in the same straight line as the main optical axis of the preset light source.
[0029] Continuing with the above description, the first distance between the vehicle-mounted image acquisition module to be tested and the preset light source is determined by the focal length of the first lens, the diameter of the preset light source and the resolution of the first sensor. For example, assuming that the focal length of the first lens is f, the diameter of the preset light source is e, and the resolution of the first sensor is a*b, the first distance Y is: Y=f*e*10 / b*m, where m represents the pixel size.
[0030] Furthermore, the distance between the first brightness meter and the preset light source is the same as the first distance, and the distance between the second brightness meter and the preset light source is the same as the first distance. Furthermore, the distance between the first lens in the second brightness meter and the preset sensor is the same as the distance between the first lens in the vehicle-mounted image acquisition module to be tested and the first sensor.
[0031] S120, determining the energy level of stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image, and the second brightness image.
[0032] In this embodiment, the stray light may be understood as ghost, glare, etc. The energy level of the stray light may be understood as an indicator for measuring the intensity of the stray light.
[0033] In this embodiment, one implementation method of determining the energy level of stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image, and the second brightness image can be described as: determining the brightness of the stray light based on the pixel image, the first brightness image, and the second brightness image; determining the energy level of the stray light according to the brightness of the stray light and the brightness of a preset light source. Wherein, the brightness of the preset light source is determined based on the first brightness image.
[0034] The technical solution of this embodiment obtains the pixel image, the first brightness image and the second brightness image corresponding to the preset light source; and determines the energy level of the stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image and the second brightness image. The above technical solution specifically considers obtaining the pixel image of the preset light source collected by the vehicle-mounted image acquisition module to be tested, the first brightness image of the preset light source collected by the first brightness meter and the second brightness image of the preset light source collected by the second brightness meter; at the same time, the energy level of the stray light in the vehicle-mounted image acquisition module to be tested is determined according to the pixel image, the first brightness image and the second brightness image. The technical solution provided by this embodiment does not use a dimming film, and does not use pixel values and dimming films to approximately calculate the energy level of stray light. Instead, the energy level of stray light is directly determined by using a method of combining a brightness meter with the vehicle-mounted image acquisition module to be tested, without any intermediate conversion and attenuation process, thereby improving the accuracy of the stray light energy level and ensuring the safety of autonomous driving.
[0035] Embodiment 2
[0036] Figure 2 This is a flow chart of a method for testing stray light of a vehicle-mounted image acquisition module provided in Embodiment 2 of the present invention. Based on the above embodiment, the method includes the following steps:
[0037] S210, obtaining a pixel image, a first brightness image, and a second brightness image corresponding to a preset light source.
[0038] S220: Determine the brightness of a preset light source and a center position of the light source based on the first brightness image.
[0039] In this embodiment, the brightness of the preset light source is represented by a brightness value, and the center position of the light source can be understood as the position coordinates of the center of the preset light source.
[0040] In this embodiment, one implementation of determining the brightness of the preset light source and the center position of the light source based on the first brightness image can be described as the following steps:
[0041] a1) determining the maximum brightness value in the first brightness image, and taking the position of the maximum brightness value in the first brightness image as the center position of the light source;
[0042] In this embodiment, the method for determining the maximum brightness value in the first brightness image can be: arranging the brightness values in the first brightness image in descending order, and taking the brightness value ranked first as the maximum brightness value in the first brightness image; or arranging the brightness values in the first brightness image in ascending order, and taking the brightness value ranked first to last as the maximum brightness value in the first brightness image.
[0043] Following the above description, the method of using the position of the maximum brightness value in the first brightness image as the center position of the light source may be: determining the position coordinates of the maximum brightness value in the first brightness image, and using the position coordinates as the center position of the light source. For example, the center position of the light source is (x1, y1).
[0044] b1) extracting at least one brightness value greater than a first preset threshold value from the first brightness image, and taking an average value of the at least one brightness value as the brightness of the preset light source.
[0045] In this embodiment, the first preset threshold is determined by the maximum brightness value; illustratively, assuming that the maximum brightness value is M, the first preset threshold e1 can be expressed as M*z1%, for example, z1% is 90%.
[0046] Continuing with the above description, the method for extracting at least one brightness value greater than the first preset threshold in the first brightness image can be: traversing each brightness value in the first brightness image, and for the traversed brightness values, determining whether the traversed brightness values are greater than the first preset threshold; if they are greater than the first preset threshold, extracting the brightness value and storing it in a preset list.
[0047] Furthermore, the method of using the average value of at least one brightness value as the brightness of the preset light source may be: determining the total number of brightness values in the preset list; accumulating the brightness values in the preset list to obtain an accumulated brightness value; dividing the accumulated brightness value by the total number to obtain an average value, and using the average value as the brightness of the preset light source. For example, the brightness of the preset light source is L1.
[0048] S230: Determine a pixel value and first position information of at least one stray light pixel from the pixel image.
[0049] In this embodiment, the first position information can be understood as the position coordinates of the stray light pixel point in the pixel image.
[0050] In this embodiment, one implementation method of determining the pixel value and the first position information of at least one stray light pixel from the pixel image can be described as the following steps:
[0051] a2) extracting at least one pixel value within a preset range in the pixel image;
[0052] In this embodiment, the preset range is determined by the maximum pixel value in the pixel image; illustratively, assuming that the maximum pixel value is N, the preset range can be expressed as (N*z2%, N*z3%), for example, z2% is 10% and z3% is 90%.
[0053] Furthermore, a method for extracting at least one pixel value within a preset range in a pixel image may be: traversing each pixel value in the pixel image, and for each traversed pixel value, determining whether the traversed pixel value is within a preset range; if it is within the preset range, extracting the pixel value.
[0054] b2) for each pixel value within the preset range, taking the pixel point corresponding to the pixel value as the stray light pixel point, and taking the pixel value as the pixel value of the stray light pixel point;
[0055] Exemplarily, assuming that there are S pixel values within the preset range, the pixel points corresponding to the S pixel values are taken as stray light pixel points, that is, there are S stray light pixel points, and the pixel value is taken as the pixel value of the stray light pixel point. For example, the pixel values of the S stray light pixel points are T1, T2, ...
[0056] c2) determining the position of the pixel value in the pixel image, and using the position of the pixel value in the pixel image as the first position information of the stray light pixel point.
[0057] In this embodiment, for each pixel value within a preset range, the position coordinates of the pixel value in the pixel image are determined, and the position coordinates are used as the first position information of the stray light pixel point.
[0058] S240. For each stray light pixel, determine the brightness of the stray light pixel based on at least one of the pixel image, the second brightness image, the center position of the light source, the pixel value of the stray light pixel, and the first position information.
[0059] In this embodiment, the brightness of the stray light pixel is represented by a brightness value.
[0060] In this embodiment, one implementation method of determining the brightness of the stray light pixel point based on at least one of the pixel image, the second brightness image, the center position of the light source, the pixel value of the stray light pixel point, and the first position information can be described as the following steps:
[0061] a3) determining second position information of the stray light pixel point from the second brightness image based on the first position information, the resolution of the pixel image, and the resolution of the second brightness image;
[0062] In this embodiment, the second position information can be understood as the position coordinates of the stray light pixel point in the second brightness image.
[0063] Exemplarily, assuming that the first position information of the stray light pixel is (x2, y2), the resolution of the pixel image is a*b, the resolution of the second brightness image is c*d, and the second position information of the stray light pixel is recorded as (x3, y3), then x3=c*x2 / a, y3=d*y2 / b.
[0064] b3) determining the brightness value of the stray light pixel from the second brightness image based on the second position information;
[0065] Exemplarily, according to the second position information (x3, y3) of the stray light pixel, the brightness value at the position (x3, y3) in the second brightness image is determined, and the brightness value is used as the brightness value of the stray light pixel.
[0066] c3) determining the brightness of the stray light pixel based on at least one of the brightness value of the stray light pixel, the pixel value of the stray light pixel, the center position of the light source, the pixel image, and the second brightness image.
[0067] Exemplarily, the center position of the light source is (x1, y1), and it is assumed that the pixel value of the stray light pixel is T1.
[0068] In this embodiment, for determining the brightness of a stray light pixel based on at least one of the brightness value of the stray light pixel, the pixel value of the stray light pixel, the center position of the light source, the pixel image, and the second brightness image, one implementation method can be described as: if the brightness value of the stray light pixel is greater than a second preset threshold, the brightness value of the stray light pixel is used as the brightness of the stray light pixel.
[0069] Continuing with the above description, the second preset threshold is determined by the maximum brightness value in the second brightness image. Exemplarily, assuming that the maximum brightness value in the second brightness image is P, the second preset threshold e2 can be expressed as P*z4%, for example, z4% is 10%. Further, if the brightness value of the stray light pixel is greater than the second preset threshold e2, the brightness value of the stray light pixel is used as the brightness L2 of the stray light pixel.
[0070] In this embodiment, for determining the brightness of a stray light pixel based on at least one of the brightness value of the stray light pixel, the pixel value of the stray light pixel, the center position of the light source, the pixel image, and the second brightness image, another implementation method can be described as the following steps:
[0071] (1) if the brightness value of the stray light pixel is less than or equal to a second preset threshold, determining third position information of the center of the light source from the pixel image based on the center position of the light source, the resolution of the pixel image, and the resolution of the first brightness image;
[0072] In this embodiment, the third position information may be understood as the position coordinates of the center of the light source preset in the pixel image.
[0073] Exemplarily, the center position of the light source is (x1, y1), the resolution of the pixel image is a*b, the resolution of the first brightness image is c*d, and the third position information of the center of the light source is recorded as (x4, y4), then x4=a*x1 / c, y4=b*y1 / d.
[0074] (2) determining a pixel value of the center of the light source from the pixel image based on the third position information;
[0075] Exemplarily, according to the third position information (x4, y4) of the light source center, the pixel value at the position (x4, y4) in the pixel image is determined, and the pixel value is used as the pixel value of the light source center. For example, the pixel value of the light source center is R1.
[0076] (3) determining a brightness value of the center of the light source from the second brightness image based on the center position of the light source;
[0077] Exemplarily, according to the center position (x1, y1) of the light source, the brightness value at the position (x1, y1) in the second brightness image is determined, and the brightness value is used as the brightness value of the center of the light source. For example, the brightness value of the center of the light source is L3.
[0078] (4) The brightness of the stray light pixel is determined based on the pixel value of the stray light pixel, the brightness value of the light source center, and the pixel value of the light source center.
[0079] Exemplarily, the pixel value of the stray light pixel is T1, the brightness value of the light source center is L3, and the pixel value of the light source center is R1, then the brightness L2 of the stray light pixel is determined by the following formula: L2=T1*L3 / R1.
[0080] S250: Determine the energy level of the stray light pixel point based on the brightness of the stray light pixel point and the brightness of the preset light source.
[0081] Exemplarily, the method for determining the energy level of a stray light pixel based on the brightness of the stray light pixel and the brightness of a preset light source can be: for each stray light pixel, divide the brightness L2 of the stray light pixel by the brightness L1 of the preset light source to obtain the energy level of the stray light pixel: L2 / L1.
[0082] In this embodiment, the method of determining the energy level of the stray light pixel point based on the brightness of the stray light pixel point and the brightness of the preset light source can be described as the following steps:
[0083] a4) determining the total number of stray light pixels;
[0084] Exemplarily, the total number of stray light pixels is S.
[0085] b4) if the ratio of the total number to the resolution of the pixel image is greater than a third preset threshold, determining the average brightness of at least one stray light pixel, and using the average as the brightness of the regional stray light;
[0086] In this embodiment, the third preset threshold is determined by the resolution of the pixel image; illustratively, the third preset threshold e3 can be expressed as: a*b / 1000.
[0087] Further, if S / (a*b) is greater than the third preset threshold value e3, the average of the brightness of the S stray light pixels is calculated, and the average is used as the brightness L_MEAN of the regional stray light.
[0088] c4) determining the energy level of the regional stray light based on the brightness of the regional stray light and the brightness of a preset light source.
[0089] Exemplarily, the brightness L_MEAN of the regional stray light is divided by the brightness L1 of the preset light source to obtain the energy level of the regional stray light: L_MEAN / L1.
[0090] The technical solution of this embodiment is to obtain the pixel image, the first brightness image and the second brightness image corresponding to the preset light source; determine the brightness of the preset light source and the center position of the light source based on the first brightness image; determine the pixel value and the first position information of at least one stray light pixel from the pixel image; for each stray light pixel, determine the brightness of the stray light pixel based on at least one of the pixel image, the second brightness image, the center position of the light source, the pixel value of the stray light pixel and the first position information; determine the energy level of the stray light pixel based on the brightness of the stray light pixel and the brightness of the preset light source. The above technical solution does not use a dimming film, and does not use pixel values and dimming films to approximate the energy level of stray light. Instead, it uses a method of combining a brightness meter with a vehicle-mounted image acquisition module to be tested to directly determine the energy level of stray light. There is no intermediate conversion and attenuation process, thereby improving the accuracy of the stray light energy level and ensuring the safety of autonomous driving.
[0091] Embodiment 3
[0092] Figure 3 A schematic diagram of the structure of a stray light testing device for a vehicle-mounted image acquisition module provided in Embodiment 3 of the present invention is shown in FIG. Figure 3 As shown, the device comprises:
[0093] The image acquisition module 310 is used to acquire a pixel image, a first brightness image and a second brightness image corresponding to a preset light source; wherein the pixel image is acquired by an image acquisition module mounted on the vehicle to be tested, and the image acquisition module mounted on the vehicle to be tested includes a first lens; the first brightness image is acquired by a first brightness meter composed of a preset sensor and a second lens, and the second brightness image is acquired by a second brightness meter composed of the preset sensor and the first lens;
[0094] The energy level determination module 320 is used to determine the energy level of stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image and the second brightness image.
[0095] Optionally, the energy level determination module 320 may specifically include:
[0096] a light source center position determining unit, configured to determine the brightness and the light source center position of the preset light source based on the first brightness image;
[0097] A first position information determining unit, configured to determine a pixel value and first position information of at least one stray light pixel point from the pixel image;
[0098] a brightness determination unit, configured to determine, for each stray light pixel, the brightness of the stray light pixel based on at least one of the pixel image, the second brightness image, the center position of the light source, the pixel value of the stray light pixel, and the first position information;
[0099] An energy level determination unit is used to determine the energy level of the stray light pixel point based on the brightness of the stray light pixel point and the brightness of the preset light source.
[0100] Optionally, the light source center position determining unit may be specifically used for:
[0101] Determine a maximum brightness value in the first brightness image, and use a position of the maximum brightness value in the first brightness image as a light source center position;
[0102] At least one brightness value greater than a first preset threshold value is extracted from the first brightness image, and an average value of the at least one brightness value is used as the brightness of the preset light source; wherein the first preset threshold value is determined by the maximum brightness value.
[0103] Optionally, the first location information determining unit may be specifically configured to:
[0104] Extracting at least one pixel value in the pixel image that is within a preset range; wherein the preset range is determined by the maximum pixel value in the pixel image;
[0105] For each pixel value within a preset range, taking a pixel point corresponding to the pixel value as a stray light pixel point, and taking the pixel value as a pixel value of the stray light pixel point;
[0106] The position of the pixel value in the pixel image is determined, and the position of the pixel value in the pixel image is used as the first position information of the stray light pixel point.
[0107] Optionally, the brightness determination unit may specifically include:
[0108] a second position information determining subunit, configured to determine second position information of the stray light pixel point from the second brightness image based on the first position information, a resolution of the pixel image, and a resolution of the second brightness image;
[0109] a stray light pixel brightness value determination subunit, configured to determine the brightness value of the stray light pixel from the second brightness image based on the second position information;
[0110] The stray light pixel brightness determination subunit is used to determine the brightness of the stray light pixel based on at least one of the brightness value of the stray light pixel, the pixel value of the stray light pixel, the center position of the light source, the pixel image, and the second brightness image.
[0111] Optionally, the brightness determination subunit of the stray light pixel point may be specifically used for:
[0112] If the brightness value of the stray light pixel is greater than a second preset threshold, the brightness value of the stray light pixel is used as the brightness of the stray light pixel; wherein the second preset threshold is determined by the maximum brightness value in the second brightness image.
[0113] Optionally, the brightness determination subunit of the stray light pixel point may be further used for:
[0114] If the brightness value of the stray light pixel point is less than or equal to a second preset threshold, determining third position information of the center of the light source from the pixel image based on the center position of the light source, the resolution of the pixel image, and the resolution of the first brightness image;
[0115] determining a pixel value of the center of the light source from the pixel image based on the third position information;
[0116] Determining a brightness value of the center of the light source from the second brightness image based on the center position of the light source;
[0117] The brightness of the stray light pixel point is determined based on the pixel value of the stray light pixel point, the brightness value of the light source center, and the pixel value of the light source center.
[0118] Optionally, the energy level determination unit may be specifically used to:
[0119] Determining the total number of stray light pixels;
[0120] If the ratio of the total number to the resolution of the pixel image is greater than a third preset threshold, determining the average brightness of at least one stray light pixel point, and using the average brightness as the brightness of the regional stray light; wherein the third preset threshold is determined by the resolution of the pixel image;
[0121] The energy level of the regional stray light is determined based on the brightness of the regional stray light and the brightness of the preset light source.
[0122] Optionally, the vehicle-mounted image acquisition module to be tested also includes: a first sensor; the first lens in the vehicle-mounted image acquisition module to be tested and the main optical axis of the preset light source are in the same straight line; the first distance between the vehicle-mounted image acquisition module to be tested and the preset light source is determined by the focal length of the first lens, the diameter of the preset light source and the resolution of the first sensor.
[0123] Optionally, the distance between the first brightness meter and the preset light source is the same as the first distance; the distance between the second brightness meter and the preset light source is the same as the first distance; the distance between the first lens in the second brightness meter and the preset sensor is the same as the distance between the first lens in the vehicle-mounted image acquisition module to be tested and the first sensor.
[0124] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.
[0125] Embodiment 4
[0126] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0127] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0128] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0129] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a test method for stray light of a vehicle-mounted image acquisition module.
[0130] In some embodiments, the test method for stray light of the vehicle-mounted image acquisition module can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the test method for stray light of the vehicle-mounted image acquisition module described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the test method for stray light of the vehicle-mounted image acquisition module by any other appropriate means (for example, by means of firmware).
[0131] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0132] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0133] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0134] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0135] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0136] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0137] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a method for testing stray light of a vehicle-mounted image acquisition module as provided in any embodiment of the present application.
[0138] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0140] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for testing stray light of a vehicle-mounted image acquisition module, characterized in that: include: Acquire a pixel image, a first brightness image, and a second brightness image corresponding to a preset light source; wherein the pixel image is acquired by an onboard image acquisition module to be tested, and the onboard image acquisition module to be tested includes a first lens; the first brightness image is acquired by a first brightness meter composed of a preset sensor and a second lens, and the second brightness image is acquired by a second brightness meter composed of the preset sensor and the first lens; The energy level of stray light in the vehicle-mounted image acquisition module to be tested is determined based on the pixel image, the first brightness image, and the second brightness image.
2. The method according to claim 1, characterized in that Determining the energy level of stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image, and the second brightness image includes: Determining the brightness of the preset light source and the center position of the light source based on the first brightness image; Determine a pixel value and first position information of at least one stray light pixel from the pixel image; For each stray light pixel, determine the brightness of the stray light pixel based on at least one of the pixel image, the second brightness image, the center position of the light source, the pixel value of the stray light pixel, and the first position information; The energy level of the stray light pixel point is determined based on the brightness of the stray light pixel point and the brightness of the preset light source.
3. The method according to claim 2, characterized in that Determining the brightness of the preset light source and the center position of the light source based on the first brightness image includes: Determine a maximum brightness value in the first brightness image, and use a position of the maximum brightness value in the first brightness image as a light source center position; At least one brightness value greater than a first preset threshold value in the first brightness image is extracted, and an average value of the at least one brightness value is used as the brightness of the preset light source; wherein the first preset threshold value is determined by the maximum brightness value.
4. The method according to claim 2, characterized in that: Determining a pixel value and first position information of at least one stray light pixel from the pixel image includes: Extracting at least one pixel value in the pixel image that is within a preset range; wherein the preset range is determined by the maximum pixel value in the pixel image; For each pixel value within a preset range, taking a pixel point corresponding to the pixel value as a stray light pixel point, and taking the pixel value as a pixel value of the stray light pixel point; The position of the pixel value in the pixel image is determined, and the position of the pixel value in the pixel image is used as the first position information of the stray light pixel point.
5. The method according to claim 2, characterized in that: Determining the brightness of the stray light pixel point based on at least one of the pixel image, the second brightness image, the center position of the light source, the pixel value of the stray light pixel point, and the first position information includes: Determining second position information of the stray light pixel point from the second brightness image based on the first position information, the resolution of the pixel image, and the resolution of the second brightness image; Determine the brightness value of the stray light pixel from the second brightness image based on the second position information; The brightness of the stray light pixel point is determined based on at least one of the brightness value of the stray light pixel point, the pixel value of the stray light pixel point, the center position of the light source, the pixel image, and the second brightness image.
6. The method according to claim 5, characterized in that Determining the brightness of the stray light pixel point based on at least one of the brightness value of the stray light pixel point, the pixel value of the stray light pixel point, the center position of the light source, the pixel image, and the second brightness image includes: If the brightness value of the stray light pixel is greater than a second preset threshold, the brightness value of the stray light pixel is used as the brightness of the stray light pixel; wherein the second preset threshold is determined by the maximum brightness value in the second brightness image.
7. The method according to claim 5, characterized in that Determining the brightness of the stray light pixel point based on at least one of the brightness value of the stray light pixel point, the pixel value of the stray light pixel point, the center position of the light source, the pixel image, and the second brightness image includes: If the brightness value of the stray light pixel point is less than or equal to a second preset threshold, determining third position information of the center of the light source from the pixel image based on the center position of the light source, the resolution of the pixel image, and the resolution of the first brightness image; determining a pixel value of the center of the light source from the pixel image based on the third position information; Determining a brightness value of the center of the light source from the second brightness image based on the center position of the light source; The brightness of the stray light pixel point is determined based on the pixel value of the stray light pixel point, the brightness value of the light source center, and the pixel value of the light source center.
8. The method according to claim 2, characterized in that: Determining the energy level of the stray light pixel point based on the brightness of the stray light pixel point and the brightness of the preset light source includes: Determining the total number of stray light pixels; If the ratio of the total number to the resolution of the pixel image is greater than a third preset threshold, determining the average brightness of at least one stray light pixel point, and using the average brightness as the brightness of the regional stray light; wherein the third preset threshold is determined by the resolution of the pixel image; The energy level of the regional stray light is determined based on the brightness of the regional stray light and the brightness of the preset light source.
9. The method according to claim 1, characterized in that: The vehicle-mounted image acquisition module to be tested also includes: a first sensor; the first lens in the vehicle-mounted image acquisition module to be tested and the main optical axis of the preset light source are on the same straight line; the first distance between the vehicle-mounted image acquisition module to be tested and the preset light source is determined by the focal length of the first lens, the diameter of the preset light source and the resolution of the first sensor.
10. The method according to claim 9, characterized in that The distance between the first brightness meter and the preset light source is the same as the first distance; the distance between the second brightness meter and the preset light source is the same as the first distance; the distance between the first lens in the second brightness meter and the preset sensor is the same as the distance between the first lens in the vehicle-mounted image acquisition module to be tested and the first sensor.
11. A stray light testing device for a vehicle-mounted image acquisition module, characterized in that: include: An image acquisition module, used to acquire a pixel image, a first brightness image and a second brightness image corresponding to a preset light source; wherein the pixel image is acquired by an image acquisition module mounted on a vehicle to be tested, and the image acquisition module mounted on a vehicle to be tested includes a first lens; the first brightness image is acquired by a first brightness meter composed of a preset sensor and a second lens, and the second brightness image is acquired by a second brightness meter composed of the preset sensor and the first lens; An energy level determination module is used to determine the energy level of stray light in the vehicle-mounted image acquisition module to be tested based on the pixel image, the first brightness image and the second brightness image.
12. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for testing stray light of the vehicle-mounted image acquisition module described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for testing stray light of a vehicle-mounted image acquisition module according to any one of claims 1 to 10 when executed.
Citation Information
Cited By
Method and apparatus for testing stray light in vehicle-mounted image acquisition module, device and medium
WO2026137740A1