Light source control method and device, electronic equipment and computing program product

By real-time detection of camera exposure timing and dynamic calculation of light transmission time, the problem of mismatch between the supplementary light and camera exposure timing is solved, achieving high-quality imaging in the fields of autonomous driving and machine vision.

CN121309979APending Publication Date: 2026-01-09SHANGHAI LIONWEI INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511875763.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

In low-light imaging scenarios in fields such as autonomous driving and machine vision, the timing of the fill light's illumination is mismatched with the camera's exposure time, resulting in defects such as local overexposure, halo, or insufficient brightness in the image. Traditional fixed-delay control methods cannot adapt to the differences in light transmission time caused by changes in the distance of the object being photographed.

Method used

By real-time detection of camera exposure timing, measurement of object distance, dynamic calculation of light transmission time, and determination of light source trigger delay based on the principle of light speed propagation and system hardware delay compensation, the reflected light is ensured to accurately reach the sensor during camera exposure. Multiple ranging methods are used to improve distance measurement accuracy, and the trigger delay is dynamically calculated by combining the exposure time window and light transmission time.

Benefits of technology

It achieves synchronization between the fill light effect and the camera exposure, avoiding image overexposure or halo, significantly improving image quality, and adapting to GMSL camera imaging in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121309979A_ABST
    Figure CN121309979A_ABST
Patent Text Reader

Abstract

The invention provides a light source control method and device, electronic equipment and a computing program product, and relates to the field of camera imaging. The light source is used for supplementing light for a GMSL camera, and the light source control method comprises the steps that according to the shooting distance between the GMSL camera and a shot object, the light transmission time of light emitted by the light source and irradiated to the shot object and reflected back to an image sensor of the GMSL camera by the shot object is determined; based on the exposure time window and the light transmission time of the GMSL camera, determining the trigger delay of the light source; and controlling the light source to emit light according to the trigger delay. According to the light source control method provided by the embodiment of the invention, after the light is reflected by the shot object, the reflected light just falls into the exposure window of the camera, so that self-adaptive and high-precision synchronous exposure is realized, and overexposure and halo are effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of camera imaging, and more specifically, to a light source control method, apparatus, electronic device, and computer program product. Background Technology

[0002] In low-light imaging scenarios such as autonomous driving and machine vision, GMSL optical cameras often require supplemental lighting to improve image quality. However, the timing of the supplemental lighting's emission must be precisely synchronized with the camera's exposure time. If the two are mismatched, the supplemental light, after being reflected by the subject, may not be effectively captured by the sensor within the camera's exposure window, resulting in defects such as localized overexposure, halos, or insufficient brightness in the image, severely affecting image quality.

[0003] Traditional fixed-delay control methods involve delaying the flash by a fixed amount of time after the camera triggers exposure. However, fixed-delay control methods cannot adapt to the differences in light transmission time caused by changes in the distance of the subject, resulting in serious image quality problems in dynamic or zoom scenes. Summary of the Invention

[0004] The purpose of this application is to provide a light source control method, device, electronic device, and computing program product. The light source control method dynamically calculates and controls the emission time of the light source by detecting the camera exposure sequence and measuring the distance to the object in real time, thereby ensuring that the light emitted by the light source reaches the camera sensor accurately during the camera exposure after being reflected by the object being photographed, thereby improving the image quality.

[0005] In a first aspect, embodiments of this application provide a light source control method for supplementing light to a GMSL camera. The method includes: determining the light transmission time from the light source to the object being photographed and reflected back to the image sensor of the GMSL camera based on the shooting distance between the GMSL camera and the object being photographed; determining the trigger delay of the light source based on the exposure time window of the GMSL camera and the light transmission time; and controlling the light source to emit light according to the trigger delay.

[0006] In the above implementation process, the light source control method provided in this application embodiment converts the shooting distance into light transmission time and combines it with the camera exposure time window to dynamically calculate the trigger delay, and controls the light emission time of the light source based on the trigger delay; the light source control method provided in this application embodiment can ensure that the reflected light reaches the camera sensor during the camera exposure window, ensuring the synchronization of the supplementary lighting effect and the camera exposure, thereby significantly improving the imaging quality.

[0007] Optionally, based on the shooting distance between the GMSL camera and the object being photographed, the light transmission time from the light source illuminating the object to the object being photographed and then reflected back to the image sensor of the GMSL camera is determined, including: measuring multiple distances between the GMSL camera and the object being photographed using at least two distance measurement methods; fusing the multiple distance measurements to obtain the shooting distance between the GMSL camera and the object being photographed; converting the shooting distance into the round-trip time of light based on the principle of light speed propagation; and superimposing a hardware delay time on the round-trip time to obtain the light transmission time.

