Infrared flash grab method, medium, program product, camera and system
Patent Information
- Application Number
- CN202511519543.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-10-23
AI Technical Summary
[0003]本发明的实施例提供了一种红外爆闪抓拍方法、介质、程序产品、摄像机及系统,通过动态标定解决爆闪抓拍方法针对多车速场景适应性较差的问题
[0033]本发明实施例的技术方案采用预先经过训练的爆闪图像质量评分AI模型,通过对爆闪抓拍获取的图像如车内图像与车牌图像进行量化评分,形成了闭环优化机制;其中,对于合格的图像即评分较优的图像,自动生成对应车速爆闪参数如爆闪位置等轨迹标定数据;对于评分较差的图像,依据预设的修正策略,通过爆闪时机前置或后置来调整修正爆闪参数;实现了与车速对应的爆闪参数的动态标定;使用本发明实施例的技术方案,通过几组相近车速的数据迭代,可快速收敛至正确的爆闪位置标定,构建了“检测-评估-调整”的完整闭环链路;有效解决了传统静态标定方法在多车速场景下适应性差的问题。
Smart Images

Figure CN121218042B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic strobe light capture, and in particular to an infrared strobe capture method, medium, program product, camera and system. Background Technology
[0002] In existing traffic strobe light capture systems, video analysis inherently suffers from frame delays, causing a discrepancy between the vehicle's actual position and the strobe trigger moment. This discrepancy widens with increasing vehicle speed, ultimately resulting in poor image quality, manifested as blurred faces inside the vehicle and overexposed license plates. Furthermore, since the strobe light spot range is typically only 2-3 meters, specific adaptations for a single vehicle speed will inevitably lead to inaccurate strobe positioning at other speeds. In conclusion, existing traffic strobe light capture solutions generally suffer from weak vehicle speed adaptation capabilities. Summary of the Invention
[0003] The embodiments of the present invention provide an infrared strobe capture method, medium, program product, camera and system, which solves the problem of poor adaptability of the strobe capture method to multi-vehicle speed scenarios through dynamic calibration.
[0004] To achieve the above objectives, on the one hand, a control method for a computer system is provided:
[0005] An infrared strobe light capture method is provided, applied to an infrared strobe light capture system. The infrared strobe light capture system includes: a camera and an infrared strobe light connected to the camera. The method is characterized in that the camera controls its own exposure to synchronize with the strobe light's flash. The infrared strobe light capture method includes the following steps performed by the camera:
[0006] S1, when the first vehicle enters the camera's view, the position of the first vehicle in the image is identified in real time, and when the vehicle enters the preset detection area, the strobe light is triggered to flash.
[0007] S2, use a pre-trained strobe image quality scoring AI model to score the first frame image obtained when the strobe light flashes, wherein the scoring indicators include one or more of the following: license plate reflectivity uniformity, in-vehicle face clarity and human feature integrity.
[0008] S3, when the score of the first frame image is greater than or equal to a preset qualified threshold, it is determined that the strobe position of the strobe light is reasonable, and the relative speed of the first vehicle and the corresponding first strobe parameter are stored in a preset calibration library; when a second vehicle with a speed close to that of the first vehicle enters the camera's view, the first strobe parameter is selected from the calibration library to strobe the second vehicle; wherein, the strobe parameter includes the strobe position of the strobe light, and the strobe position is identified by the position of the vehicle in the frame image corresponding to the strobe; wherein, when the difference between the relative speed of the second vehicle and the relative speed of the first vehicle is less than a predetermined difference threshold, it is determined that the speeds of the first vehicle and the second vehicle are close;
[0009] S4, when the score of the first frame image is less than a preset qualified threshold, it is determined that the strobe position of the strobe light is unreasonable, the relative speed of the first vehicle and the corresponding first strobe parameter are recorded, the strobe position is corrected according to the strobe defect shown in the first frame image, and the corrected second strobe parameter is obtained and saved; when a second vehicle with a speed close to that of the first vehicle enters the camera frame, the second strobe parameter is used for strobe; wherein, when the strobe defect is strobe too early, the strobe position is delayed by a predetermined number of frames; when the strobe defect is strobe too late, the strobe position is advanced by a predetermined number of frames.
[0010] Preferably, the infrared strobe light capture method further includes one or more of the following:
[0011] When delaying the strobe position by a predetermined number of frames: Corrected strobe position = Previous strobe position + Corresponding relative speed × Duration corresponding to the predetermined number of frames;
[0012] When the strobe position is pre-determined by a number of frames: Corrected strobe position = Previous strobe position - Corresponding relative speed × Duration corresponding to the pre-determined number of frames;
[0013] The location of a vehicle is identified by the position of its license plate within the frame image.
[0014] The predetermined number of frames is 1 frame.
[0015] Preferably, the infrared strobe light capture method further includes:
[0016] After performing a strobe effect using the second strobe parameter, steps S2 to S4 are repeated. The pre-trained strobe image quality scoring AI model is used to score the frame image obtained when performing a strobe effect using the second strobe parameter. Based on the scoring results, step S3 is used to store the corresponding relative speed and the corresponding strobe parameter into the calibration library for subsequent use, or step S4 is used to further correct the second strobe parameter.
[0017] Preferably, in the infrared strobe light capture method, the strobe defects include: license plate overexposure, license plate underexposure, light spot shift, and / or blurred faces inside the vehicle; wherein:
[0018] When the license plate is overexposed, determining the strobe location is too early;
[0019] When the license plate is underexposed, determining the strobe position is too late;
[0020] If the strobe spot obtained is shifted forward compared to the predetermined expected position, then the strobe position is too early.
[0021] When the light spot generated by the strobe is located on the roof of the car, the strobe position is too late;
[0022] If the light spot obtained by the strobe is shifted backward compared to the predetermined expected position of the light spot, then the strobe position is too late.
[0023] The flash was applied too early when the faces inside the car were blurry.
[0024] Preferably, in the infrared strobe light capture method, when there is a defect of blurred faces inside the vehicle, after correcting the strobe position for the strobe defect of light spot shift, further correction is made to the strobe position for the face blur defect to obtain corrected strobe parameters; wherein, further correction of the strobe position for the face blur defect includes:
[0025] The strobe position is advanced using a fixed offset predetermined according to the frame rate; the fixed offset is the time of one frame at the frame rate; the advanced strobe position = the original strobe position - the corresponding relative speed × the fixed offset.
[0026] Preferably, the infrared strobe light capture method further includes recording the following information about the first vehicle when it enters the camera's field of view:
[0027] The vehicle's trajectory, the vehicle's position offset between multiple frames, and the time offset corresponding to the vehicle's position offset; wherein, the relative speed of the first vehicle = vehicle position offset / time offset; wherein, the unit of relative speed is pixels / m milliseconds; M is a predetermined number.
[0028] On the other hand, a computer-readable storage medium is provided, wherein at least one program is stored therein, the at least one program being executed by a processor to implement the steps of the infrared strobe light capture method as described above.
[0029] In another aspect, a computer program product is also provided, comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the infrared strobe light capture method described above.
[0030] In another aspect, a camera is also provided, the camera including a processor, a memory and an image sensor, the memory storing at least one program, the at least one program being executed by the processor to implement the steps of the infrared strobe capture method as described above.
[0031] On the other hand, an infrared strobe light capture system is also provided, including: a camera as described above and an infrared strobe light connected to the camera.
[0032] The above technical solution has the following technical effects:
[0033] The technical solution of this invention adopts a pre-trained AI model for strobe image quality scoring. By quantitatively scoring images captured by strobe detection, such as in-vehicle images and license plate images, a closed-loop optimization mechanism is formed. Specifically, for qualified images (i.e., images with high scores), trajectory calibration data such as strobe position and corresponding vehicle speed strobe parameters are automatically generated. For images with poor scores, the strobe parameters are adjusted and corrected by adjusting the strobe timing earlier or later according to a preset correction strategy. This achieves dynamic calibration of strobe parameters corresponding to vehicle speed. Using the technical solution of this invention, through iteration with several sets of data at similar vehicle speeds, the correct strobe position calibration can be quickly converged, constructing a complete closed-loop link of "detection-evaluation-adjustment." This effectively solves the problem of poor adaptability of traditional static calibration methods in multi-vehicle speed scenarios.
[0034] In a further embodiment, a reference system is established based on multiple sets of data calibration, namely the correspondence between vehicle speed and reference strobe parameters. Combined with dynamic parameters such as vehicle speed and real-time vehicle position, the coordinate system can be continuously improved, further enhancing the correction efficiency of strobe parameters.
[0035] Furthermore, the method of this embodiment of the invention has low hardware performance requirements and strong compatibility. Specifically, the method of this embodiment of the invention can achieve early flash control for high-speed vehicles, and can meet the requirements for accurate capture in high-speed scenes even on ordinary 25-frame camera equipment. It does not require additional high-performance hardware, which greatly reduces the cost of the solution, and can be directly adapted to most existing traffic capture equipment, thus having good compatibility and scalability. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating an embodiment of the infrared strobe light capture method of the present invention;
[0037] Figure 2This is a schematic diagram of the image captured by the camera in one embodiment of the present invention;
[0038] Figure 3 This is a flowchart illustrating another embodiment of the infrared strobe light capture method of the present invention;
[0039] Figure 4 This is a schematic diagram of the selected detection area in one embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of the license plate area and the vehicle interior area marked in the camera image in one embodiment of the present invention;
[0041] Figure 6 This is an example of a frame image obtained during an invalid flash, as described in one embodiment of the present invention. Detailed Implementation
[0042] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments and to explain the operating principles of the embodiments in conjunction with the relevant descriptions in the specification. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0043] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0044] In researching the common problem of weak vehicle speed adaptation capability in existing traffic flashing light capture solutions, the inventors of this application discovered the following specific problems with existing traffic flashing light capture solutions:
[0045] 1. High cost and difficult deployment: Some solutions use a multi-sensor architecture combining radar and ground loop coils to achieve strobe capture. Not only is the hardware procurement cost expensive, but it also has stringent requirements for the installation environment (such as road excavation and signal synchronization calibration), resulting in a complex on-site deployment process and a long cycle.
[0046] 2. Weak vehicle speed adaptive capability: The strobe capture solution, which uses pure visual AI to identify vehicle position, is limited by the latency difference between video frames and real time. By the time the strobe is triggered, the vehicle has often moved more than 100 milliseconds. The faster the vehicle speed, the longer the distance the vehicle travels in this time period, which leads to the strobe light's illumination position shifting at different vehicle speeds, making it impossible to accurately capture key information such as the status of people inside the vehicle and license plate information.
[0047] 3. Stringent hardware performance requirements: Some solutions rely on high-performance cameras, reducing video frame latency by increasing the video frame rate (e.g., using 90fps high-speed IPC) and AI computing power. For example, with the same latency of 4 frames, a 90fps device only produces a 44ms latency, while a regular 25fps device has a latency of 160ms. Although hardware performance optimization can reduce vehicle movement distance and improve the accuracy of strobe positioning, high-performance hardware significantly increases the overall solution cost, hindering large-scale deployment and application.
[0048] Example 1:
[0049] Figure 1 This is a flowchart illustrating an infrared strobe light capture method according to an embodiment of the present invention. The infrared strobe light capture method of this embodiment is applied to an infrared strobe light capture system, which includes a camera and an infrared strobe light connected to the camera. The camera controls its own exposure to synchronize with the strobe light's flash. Preferably, the camera includes a processor such as an MCU and an image sensor; the camera controls its own exposure time, such as by controlling the image sensor's exposure time via the processor, to completely cover the strobe light's illumination cycle, thus avoiding missed or blurred images due to asynchrony between exposure and flash. The infrared strobe light capture method of this embodiment includes the following steps performed by the camera:
[0050] S1, when the first vehicle enters the camera's view, the position of the first vehicle in the image is identified in real time, and the strobe light is triggered when the vehicle enters the preset detection area; in one specific implementation, the position of the license plate in the image is used to identify the position of the vehicle in the image; in this step, the position of the license plate of the first vehicle in the image is identified in real time, and the strobe light is triggered when the license plate enters the preset detection area; in other implementations, the position of other marking components in the vehicle can be selected to identify the vehicle's position;
[0051] Preferably, the distance between the upper edge of the detection area and the upper border of the camera screen is greater than a predetermined distance threshold, so that there is a certain space after the vehicle enters the camera screen but before entering the detection area to form the vehicle's running trajectory, so as to facilitate the analysis of the vehicle's operation.
[0052] In one specific implementation, the distance between the upper edge of the detection area in the camera frame and the upper border of the camera frame corresponds to an actual distance of 5-10 meters;
[0053] Figure 2 This is a schematic diagram of the image captured by the camera in one embodiment of the present invention; Figure 2 In the image, the blue box represents the preset detection area; in this example, the detection area is rectangular, but in other implementations, the detection area can be other shapes.
[0054] S2, use a pre-trained AI model to score the first frame image obtained when the strobe light is triggered, where the scoring indicators include one or more of the following: license plate reflectivity uniformity, clarity of face inside the vehicle, and integrity of human features.
[0055] In one specific implementation, the AI model for scoring the quality of the strobe image is the existing LAR-IQA (Label-Aware Resolution for Image Quality Assessment) image quality assessment model. Using this image quality assessment model, an image quality score can be obtained. The implementation of this assessment model itself is existing technology and is not an improvement point of this invention, so it will not be described in detail here.
[0056] S3, when the score of the first frame image is greater than or equal to the preset qualified threshold, the strobe position of the strobe light is determined to be reasonable, and the relative speed of the first vehicle and the corresponding first strobe parameters are stored in the preset calibration library; wherein, the strobe parameters include the strobe position of the strobe light, and the strobe position is identified by the position of the vehicle in the frame image corresponding to the strobe; when a second vehicle with a speed close to that of the first vehicle enters the camera's field of view, the first strobe parameters are selected from the calibration library to strobe the second vehicle; wherein, when the difference between the relative speed of the second vehicle and the relative speed of the first vehicle is less than a predetermined difference threshold, it is determined that the speeds of the first vehicle and the second vehicle are close;
[0057] In one specific implementation, when the first vehicle enters the camera's view, the following information about the first vehicle is also recorded: the movement trajectory of the license plate, the vehicle position offset between multiple frames, and the time offset corresponding to the vehicle position offset.
[0058] Wherein, the relative speed of the first vehicle = vehicle position offset / time offset; the unit of relative speed is: pixels / M milliseconds; M is a predetermined number; in one specific implementation, M = 100, that is, the number of pixels the vehicle passes through every 100 milliseconds is used to measure the relative speed of the vehicle in the frame; in a specific implementation, the first position of the vehicle in the frame, such as the position where the vehicle enters the frame, and the second position of the vehicle in the frame, such as the position where the vehicle enters the detection area, are selected to calculate the offset of the vehicle position, and this offset is identified by the number of pixels;
[0059] The following uses, for example Figure 2 To explain the calculation of the relative speed of vehicles in the image. For example, Figure 2 The image shown has a resolution of 2464×2056, meaning it is 2464 pixels long and 2056 pixels high. Figure 2The red line at the top of the screen is the first red line, used to mark the position where the vehicle enters the screen. Let this position be s1, and the entry time be recorded as t1, such as 100ms. Let the pixel position of the first red line be 2000. The red line closer to the blue frame is the second red line, used to mark the position where the vehicle reaches the detection area, s2. Let this position be recorded as t2, such as 800ms. The pixel position corresponding to this position is 1600. Then the relative speed of the vehicle is [(s2-s1) / (t2-t1)]×100. This formula means that after 700ms, the vehicle has passed 400 pixels in the screen, so the relative speed is 57.14 pixels per 100ms.
[0060] S4, when the score of the first frame image is less than a preset passing threshold, the strobe position is determined to be unreasonable. The relative speed of the first vehicle and the corresponding first strobe parameter are recorded. Based on the strobe defect shown in the first frame image, the strobe position is corrected, and the corrected second strobe parameter is obtained and saved. Specifically, when the strobe defect is strobe too early, the strobe position is delayed by a predetermined number of frames; when the strobe defect is strobe too late, the strobe position is advanced by a predetermined number of frames. When a second vehicle with a speed close to that of the first vehicle enters the camera's view, the second strobe parameter is used for strobe. Preferably, the predetermined number of frames is 1 frame; that is, when adjusting the strobe position, the strobe position, i.e., which frame to strobe, is adjusted by advancing or delaying by one frame each time.
[0061] Wherein: delaying the strobe position by a predetermined number of frames means: corrected strobe position = previous strobe position + corresponding relative speed × duration corresponding to the predetermined number of frames; advancing the strobe position by a predetermined number of frames means: corrected strobe position = previous strobe position - corresponding relative speed × duration corresponding to the predetermined number of frames. Preferably, the unit of relative speed is pixels / 100ms; the unit of duration corresponding to the predetermined number of frames is ms.
[0062] Preferably, the infrared strobe light capture method of the present invention further includes: after performing a strobe using the second strobe parameter, repeating steps S2 to S4, using a pre-trained strobe image quality scoring AI model to score the frame image obtained when performing a strobe using the second strobe parameter, and based on the scoring result, using step S3 to store the corresponding relative speed and the corresponding strobe parameter into the calibration library for subsequent use, or using step S4 to further correct the second strobe parameter.
[0063] The correction process continues until a strobe parameter is obtained that causes the score of the strobe frame image to exceed the preset qualified threshold. The obtained strobe parameter is then stored in the calibration library as the calibration strobe parameter corresponding to the relative speed.
[0064] Preferably, the strobe defects include: license plate overexposure, license plate underexposure, light spot shift, and / or blurred faces inside the vehicle; wherein:
[0065] When the license plate is overexposed, determining the strobe location is too early;
[0066] When the license plate is underexposed, determining the strobe position is too late;
[0067] If the strobe spot obtained is shifted forward compared to the predetermined expected position, then the strobe position is too early.
[0068] When the light spot generated by the strobe is located on the roof of the car, the strobe position is too late;
[0069] If the light spot obtained by the strobe is shifted backward compared to the predetermined expected position of the light spot, then the strobe position is too late.
[0070] The flash was applied too early when the faces inside the car were blurry.
[0071] When a blurry face exists inside the vehicle, after correcting the strobe position for the strobe defect caused by light spot shift, the strobe position is further corrected for the blurry face defect to obtain the corrected strobe parameters. The further correction of the strobe position for the blurry face defect includes:
[0072] The strobe position is advanced using a fixed offset predetermined according to the frame rate; the fixed offset is the time of one frame at the frame rate; the advanced strobe position = the original strobe position - the corresponding relative speed × the fixed offset.
[0073] In one specific implementation, this correction process is continuously and dynamically performed until, for the corresponding vehicle relative speed, a strobe parameter is obtained that makes the score of the strobe frame image greater than a preset acceptable threshold. This obtained strobe parameter is then used as the calibration strobe parameter for that corresponding relative speed. Subsequently, for vehicles with similar relative speeds, the calibration strobe parameter can be directly called for strobe activation. In a specific implementation, when the score of the strobe frame image for a vehicle at a certain relative speed does not exceed the acceptable threshold (i.e., it is unacceptable), its corresponding strobe parameter is still recorded. This strobe parameter is then corrected, and the corresponding corrected strobe parameter is recorded. When vehicles with similar speeds pass by, the corrected calibration parameter is used to trigger strobe activation, and the quality of the strobe frame image is re-evaluated. If quality issues still exist, the "evaluation-correction" process is repeated until a high-quality image is obtained.
[0074] In a further embodiment, after obtaining the correct strobe position through correction, the adjustment direction of the abnormal calibration is determined in reverse, such as moving the strobe position forward or backward, based on the obtained correct strobe position, i.e., the "vehicle position reference after correct strobe," which can further improve the correction efficiency. The aforementioned correct strobe refers to a qualified or valid image obtained during strobe when the frame image has a score exceeding the qualified threshold.
[0075] Example 2:
[0076] The implementation principle of the infrared strobe light capture method of this embodiment of the invention includes:
[0077] 1. Hardware Synchronization Control Mechanism: The camera's image sensor adopts a slave mode, and the processor, such as a microcontroller unit (MCU), uniformly and synchronously controls the camera's exposure and strobe activation. Through the inter-core communication mechanism, the SOC sends the exposure time, and the strobe is turned on when the MCU PWM outputs a high level, ensuring that the exposure time completely covers the strobe activation cycle and avoiding missed or blurry images caused by asynchrony between exposure and strobe.
[0078] 2. Triggering Logic and Image Recognition: The vehicle license plate position is identified in real time using a target recognition algorithm such as YOLOv5S. When the license plate enters the preset detection area, in order to be compatible with high vehicle speeds and ensure that the vehicle is still in the frame when the screenshot is taken, the MCU immediately triggers the flashing light to light up. After acquiring the image data of this frame, further analysis tasks such as license plate information extraction and seat belt wearing status recognition of the occupants are performed.
[0079] 3. Infrared Blast Image Features and Model Training: This solution uses an infrared strobe light, and the captured images are in black and white mode. When the strobe light shines correctly into the car window, the image exhibits significant features: the license plate shows a clear reflective effect due to infrared reflection, and details such as the outline of the human body and facial features inside the car are highly recognizable. High-quality and low-quality images, including those with exposure defects such as overexposure, blurriness, and light spot shift, are collected in advance to construct a training dataset. This dataset is used to train the strobe image quality scoring AI model, enabling automated quantitative evaluation of the captured image quality.
[0080] 4. Closed-loop optimization and calibration update mechanism:
[0081] High-quality image calibration process: Images of the vehicle interior and license plate are captured. The AI model described above scores three indicators: "license plate reflectivity uniformity (this indicator is used to avoid overexposure / underexposure), clarity of faces inside the vehicle, and / or integrity of human features." If the score is higher than a preset acceptable threshold, such as 85 points, the strobe position is considered reasonable. Simultaneously, the license plate movement trajectory, vehicle position offset (Δs), time offset (Δt), and strobe trigger position between multiple frames are recorded. Reference strobe parameters for the corresponding vehicle speed (i.e., the relative speed of the vehicle) are calculated and stored in the calibration library. When encountering vehicles with similar speeds, these parameters are used to ensure a strobe is triggered at the same position, guaranteeing accurate image capture.
[0082] Poor image correction process: If the initial capture does not yield a high-quality image, the current strobe information is still recorded, and the cause of the problem is analyzed using an AI model:
[0083] If the license plate is determined to be obviously overexposed, it means that the strobe timing is too early. The original calibration position needs to be corrected and the strobe trigger timing is delayed by one frame.
[0084] If the light spot is determined to be located on the roof of the car (not covering the car body / windows), it means that the strobe timing is too late and the original calibration position needs to be corrected to advance the strobe trigger timing by one frame.
[0085] When vehicles with similar speeds pass by, the corrected calibration parameters are used to trigger the strobe effect. If quality issues persist, the "evaluation-correction" process is repeated until a high-quality image is obtained. Simultaneously, based on the established "vehicle position reference after correct strobe effect," the direction of adjustment for abnormal calibration is determined in reverse, such as the timing of the strobe effect being forward or backward, further improving correction efficiency.
[0086] 5. Multi-speed adaptation effect: Through the above process, multiple sets of optimal strobe timing calibration data at different vehicle speeds are generated, so that the strobe light can be lit in the appropriate position under different vehicle speed scenarios, ensuring that the light accurately enters the car window and obtains high-quality capture images.
[0087] Figure 3 This is a flowchart illustrating the infrared strobe light capture method according to an embodiment of the present invention. In one specific implementation of this embodiment, the infrared strobe light capture method is implemented based on the Hisilicon SD3402 platform; other applicable platforms can be selected in other implementations. Figure 3 The infrared strobe light capture method of this embodiment of the invention includes the following steps:
[0088] Step 1: System Initialization Configuration
[0089] Pre-set the parameters of the detection area in the system, such as setting the range of the detection area. Figure 4An exemplary detection area is shown, as indicated by the blue box. In one specific implementation, the detection area is set by dragging on the screen. In this example, a certain amount of space is reserved in the upper half of the detection area to form the vehicle's trajectory. Different strobe lights have different brightness levels; prolonged illumination may cause image overexposure. The illumination cycle of the strobe lights is pre-configured according to the strobe lights used, ensuring that the exposure of the image sensor is synchronized with the strobe light's flash. A pre-trained strobe image quality scoring AI model, based on the LAR-IQA model, is loaded, thus completing the basic configuration before system startup.
[0090] Step 2: Vehicle detection and initial strobe triggering
[0091] When a vehicle enters a preset detection area, the license plate position is identified in real time using a pre-defined target recognition algorithm such as YOLOv5s, triggering the MCU to activate a strobe light and estimating the current relative vehicle speed v. In one specific implementation, the current relative vehicle speed is estimated based on video frame trajectory analysis; the estimation method is as follows:
[0092] 1) For example, if the license plate position is 400 pixels away and the time taken is t1, then the speed v1 can be obtained, in pixels / 100ms, that is, how many pixels are traveled in 100ms.
[0093] 2) Using this method, several sets of data corresponding to different vehicle speeds were calibrated, such as v2, v3, and the positions of the flashing vehicles s2, s3.
[0094] The calibration library is called to obtain the strobe position parameters corresponding to similar vehicle speeds as the initial strobe position and the corresponding strobe timing t0. That is, the strobe flashes at time t0, the MCU controls the strobe light to light up, and the camera is exposed at the same time to complete the image acquisition.
[0095] Step 3: Image quality assessment and judgment
[0096] After acquiring the image, the license plate area and a predetermined area inside the vehicle are cropped from the acquired image. The cropped image is then input into the AI scoring model for scoring. Figure 5 The red boxes in the image indicate examples of the license plate area and the interior area of the vehicle to be captured; the interior area is usually the area of the windshield, i.e., the area where the driver can be seen.
[0097] If the score output by the AI model is greater than or equal to the preset passing threshold, such as 85 points, it is determined to be a valid strobe. The "vehicle speed-strobe timing-image features" data corresponding to this strobe are stored in the calibration library to strengthen the reference system for the corresponding vehicle speed. The strobe timing is the strobe position, corresponding to the current frame. The vehicle speed is the relative speed. The image features include image features related to the scoring indicators mentioned above, such as the uniformity of license plate reflection (this indicator is used to avoid overexposure / underexposure), the clarity of the face inside the vehicle and / or the integrity of human features, and may also include: whether the light spot is offset, etc.
[0098] If the model output score is less than the preset threshold, it is determined to be an invalid flash and enters the parameter correction process.
[0099] When the frame image quality during a strobe flash is satisfactory, it is considered a valid strobe flash, and this calibration is completed, with the strobe-related data stored in the calibration library. The process then repeats until the next vehicle enters the camera's view. The quality of the frame image is determined by whether the AI model's score is greater than or equal to a preset scoring threshold; a satisfactory image clearly shows the license plate and driver.
[0100] Step 4: Correcting strobe parameters, i.e., handling invalid strobe.
[0101] The AI model is used to analyze the problem types of invalid images and calculate the correction amount.
[0102] License plate overexposed → strobe timing too early → correction amount is "delay 1 frame";
[0103] If the light spot is offset, such as the light spot obtained by the flash being located on the roof of the car, it is inferred that the flash timing is too late → the correction amount is "1 frame earlier";
[0104] Blurred faces inside vehicles → After correcting for the light spot shift issue, the blurriness of the face is assessed again. If it is below the sharpness threshold, a fixed offset Δt predetermined based on the frame rate is used for correction. After multiple attempts, a better value is selected for calibration based on the scoring results. This fixed offset corresponds to the time of shifting one frame at the corresponding frame rate. In one specific implementation, when the frame rate is 25-30 frames per second, Δt = 33.3ms-40ms. Therefore, the method of this embodiment has low hardware performance requirements and strong compatibility. By implementing pre-flash control for high-speed vehicles, it can meet the accurate capture requirements in high-speed scenes even on ordinary 25-frame camera equipment, without the need for additional high-performance hardware, significantly reducing the cost of the solution. Furthermore, it can be directly adapted to most existing traffic capture equipment, possessing good compatibility and scalability.
[0105] In the experiment, when using the method of the present invention to correct the strobe parameters according to the relative speed of the vehicle, a relatively good effect can generally be achieved after 3-5 frames of correction.
[0106] In one specific implementation, the license plate position is located based on a predetermined target detection algorithm such as YOLOv5s, and brightness calculation is performed according to the traditional OpenCV algorithm to determine whether the license plate is overexposed; the clarity of the face inside the car is judged based on a pre-trained LAR-IQA model; the vehicle and window positions are located based on a predetermined target detection algorithm such as YOLOv5s, and the position of the light spot is obtained by brightness threshold segmentation using the traditional OpenCV algorithm; then the offset of the light spot obtained by the strobe is confirmed, for example, to determine whether the light spot is on the window, the rear half of the vehicle such as the roof, or other places.
[0107] Figure 6 This is an example of a frame image obtained when there is an invalid strobe. For example... Figure 6 As shown, the human features inside the vehicle are not obvious, and the light spot is not on the vehicle but on the ground in front of it, indicating that the strobe timing is too early. The method of this embodiment automatically adjusts the strobe timing, delays the strobe, and reconstructs the calibration. Specifically, if the previously recorded strobe parameters are calibrated as: relative speed v1, and the strobe timing is the pixel position of the license plate reaching s1; since the current determination is to delay the strobe, the license plate position in the next frame is calculated based on the relative speed, resulting in a new strobe position s2, which is used as the new calibration corresponding to the relative speed v1.
[0108] Application Case Description:
[0109] 1. Vehicle A enters the detection area at 60km / h, and its relative speed is calculated as v1;
[0110] 2. In the initial state, the initial flashing timing is set to the upper edge s1 of the detection area's corresponding border. For example, this position corresponds to y = 200px, meaning that the flashing occurs as soon as the vehicle enters the detection area. In one specific implementation, the vehicle's position is identified by the license plate position; that is, whether the vehicle has entered the detection area is determined by detecting whether the license plate has entered the detection area.
[0111] 3. After performing a strobe flash and capturing the image, the facial clarity score was 70 points, which is below the passing threshold of 85 points;
[0112] 4. If the image is determined to be "invalid strobe", calculate the strobe position deviation. Since the image is blurry, it may be because the strobe was triggered too late, causing the light to not hit the car window. Therefore, the strobe needs to be triggered earlier, and the strobe position is moved one frame earlier to obtain the position s1'. s1' = s1 - v1 / 100ms * the time of one frame; v1 / 100ms means that v1 is the number of pixels that pass in 100ms.
[0113] 5. Establish a reference frame: the strobe position corresponding to the relative velocity v1 is s1';
[0114] 6. When vehicle B passes by, its speed is close to that of vehicle A. The system determines the speed by determining if the absolute value of the speed difference is less than a predetermined threshold. For example, if vehicle B's speed is 58 km / h, close to vehicle A's 60 km / h, meaning vehicle B's relative speed in the camera's view is close to v1, the system directly uses the corrected position s1' as the strobe trigger position to strobe vehicle B. If the captured face clarity score is 90 points, which is greater than 85 points, the strobe image is considered valid, and the corresponding strobe data is stored in the calibration library to improve the reference system. Subsequent vehicles with similar speeds will use s1' as the strobe trigger position. This effectively solves the problem of poor adaptability of traditional static calibration methods in multi-speed scenarios.
[0115] Example 3:
[0116] The present invention also provides a camera, including a processor, a memory, and an image sensor; the memory stores at least one program, which is executed by the processor to implement the steps described in any of the above-described infrared strobe capture method embodiments.
[0117] Example 4:
[0118] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0119] If the modules / units integrated into the computer program are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0120] Example 5:
[0121] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps described above.
[0122] Example 6:
[0123] This invention also provides an infrared strobe light capture system, comprising: a camera as described above and an infrared strobe light connected to the camera. This infrared strobe light capture system is used to implement the infrared strobe light capture method described above.
[0124] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. An infrared strobe light capture method, applied to an infrared strobe light capture system, the infrared strobe light capture system comprising: A camera and an infrared strobe light connected to the camera, characterized in that the camera controls its own exposure to synchronize with the strobe light's flash, and the infrared strobe light capture method includes the following steps performed by the camera: S1, when the first vehicle enters the camera's view, the position of the first vehicle in the image is identified in real time, and when the vehicle enters the preset detection area, the strobe light is triggered to flash. S2, use a pre-trained strobe image quality scoring AI model to score the first frame image obtained when the strobe light flashes, wherein the scoring indicators include one or more of the following: license plate reflectivity uniformity, in-vehicle face clarity and human feature integrity. S3, when the score of the first frame image is greater than or equal to a preset qualified threshold, it is determined that the strobe position of the strobe light is reasonable, and the relative speed of the first vehicle and the corresponding first strobe parameter are stored in a preset calibration library; when a second vehicle with a speed close to that of the first vehicle enters the camera's view, the first strobe parameter is selected from the calibration library to strobe the second vehicle; wherein, the strobe parameter includes the strobe position of the strobe light, and the strobe position is identified by the position of the vehicle in the frame image corresponding to the strobe; wherein, when the difference between the relative speed of the second vehicle and the relative speed of the first vehicle is less than a predetermined difference threshold, it is determined that the speeds of the first vehicle and the second vehicle are close; S4, when the score of the first frame image is less than a preset qualified threshold, it is determined that the strobe position of the strobe light is unreasonable, the relative speed of the first vehicle and the corresponding first strobe parameter are recorded, the strobe position is corrected according to the strobe defect shown in the first frame image, and the corrected second strobe parameter is obtained and saved; when a second vehicle with a speed close to that of the first vehicle enters the camera frame, the second strobe parameter is used for strobe; wherein, when the strobe defect is strobe too early, the strobe position is delayed by a predetermined number of frames; when the strobe defect is strobe too late, the strobe position is advanced by a predetermined number of frames.
2. The infrared strobe light capture method according to claim 1, characterized in that, It also includes one or more of the following: When delaying the strobe position by a predetermined number of frames: Corrected strobe position = Previous strobe position + Corresponding relative speed × Duration corresponding to the predetermined number of frames; When the strobe position is pre-determined by a number of frames: Corrected strobe position = Previous strobe position - Corresponding relative speed × Duration corresponding to the pre-determined number of frames; The location of a vehicle is identified by the position of its license plate within the frame image. The predetermined number of frames is 1 frame.
3. The infrared strobe light capture method according to claim 1, characterized in that, Also includes: After performing a strobe effect using the second strobe parameter, steps S2 to S4 are repeated. The pre-trained strobe image quality scoring AI model is used to score the frame image obtained when performing a strobe effect using the second strobe parameter. Based on the scoring results, step S3 is used to store the corresponding relative speed and the corresponding strobe parameter into the calibration library for subsequent use, or step S4 is used to further correct the second strobe parameter.
4. The infrared strobe light capture method according to claim 1, characterized in that, The strobe defects include: license plate overexposure, license plate underexposure, light spot misalignment, and / or blurred faces inside the vehicle; wherein: When the license plate is overexposed, determining the strobe location is too early; When the license plate is underexposed, determining the strobe position is too late; If the strobe spot obtained is shifted forward compared to the predetermined expected position, then the strobe position is too early. When the light spot generated by the strobe is located on the roof of the car, the strobe position is too late; If the light spot obtained by the strobe is shifted backward compared to the predetermined expected position of the light spot, then the strobe position is too late. The flash was applied too early when the faces inside the car were blurry.
5. The infrared strobe light capture method according to claim 4, characterized in that, When a blurry face exists inside the vehicle, after correcting the strobe position for the strobe defect caused by light spot shift, the strobe position is further corrected for the blurry face defect to obtain the corrected strobe parameters. The further correction of the strobe position for the blurry face defect includes: The strobe position is advanced using a fixed offset predetermined according to the frame rate; the fixed offset is the time of one frame at the frame rate; the advanced strobe position = the original strobe position - the corresponding relative speed × the fixed offset.
6. The infrared strobe light capture method according to claim 1, characterized in that, When the first vehicle enters the camera's field of view, the following information about the first vehicle is also recorded: The vehicle's trajectory, the vehicle's position offset between multiple frames, and the time offset corresponding to the vehicle's position offset; wherein, the relative speed of the first vehicle = vehicle position offset / time offset; wherein, the unit of relative speed is pixels / m milliseconds; M is a predetermined number.
7. A computer-readable storage medium, characterized in that, The storage medium stores at least one program, which is executed by a processor to implement the steps of the infrared strobe light capture method as described in any one of claims 1 to 6.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the infrared strobe light capture method as described in any one of claims 1 to 6.
9. A camera, characterized in that, The camera includes a processor, a memory, and an image sensor. The memory stores at least one program, which is executed by the processor to implement the steps of the infrared strobe capture method as described in any one of claims 1 to 6.
10. An infrared strobe light capture system, comprising: The camera as described in claim 9 and the infrared strobe light connected to the camera.
Citation Information
Patent Citations
Method, device and system for face recognition in driving vehicle
CN108021877A
Method and device for delayed flash light supplement, camera and readable medium
CN116156308A