[0008] In the above implementation process, the light source control method provided in this application embodiment effectively improves the accuracy and reliability of distance measurement by integrating multiple ranging methods in the process of determining the light transmission time, and accurately converts spatial distance into time parameters based on the principle of light speed propagation and system hardware delay compensation; thereby providing a high-precision light transmission time reference for exposure synchronization control, thus laying the foundation for achieving accurate synchronization between reflected light and camera exposure window.

[0009] Optionally, the trigger delay of the light source is determined based on the exposure time window and light transmission time of the GMSL camera, including: determining a target time within the exposure time window; subtracting half of the light transmission time and the preheating time of the light source from the target time to determine the trigger time of the light source; wherein the preheating time characterizes the time required for the light source to reach its rated luminous intensity from receiving the trigger signal; and determining the time interval between the reference time of the image frame and the trigger time of the light source to obtain the trigger delay.

[0010] Optionally, the target time includes the midpoint of the exposure time window.

[0011] In the above implementation process, the trigger delay calculation scheme provided in this application embodiment accurately calculates the trigger delay by deducing the one-way transmission time of the compensated light and the dynamic preheating time of the light source backward from the target time of the exposure window. It fully considers the physical delay of light path propagation and device response, and can ensure that the fill light is triggered at the best time, so that the reflected light falls accurately into the camera exposure window, thereby avoiding overexposure or underexposure of the image in principle and improving the image quality of the GMSL camera.

[0012] Optionally, the determination of the preheating time includes: determining the preheating time corresponding to the current driving current intensity based on the current driving current intensity of the light source and the nonlinear relationship between the current and the preheating time.

[0013] In the above implementation process, the light source control method provided in this application embodiment establishes a mathematical model of driving current and preheating time, and realizes adaptive compensation for the response characteristics of the light source under different operating currents, effectively overcoming the problem of decreased synchronization accuracy under different brightness adjustment scenarios with fixed preheating time parameters.

[0014] Optionally, before determining the trigger delay of the light source based on the exposure time window and light transmission time of the GMSL camera, the method further includes: sampling the vertical synchronization signal and horizontal synchronization signal of the GMSL camera; establishing an exposure time window model based on the timing relationship between the vertical synchronization signal and the horizontal synchronization signal; and determining the exposure time window of the GMSL camera according to the time window model.

[0015] In the above implementation process, the embodiments of this application determine the exposure time window of the GMSL camera by establishing an exposure time window model. This model uses high-speed sampling and digital signal processing technology to accurately analyze the camera synchronization signal, ensuring the accuracy of time window detection and providing an accurate time reference for subsequent synchronous lighting control, thus ensuring the accuracy and reliability of exposure synchronization from the source.

[0016] Optionally, after controlling the light source to emit light according to the trigger delay, the method further includes: acquiring an image of the photographed object after being illuminated by the light source, and calculating the image quality evaluation value of the image; using the trigger delay as a parameter to be optimized, adopting an adaptive optimization algorithm, and adjusting the search strategy according to the iteration process and the image quality evaluation value to optimize the trigger delay.

[0017] In the above implementation process, the embodiments of this application establish an evaluation system based on multi-dimensional image quality indicators and improve the particle swarm optimization algorithm to achieve closed-loop adaptive optimization of the trigger delay parameter; thus enabling the light source control method provided by the embodiments of this application to adapt to GMSL camera imaging in different scenarios.

[0018] Secondly, embodiments of this application provide a light source control device, which includes: a transmission time determination module, a delay determination module, and a supplementary lighting module; the transmission time determination module is used to determine the light transmission time from the light source illuminating the object being photographed to the image sensor of the GMSL camera, based on the shooting distance between the GMSL camera and the object being photographed; the delay determination module is used to determine the trigger delay of the light source based on the exposure time window of the GMSL camera and the light transmission time; and the supplementary lighting module is used to control the light source to emit light according to the trigger delay.

[0019] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the implementations of the first aspect described above.

[0020] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the steps in any implementation of the first aspect described above.

[0021] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, they perform the steps in any implementation of the first aspect described above. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart of the light source control method provided in the embodiments of this application;

[0024] Figure 2 A flowchart for determining the optical transmission time provided in an embodiment of this application;

[0025] Figure 3 This is a flowchart illustrating the determination of trigger delay provided in an embodiment of this application.

[0026] Figure 4 A flowchart illustrating the process of determining the exposure time window provided in this application embodiment;

[0027] Figure 5 This is a flowchart illustrating the trigger delay optimization provided in an embodiment of this application.

[0028] Figure 6 A schematic diagram of the module of the light source control device provided in the embodiments of this application;

[0029] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. For example, the flowcharts and block diagrams in the drawings illustrate the architecture, functions, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions. In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0031] The GMSL (Gigabit Multimedia Serial Link) optical camera is an image acquisition device based on high-speed serial interface technology. It achieves long-distance, interference-resistant digital video signal transmission through coaxial cable or shielded twisted pair cable. It is widely used in autonomous driving, vehicle vision and machine vision and other fields. It can stably acquire high-definition images in complex environments and provide the hardware foundation for supplementary lighting synchronization control in low-light imaging scenarios.

[0032] In GMSL optical camera systems, the use of supplemental lighting is crucial for improving image quality under low-light conditions. However, synchronizing the timing of the supplemental lighting with the camera's exposure has always been a technical challenge. When the supplemental lighting is activated during camera exposure, it produces strong reflected light. This reflected light, when it enters the photoelectric image sensor, can cause overexposure or halos in the image.

[0033] Traditional solutions employ fixed-delay control. The inventors discovered that this method cannot adapt to differences in light transmission time across varying distances, resulting in insufficient synchronization accuracy. Particularly in dynamic scenes or zoom applications, rapid changes in object distance render fixed-delay solutions completely ineffective, severely impacting image quality under low-light conditions.

[0034] Based on this, this application proposes a light source control method, device, electronic device, and computing program product. The light source control method dynamically calculates and controls the emission time of the light source by detecting the camera exposure sequence and measuring the distance to the object in real time. This ensures that the light emitted by the light source reaches the camera sensor precisely during the camera exposure after being reflected by the object being photographed, thereby avoiding image overexposure or halo and improving image quality.

[0035] Please refer to Figure 1 , Figure 1 This application provides a flowchart of a light source control method according to an embodiment of the present application; the present application provides a light source control method that can... Figure 7 The electronic device executes the light source control method, which includes the following steps:

[0036] Step S100: Based on the shooting distance between the GMSL camera and the object being photographed, determine the light transmission time from the light source illuminating the object being photographed to the image sensor of the GMSL camera, and from the object being photographed back to the image sensor of the GMSL camera.

[0037] In step S100 above, during the shooting process, when a light source is used to illuminate the object being photographed, the light will sequentially travel a complete path from the light source, illuminating the object being photographed, being reflected by the object being photographed, and finally reaching the GMSL camera image sensor. In the above implementation process, by measuring the shooting distance between the GMSL camera and the object being photographed, and based on the principle of the speed of light propagation, the time required for the light to complete the above complete path transmission, i.e., the light transmission time, is calculated.

[0038] Step S200: Determine the trigger delay of the light source based on the exposure time window and light transmission time of the GMSL camera.

[0039] In step S200 above, the trigger delay is determined based on the camera exposure time window and the light transmission time determined in step S100. In this embodiment, in order to control the reflected light to reach the camera sensor during the exposure window, it is necessary to control the light source to be triggered in advance, and the trigger delay calculated in step S200 is the amount of time that the light source needs to be triggered in advance.

[0040] Step S300: Control the light source to emit light according to the trigger delay.

[0041] In step S300 above, a trigger signal is sent to the light source driving circuit at the corresponding time according to the calculated trigger delay parameter, thereby controlling the light source to emit light at a precise time and completing a synchronous supplementary lighting action.

[0042] Based on the trigger delay parameters obtained in step S200, delay control is achieved through a digital time converter (DTC) within a field-programmable gate array (FPGA). Specifically, the DTC generates the delay using the system clock cycle as a reference, combining coarse and fine delay adjustments. When this delay value is reached, a trigger signal is sent to the light source driving circuit to control the light source to emit light at a precise moment.

[0043] It should be noted that the light source in the embodiments of this application can be a fill light, a flash, an LED lighting unit or other active light-emitting device. Regardless of its specific light-emitting material, spectral characteristics, modulation method and driving circuit design, as long as the synchronous control method of this application, which determines the light transmission time by shooting distance, dynamically calculates the trigger delay by combining the exposure time window and controls the light emission of the light source based on the delay, is adopted, it falls within the protection scope of this application.

[0044] pass Figure 1 As can be seen, the light source control method provided in this application converts the shooting distance into light transmission time and combines it with the camera exposure time window to dynamically calculate the trigger delay, and controls the light emission time of the light source based on the trigger delay; the light source control method provided in this application can ensure that the reflected light reaches the camera sensor during the camera exposure window, ensuring the synchronization of the supplementary lighting effect and the camera exposure, thereby significantly improving the imaging quality.

[0045] Please refer to the following: Figure 2 , Figure 2 A flowchart for determining the light transmission time provided in this application embodiment; in an optional embodiment of this application embodiment, the light transmission time from the light emitted by the light source to the object being photographed and reflected back to the image sensor of the GMSL camera in step S100, based on the shooting distance between the GMSL camera and the object being photographed, can be achieved through the following steps:

[0046] Step S110: Measure multiple distances between the GMSL camera and the object being photographed using at least two distance measurement methods.

[0047] Step S120: Merge multiple measured distances to obtain the shooting distance between the GMSL camera and the object being photographed.

[0048] In steps S110 to S120 above, at least two different ranging methods are used to determine the distance between the GMSL camera and the object being photographed, and multiple measured distances are obtained; then the multiple measured distances are fused together. Fusing the distances measured based on multiple measurement methods can improve the accuracy of distance measurement.

[0049] For example, the distance between the GMSL camera and the object being photographed can be measured using the time-of-flight method and the stereo vision method, respectively. Specifically, the time-of-flight method directly calculates the distance by calculating the time difference between the emission and reception of a light pulse or modulated light wave. To improve accuracy in complex environments, multi-frequency modulation phase measurement technology can be used. The stereo vision method utilizes two cameras installed near the GMSL camera, matching the same feature point in the left and right images and calculating their parallax, and calculates the distance based on the principle of triangulation. Those skilled in the art should understand that the above ranging methods are merely examples and not limitations. In practical applications, other applicable ranging technologies can also be used, including but not limited to one or more of the following techniques: structured light method, lidar ranging method, and ultrasonic ranging method, combined for measurement. Any technical solution that uses at least two different ranging principles to obtain multiple distance measurements and then fuses the data to obtain the final shooting distance falls within the protection scope of the embodiments of this application.

[0050] Based on the distances measured by the time-of-flight method and stereo vision method, a state vector (containing distance values ​​and their rates of change) is established, and the Kalman filter algorithm is applied to fuse the measurement data from the time-of-flight method and stereo vision method. The Kalman filter algorithm can dynamically estimate the optimal state of the system, effectively filter out measurement noise, and track the dynamic changes in object distance, ultimately outputting a stable and accurate shooting distance estimate.

[0051] Step S130: Based on the principle of light speed propagation, the shooting distance is converted into the round-trip transmission time of light.

[0052] In step S130 above, based on the principle of light speed propagation, the shooting distance is converted into the round-trip transmission time of light, that is, the conversion from spatial distance to time parameter is performed.

[0053] Specifically, based on the principle of the constancy of the speed of light, the time it takes for light to travel back and forth between the camera and the object in the air... Mainly determined by shooting distance The decision, its basic relationship is as follows , where c is the speed of light.

[0054] Step S140: Add the hardware delay time to the round-trip transmission time to obtain the optical transmission time.

[0055] In step S140 above, to compensate for the inherent delays in signal transmission, processor processing, and fill light driving, the light source control method provided in this application adds a hardware delay time, pre-measured through system calibration, to the calculated round-trip transmission time. This delay is a fixed value, and the final result is the light transmission time. This compensation ensures that the theoretical calculation model matches the actual timing of the physical system, which is key to achieving high-precision synchronization.

[0056] Optionally, to achieve fast calculation, a piecewise linear distance-time lookup table can be pre-generated, and the round-trip transmission time can be obtained in real time by looking up the table. For example,

[0057]

[0058] This lookup table divides the measurement range of 1 to 10 meters into three sub-intervals: [1,3) meters, [3,6) meters, and [6,10) meters, with each interval using a different linear calculation formula. For example, in the [1,3) meter interval... In the [3,6) meter interval, In the [6,10) meter interval, The piecewise linearization design used in this application not only ensures computational efficiency but also maintains sufficient computational accuracy through slope compensation in different intervals. In addition, the constant terms in each formula are hardware latency compensation.

[0059] For example, when the object being measured is 3.5 meters away, the phase difference measured by the time-of-flight method is 1.47 radians, corresponding to a distance of 3.51 meters; the stereo vision method calculates a disparity of 28 pixels through feature point matching, corresponding to a distance of 3.48 meters. After fusing these two measurements using a Kalman filter, the optimal distance estimate of 3.49 meters is output. Then, a pre-stored piecewise linear distance-time lookup table is consulted to select the calculation formula applicable to the [3,6) meter interval. The calculated transmission time is 0.0683 milliseconds.

[0060] pass Figure 2 As can be seen, the light source control method provided in this application effectively improves the accuracy and reliability of distance measurement by integrating multiple ranging methods in the process of determining the light transmission time. Based on the principle of light speed propagation and system hardware delay compensation, it accurately converts spatial distance into time parameters. This provides a high-precision light transmission time reference for exposure synchronization control, thereby laying the foundation for achieving precise synchronization between reflected light and the camera exposure window.

[0061] Please refer to Figure 3 , Figure 3 The flowchart for determining the trigger delay provided in this application embodiment; in an optional embodiment of this application embodiment, the determination of the trigger delay of the light source based on the exposure time window and light transmission time of the GMSL camera in step S200 can be achieved through the following steps:

[0062] Step S210: Determine a target time within the exposure time window.

[0063] In step S210 above, a target time is selected within the exposure window as the ideal time point when the reflected light is expected to reach the sensor.

[0064] In a preferred embodiment, the target time is selected as the midpoint of the exposure time window. When the center of the reflected light pulse is aligned with the center of the exposure time window, the leading and trailing edges of the light pulse can obtain symmetrical exposure time margins. This symmetrical design gives the GMSL camera optimal tolerance to minute timing jitter or distance measurement fluctuations, effectively preventing underexposure due to the pulse leading edge arriving too early or signal truncation due to the pulse trailing edge arriving too late. From an image quality perspective, this ensures that the light energy received by each part of the illuminated scene is most evenly distributed during exposure, resulting in a uniformly bright and detailed image in the final image, which is beneficial for subsequent image processing and analysis.

[0065] Step S220: Based on the target time, subtract half of the light transmission time and the preheating time of the light source to determine the triggering time of the light source.

[0066] In step S220 above, a time-reverse calculation strategy is used to calculate the precise triggering time of the light source. Specifically, starting from the target time determined in step S210, half of the light transmission time is first subtracted to compensate for the one-way travel time of light from the light source to the object, and then the preheating time of the light source is subtracted to calculate the absolute triggering time of the light source. For example, taking the midpoint of the exposure time window as an example... ,in, This refers to the actual triggering time of the fill light. This is the preheating time for the light source.

[0067] The preheating time characterizes the time required for the light source to reach its rated luminous brightness after receiving the trigger signal.

[0068] Step S230: Determine the time interval between the reference time of the image frame and the trigger time of the light source to obtain the trigger delay.

[0069] In step S230 above, the absolute trigger time calculated in step S220 is converted into a relative time interval that can be used by the delay circuit, i.e., the trigger delay. This delay is calculated relative to a stable time base (usually the rising edge of the vertical synchronization signal at the beginning of a frame). The finally obtained trigger delay parameter will be sent to a hardware timer such as an FPGA to generate a trigger signal.

[0070] For example, the total trigger delay is divided into two parts: coarse adjustment delay and fine adjustment delay. The coarse adjustment delay is implemented by a counter to control the system clock cycle. The delay is an integer multiple of the time, that is, Fine-tuning the delay utilizes phase interpolation techniques to achieve sub-clock cycle accuracy, i.e. Where M is a phase selection code of 0-31. By combining coarse and fine subtraction, it can be ensured that the supplementary light is precisely triggered at the calculated moment.

[0071] pass Figure 3 As can be seen, the trigger delay calculation scheme provided in this application accurately calculates the trigger delay by deducing the one-way transmission time of the compensated light and the dynamic preheating time of the light source from the target time of the exposure window. It fully considers the physical delay of light path propagation and device response, and can ensure that the fill light is triggered at the best time, so that the reflected light falls accurately into the camera exposure window. In principle, it avoids overexposure or underexposure of the image and can improve the image quality of the GMSL camera.

[0072] In an optional implementation, the determination of the preheating time includes: determining the preheating time corresponding to the current driving current intensity based on the nonlinear relationship between the current and the preheating time, according to the current driving current intensity of the light source.

[0073] In this embodiment, the preheating time is not a fixed value, but is dynamically estimated by a mathematical model (e.g., a second-order polynomial model) that characterizes the nonlinear relationship between the driving current and the preheating time, thereby accurately compensating for the physical response delay required for the light source to emit a stable rated light intensity from receiving the electrical trigger signal.

[0074] In the above implementation process, the preheating time is determined by establishing a mapping relationship between the driving current and the preheating time, such as: The mathematical model in which For real-time drive current value, The coefficients are those calibrated through experiments. This is a constant term, representing the basic preheating time under the lowest strength. This is the coefficient for the first-order term, reflecting the trend of linear change in preheating time with intensity; The coefficient of the quadratic term reflects the nonlinear trend. In actual operation, the driving current intensity of the light source is monitored in real time and input into the above mathematical model for calculation, dynamically outputting the corresponding preheating time estimate.

[0075] Therefore, the light source control method provided in this application realizes adaptive compensation for the response characteristics of the light source under different operating currents by establishing a mathematical model of driving current and preheating time, effectively overcoming the problem of decreased synchronization accuracy under different brightness adjustment scenarios with fixed preheating time parameters.

[0076] Please refer to Figure 4 , Figure 4The flowchart for determining the exposure time window provided in this application embodiment; in an optional embodiment, before determining the trigger delay of the light source based on the exposure time window of the GMSL camera and the light transmission time in step S200, the light source control method provided in this application embodiment further includes the following steps:

[0077] Step S1: Sample the vertical and horizontal synchronization signals of the GMSL camera.

[0078] In step S1 above, the timing signal output by the GMSL camera is captured by a high-speed signal sampling circuit. For example, a sampling circuit with an operating frequency of not less than 100MHz is used. First, the LVDS level timing signal output by the camera is converted into a TTL level signal suitable for digital processing by a level conversion circuit. Then, a high-speed ADC is used to digitally sample the vertical synchronization signal and the horizontal synchronization signal at a sampling rate of at least 10 times the signal frequency.

[0079] Step S2: Establish an exposure time window model based on the timing relationship between the vertical synchronization signal and the horizontal synchronization signal.

[0080] In step S2 above, precise timing analysis is performed on the sampled digital signal. A digital signal processing algorithm is used to perform median filtering on the sampled data to eliminate random noise. Then, a sliding window differential algorithm is used to accurately detect the rising and falling edges of the signal, based on the detected start time of the vertical synchronization signal. An exposure time model was established by fitting the horizontal synchronization signal sequence using the least squares method: T exp =[ T vsync _ start + T hblank , T vsync _ end - T hblank ] ;in, This is the horizontal blanking time compensation amount, used to exclude invalid time periods during line transmission gaps; This indicates the start time of the vertical synchronization signal, marking the beginning of the acquisition of one frame of image; This indicates the end time of the vertical synchronization signal, marking the completion of one frame of image acquisition; This represents the effective exposure time window, i.e., the time interval during which the image sensor actually acquires light signals. This model uses digital signal processing algorithms to accurately fit the exposure timing parameters, thus accurately describing the actual light-sensing time period of the image sensor.

[0081] In an alternative embodiment, since changes in ambient temperature can cause delays in signal transmission, temperature compensation can also be considered to eliminate the impact of ambient temperature changes on signal transmission delays.

[0082] Step S3: Determine the exposure time window for the GMSL camera based on the time window model.

[0083] In step S3 above, based on the established exposure time window model, the specific parameters of the effective exposure time window are determined. This model allows for the accurate determination of the exposure start time. and the end of the exposure This determines the complete exposure time window. , This time window represents the effective time period during which the image sensor actually senses light, providing an accurate time reference for subsequent synchronous illumination control.

[0084] pass Figure 4 As can be seen, the embodiments of this application determine the exposure time window of the GMSL camera by establishing an exposure time window model. This model uses high-speed sampling and digital signal processing technology to accurately analyze the camera synchronization signal, ensuring the accuracy of time window detection and providing an accurate time reference for subsequent synchronous lighting control, thus ensuring the accuracy and reliability of exposure synchronization from the source.

[0085] Please refer to Figure 5 , Figure 5 This is a flowchart of the trigger delay optimization provided in an embodiment of this application; in an optional embodiment of this application, after controlling the light source to emit light according to the trigger delay in step S300 above, the light source control method further includes:

[0086] Step S410: Acquire an image of the photographed object after it has been illuminated by a light source, and calculate the image quality evaluation value of the image.

[0087] In step S410 above, an image after synchronous illumination is acquired, and a comprehensive evaluation value is calculated based on multi-dimensional image quality indicators.

[0088] Specifically, image quality can be evaluated by analyzing signal-to-noise ratio (SNR), overexposure ratio, and edge sharpness. SNR reflects the image noise level, overexposure ratio characterizes the proportion of saturated areas, and edge sharpness measures the clarity of details. These three metrics are then combined into a single quality score using a weighted summation method. ;in, These are the weighting coefficients for the three indicators, which can be configured according to different application scenarios and must meet certain requirements. .

[0089] Step S420: Using the trigger delay as a parameter to be optimized, an adaptive optimization algorithm is adopted to adjust the search strategy to optimize the trigger delay based on the iteration process and image quality evaluation value.

[0090] In step S420 above, an improved particle swarm optimization algorithm can be used to iteratively optimize the trigger delay parameter, and the trigger delay can be used as the particle position vector, with the above image quality evaluation value Q as the fitness function.

[0091] Specifically, through dynamically adjusted inertia weights To balance global exploration and local development capabilities; where k is the current iteration number, This represents the maximum number of iterations. This represents the initial maximum value of the inertia weight, corresponding to the initial stage of the optimization search; This represents the final minimum value of the inertia weight, corresponding to the convergence phase of the optimization search. In each iteration, the particle is adjusted based on its historical best position. and the best position in the neighborhood Update its speed and location ,in For acceleration coefficient, It is a random number. Let be the position vector of particle i in the kth generation. This application, through the aforementioned adaptive optimization mechanism, can continuously approach the optimal synchronization moment.

[0092] pass Figure 5 As can be seen, the embodiments of this application achieve closed-loop adaptive optimization of the trigger delay parameter by establishing an evaluation system based on multi-dimensional image quality indicators and improving the particle swarm optimization algorithm; thus enabling the light source control method provided by the embodiments of this application to adapt to GMSL camera imaging in different scenarios.

[0093] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the modules of the light source control device provided in the embodiments of this application; the embodiments of this application provide a light source control device 100, which includes: a transmission time determination module 110, a delay determination module 120 and a supplementary light module 130.

[0094] The transmission time determination module 110 is used to determine the light transmission time from the light source illuminating the object to the object and being reflected back to the image sensor of the GMSL camera, based on the shooting distance between the GMSL camera and the object being photographed.

[0095] The delay determination module 120 is used to determine the trigger delay of the light source based on the exposure time window and light transmission time of the GMSL camera.

[0096] The supplementary lighting module 130 is used to control the light source to emit light according to the trigger delay.

[0097] In an optional embodiment, during the process of determining the light transmission time from the light source illuminating the object to the object and being reflected back to the image sensor of the GMSL camera based on the shooting distance between the GMSL camera and the object being photographed, the transmission time determination module 110 is specifically used to: measure multiple measured distances between the GMSL camera and the object being photographed using at least two distance measurement methods; fuse the multiple measured distances to obtain the shooting distance between the GMSL camera and the object being photographed; convert the shooting distance into the round-trip transmission time of light based on the principle of light speed propagation; and superimpose a hardware delay time on the round-trip transmission time to obtain the light transmission time.

[0098] In an optional embodiment, during the process of determining the trigger delay of the light source based on the exposure time window and light transmission time of the GMSL camera, the delay determination module 120 is specifically used to: determine a target time within the exposure time window; subtract half of the light transmission time and the preheating time of the light source from the target time to determine the trigger time of the light source; wherein, the preheating time characterizes the time required for the light source to reach its rated luminous brightness from receiving the trigger signal; and determine the time interval between the reference time of the image frame and the trigger time of the light source to obtain the trigger delay.

[0099] In an optional embodiment, the target time includes the midpoint of the exposure time window.

[0100] In an optional embodiment, the delay determination module 120 is specifically used in the process of determining the preheating time to: determine the preheating time corresponding to the current driving current intensity based on the nonlinear relationship between the current and the preheating time, according to the current driving current intensity of the light source.

[0101] In an optional embodiment, before determining the trigger delay of the light source based on the exposure time window and light transmission time of the GMSL camera, the light source control device 100 is further configured to: sample the vertical synchronization signal and the horizontal synchronization signal of the GMSL camera; establish an exposure time window model based on the timing relationship between the vertical synchronization signal and the horizontal synchronization signal; and determine the exposure time window of the GMSL camera according to the time window model.

[0102] In an optional embodiment, after controlling the light source to emit light according to the trigger delay, the light source control device 100 is further configured to: acquire an image of the photographed object after being illuminated by the light source, and calculate the image quality evaluation value of the image; use the trigger delay as a parameter to be optimized, and adopt an adaptive optimization algorithm to adjust the search strategy to optimize the trigger delay according to the iteration process and the image quality evaluation value.

[0103] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. An electronic device 200 provided in this application includes: a processor 201 and a memory 202. The memory 202 stores machine-readable instructions executable by the processor 201. When the machine-readable instructions are executed by the processor 201, they perform the steps in any implementation of the aforementioned light source control method.

[0104] Based on the same inventive concept, embodiments of this application also provide a computer program product including a computer program / instruction, which, when executed by a processor, performs the steps in any implementation of the above-described light source control method.

[0105] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, they perform the steps in any implementation of the above-described light source control method.

[0106] Computer-readable storage media can be any medium capable of storing program code, such as Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM).

[0107] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0108] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A light source control method, characterized in that, The light source is used to provide supplemental lighting for the GMSL camera, and the method includes: Based on the shooting distance between the GMSL camera and the object being photographed, the light transmission time from the light source illuminating the object being photographed to the image sensor of the GMSL camera is determined. The trigger delay of the light source is determined based on the exposure time window of the GMSL camera and the light transmission time. The light source is controlled to emit light based on the trigger delay.

2. The method according to claim 1, characterized in that, The step of determining the light transmission time from the light source illuminating the object to the object and then reflecting back to the image sensor of the GMSL camera based on the shooting distance between the GMSL camera and the object being photographed includes: Multiple distance measurements between the GMSL camera and the object being photographed were obtained using at least two distance measurement methods. By fusing multiple measured distances, the shooting distance between the GMSL camera and the object being photographed is obtained; Based on the principle of light speed propagation, the shooting distance is converted into the round-trip transmission time of the light. The optical transmission time is obtained by adding the hardware delay time to the round-trip transmission time.

3. The method according to claim 1, characterized in that, The determination of the trigger delay of the light source based on the exposure time window of the GMSL camera and the light transmission time includes: A target time is determined within the exposure time window; Based on the target time, half of the light transmission time and the preheating time of the light source are subtracted to determine the trigger time of the light source; wherein, the preheating time characterizes the time required for the light source to reach its rated luminous brightness from receiving the trigger signal; The trigger delay is obtained by determining the time interval between the reference time of the image frame and the trigger time of the light source.

4. The method according to claim 3, characterized in that, The target time includes the midpoint of the exposure time window.

5. The method according to claim 3, characterized in that, The determination of the preheating time includes: Based on the current driving current intensity of the light source, and based on the nonlinear relationship between current and preheating time, the preheating time corresponding to the current driving current intensity is determined.

6. The method according to claim 1, characterized in that, Before determining the trigger delay of the light source based on the exposure time window of the GMSL camera and the light transmission time, the method further includes: The vertical synchronization signal and horizontal synchronization signal of the GMSL camera are sampled; An exposure time window model is established based on the timing relationship between the vertical synchronization signal and the horizontal synchronization signal. The exposure time window of the GMSL camera is determined based on the time window model.

7. The method according to claim 1, characterized in that, After controlling the light source to emit light according to the trigger delay, the method further includes: Acquire an image of the photographed object after it has been illuminated by the light source, and calculate the image quality evaluation value of the image; The trigger delay is used as a parameter to be optimized. An adaptive optimization algorithm is adopted to adjust the search strategy according to the iteration process and the image quality evaluation value in order to optimize the trigger delay.

8. A light source control device, characterized in that, The light source control device includes: a transmission time determination module, a delay determination module, and a supplementary lighting module; The transmission time determination module is used to determine the light transmission time from the light source illuminating the object being photographed to the image sensor of the GMSL camera, based on the shooting distance between the GMSL camera and the object being photographed. The delay determination module is used to determine the trigger delay of the light source based on the exposure time window of the GMSL camera and the light transmission time; The supplementary lighting module is used to control the light source to emit light according to the trigger delay.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores program instructions, and when the processor executes the program instructions, it performs the steps of the method according to any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Flash synchronization using image sensor interface timing signal

    CN102547302A

  • Light supplementing method, imaging device, electronic equipment and readable storage medium

    CN114245042A

  • Range gating imaging system

    CN115980779A

  • Laser stroboscopic illumination DIC imaging system and non-contact high-temperature or ultrahigh-temperature strain field analysis method

    CN118602970A

  • Driving circuit, imaging apparatus, and driving method

    JP2008289017A