Image acquisition method, storage medium, equipment and computer program product
Through the cooperation of partition exposure technology and fill light, the problem of overexposed license plates in traffic cameras under dark light conditions is solved, and clear imaging of license plates and car windows is achieved, avoiding the consumption of hardware and computing resources in the prior art.
Patent Information
- Application Number
- CN202410204902.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-23
- Publication Date
- 2025-08-26
AI Technical Summary
In the prior art, when the front light is filled with light in the traffic camera under dark conditions, the license plate is prone to overexposed, resulting in poor imaging effects, unclear internal features of the car window, and existing solutions increase hardware costs or computing resource consumption.
Partition exposure technology is adopted, by short exposure to the target area (such as license plate) in the image and long exposure to other areas, combined with fill light on the front of the fill light, ensuring that the target area is not exposed, and clear imaging of the license plate and car windows is achieved.
Ensure clear imaging of license plates and windows in one image, avoiding the consumption of computing resources and hardware costs of image registration, and improving the imaging effect.
Smart Images

Figure CN120547441A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image acquisition, and in particular to an image acquisition method, storage medium, device, and computer program product. Background Art
[0002] Traffic cameras capture images of vehicles on the road, and traffic data analysis is performed based on key vehicle information (such as license plates, window interior features, and vehicle body color) obtained from the images. The quality of the images has a significant impact on the results of traffic data analysis.
[0003] In low-light conditions, a fill light installed next to the traffic camera is needed to provide strobe or burst lighting for better image quality. However, existing solutions, where the fill light provides frontal illumination while the traffic camera shoots directly at the vehicle, can easily overexpose the license plate. Summary of the Invention
[0004] The embodiments of the present application provide an image acquisition method, storage medium, device, and computer program product, which solve the problem of poor front-light license plate imaging in the prior art.
[0005] According to a first aspect of an embodiment of the present application, the present application provides an image acquisition method, which first determines a target area in an image to be acquired where a first portion of an object has a reflectivity greater than a threshold, and when performing image acquisition, the exposure time of pixels corresponding to the target area is shorter than the exposure time of other pixels in the image. In the method of the present application, a partitioned exposure method is used in which the target area where the first portion (such as a license plate) is located is exposed for a short time and other areas are exposed for a long time in an image. This ensures that even if the fill light is close to the camera, the shorter exposure time of the target area will not cause overexposure of the target area, thereby ensuring the imaging effect of the target area.
[0006] In an optional embodiment, the process of capturing the image to be captured specifically includes, during the image capture process, after the target area is exposed for a period of time, resetting the photosensitive element corresponding to the target area in the image sensor of the image capture device. This can more conveniently achieve a short exposure of the target area.
[0007] In an optional embodiment, the method for determining the target area may include: upon detecting that the object to be photographed enters the capture range of the image capture device, predicting the imaging position of the first portion in the image to be captured, and then, based on the imaging position, determining the plurality of pixel rows within which the first portion resides as the target area. This facilitates short exposure control of the target area.
[0008] In an optional embodiment, predicting the imaging position of the first portion in the image to be captured may include, after detecting that the object to be captured enters a capture range, determining the speed of the object to be captured based on multiple frames of images in the video stream, and further predicting, based on the speed of the object to be captured, the position of the first portion in the image to be captured when the object to be captured enters a specific area and reaches an image capture period. This allows for more accurate prediction of the position of the target area.
[0009] In an optional embodiment, after the image is acquired, the brightness of the pixels in the target area except the first part may be enhanced, so that the overall brightness is uniform and the user's viewing experience is improved.
[0010] In an optional embodiment, the image acquisition device is further provided with fill lights for filling in light during the process of capturing the image to be shot, so that other parts can have a better fill light effect.
[0011] According to the second aspect of the embodiments of the present application, the present application provides an image acquisition device, including a memory, a processor and an image sensor, the memory is used to store computer programs, the image sensor is used to acquire images, and the processor is used to execute the computer program to implement the above-mentioned image acquisition method.
[0012] According to a third aspect of the embodiments of the present application, the present application provides a computer-readable storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the above-mentioned image acquisition method is implemented.
[0013] According to a fourth aspect of the embodiments of the present application, the present application provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the above-mentioned image acquisition method is implemented.
[0014] It should be understood that the technical solutions provided in the above-mentioned second aspect, third aspect, and fourth aspect, and their technical features can all correspond to the methods provided in the first aspect and its optional implementation methods, so the beneficial effects that can be achieved are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a traffic camera capturing in a checkpoint scenario provided by existing technology;
[0016] Figure 2 A schematic diagram of an image captured in a camera scene provided by the prior art;
[0017] Figure 3 A schematic diagram of the deployment positions of cameras and fill lights in a bayonet scenario provided by the prior art;
[0018] Figure 4 A schematic diagram of the deployment positions of cameras and fill lights in another bayonet scenario provided by the prior art;
[0019] Figure 5 A simplified schematic diagram of a system architecture provided in an embodiment of the present application;
[0020] Figure 6 A schematic diagram of the deployment positions of an image acquisition device and a fill light in a bayonet scenario provided in an embodiment of the present application;
[0021] Figure 7 A schematic diagram of the composition of an image acquisition device provided in an embodiment of the present application;
[0022] Figure 8 A flowchart of an image acquisition method provided in an embodiment of the present application;
[0023] Figure 9 A schematic diagram of an exposure method of an image sensor provided in an embodiment of the present application;
[0024] Figure 10 A flowchart of another image acquisition method provided in an embodiment of the present application;
[0025] Figure 11 A schematic diagram of partitioned exposure in a bayonet scenario provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] To better regulate road traffic, traffic cameras (cameras for short) are typically installed at checkpoints. For example, cameras at intersections can detect behaviors like running red lights and failing to yield to pedestrians. Cameras can also be installed away from intersections on highways or city roads to detect speeding and not wearing seatbelts.
[0027] like Figure 1 As shown in the figure, in order to achieve better shooting effects, the camera is usually installed in the middle of the road. By capturing images of vehicles in a single direction or two-way lanes, it can collect key information of vehicles passing through the road in real time, such as body color, window target features, and license plates. And generally when the vehicle travels to a specific collection interval, the camera takes a picture of the vehicle from the front. The image obtained by the photo can be seen in the image. Figure 2 .
[0028] In poor lighting conditions such as at night and on cloudy days, unclear imaging may occur. In order to improve the quality of images taken in poor lighting conditions, a fill light can be installed to fill in the light of the object being photographed (such as a vehicle) when the camera is shooting. A fill light is a device that provides fill light to increase the ambient brightness in low-brightness conditions. In this scenario, the fill light can be used to fill in the light of the vehicle. There are many types of fill lights in the prior art, and common fill lights include light-emitting diode (LED) fill lights, etc. The fill lights in the prior art are generally strobe fill lights, that is, fill light is provided by a strong flash during shooting.
[0029] In one implementation, Figure 3 As shown, the fill light can be installed closer to the camera, such as in the middle of the road. However, based on engineering surveys, if both the fill light and camera are installed in the middle of the road, the license plate is made of reflective material, which reflects light back in the direction of incidence. If the strobe fill light is used directly at the vehicle, the license plate will be overexposed and appear white in the captured image, affecting the recognition of the license plate text.
[0030] In another implementation, Figure 4 As shown, the camera is mounted in the center of the road, and the fill light is mounted to the side, 1-2 meters apart. The strobe fill light illuminates the vehicle from the side. However, due to the different materials of the windows and the film, side lighting can easily result in weak reflected light energy. Consequently, side lighting cannot penetrate the windows. With side lighting, the captured image may exhibit the following issues: poor visibility and low contrast in the window area, making the target features inside the window unclear. This can affect subsequent recognition and analysis of the target features inside the window.
[0031] It can be seen that the existing technology cannot obtain clear images of both the license plate and the car window. In order to solve the above problem, there are several solutions in the related art:
[0032] First, a combination of long and short exposures is used to solve the problem of not being able to obtain clear images of the license plate and the car window at the same time.
[0033] Specifically, to reduce light pollution caused by flashing fill lights, a constant low-light fill light can be used. As a vehicle passes by, the traffic camera captures two frames of images: a long-exposure frame and a short-exposure frame. The long-exposure frame ensures that the vehicle's overall color and shape are clearly displayed in the long-exposure frame, while the short-exposure frame ensures that the license plate characters and color areas are properly displayed in the short-exposure frame.
[0034] To facilitate understanding, here's an explanation of the principles of camera imaging and the concepts of long and short exposure. The principle behind camera imaging is that a lens focuses incoming light into an inverted, reduced real image, while a shutter controls the duration of light entering the lens. This duration is also called the exposure time. The camera also contains an image sensor, which converts the light signals received by the sensor during the exposure time into electrical signals, completing the image. A long-exposure frame image is an image with a long exposure time, while a short-exposure frame image is an image with a short exposure time. By varying the shutter speed, long- and short-exposure images can be obtained.
[0035] Although this existing technology can determine the vehicle's license plate information, vehicle and body color, and other information separately through long-exposure frame images and short-exposure frame images, this method requires capturing two images, which increases camera overhead. Moreover, the above method only integrates semantic information. If you want to clearly display information such as the license plate and body in a single image, you will need to perform image registration on the long-exposure frame images and short-exposure frame images. Image registration also consumes a lot of computing resources. In addition, the existing technology still lacks an image registration method with good imaging effects, especially for extreme scenes such as rainy days, which results in poor imaging effects of the registered images.
[0036] Second, use dual-light fusion technology to solve the above problems.
[0037] This method is used in strong backlighting during the day. In strong backlighting during the day, the mirror reflection of the road or the car window may make the picture inside the car window unclear.
[0038] To provide fill light, a laser fill light module is installed to illuminate the interior of the vehicle windows. Simultaneously, a standard camera captures a color image to ensure clear images of the vehicle outside the windows. An infrared camera captures an infrared image to ensure clear images inside the vehicle windows. The infrared and color images are fused to produce a snapshot result.
[0039] The above method uses infrared fill light to provide clear interior imaging, but some current car films have infrared-blocking properties, which can result in unclear target imaging in infrared images. Similar to the first method, image registration, particularly the heteromodal registration of infrared and color images in this solution, consumes significant computing resources and produces poor imaging results after registration. Furthermore, this method requires the addition of an additional infrared camera and laser fill light components, which also increases hardware costs.
[0040] Third, the fill light method is adaptively adjusted according to the current ambient light intensity.
[0041] Specifically, a camera is installed in the middle of the road, with strobe and frequency-shifted fill lights mounted on either side. The camera first determines the current light intensity. If the light intensity exceeds a first threshold, the strobe light is used for fill light. If the light intensity falls below a second threshold, the frequency-shifted fill light is used for fill light. A frequency-shifted fill light flashes at a constant frequency to provide fill light. While this method can select the appropriate fill light method based on ambient light intensity without causing light pollution, it is only an adaptive fill light method and does not address the issue of simultaneously maintaining clear windows and license plates.
[0042] To solve the above problems, this application uses a fill light to provide frontal illumination for improved imaging effects on car windows. To address the issues of license plate reflections and the difficulty of image registration, this application uses a short exposure for the area where the reflective material is located and normal exposure for other areas when capturing images. This prevents overexposure of reflective materials such as license plates, ensuring effective imaging, and only requires capturing one image, without increasing hardware costs and system overhead.
[0043] Furthermore, it should be noted that in the prior art, exposure time is generally changed by changing the physical shutter, which only changes the overall exposure time of an image. In this application, to achieve long and short exposures in a single image, the exposure time is not changed by changing the physical shutter, but rather by changing the electronic shutter: specific areas are exposed for a shorter time, while other areas are exposed normally. The specific method of controlling the electronic shutter will be explained below and will not be elaborated here.
[0044] In other words, the present application provides an image acquisition method, which first determines the target area in the image to be acquired, where the first part of the object whose reflectivity is greater than a threshold is located. When performing image acquisition, the exposure time of the corresponding pixels in the target area is less than the exposure time of other pixels in the image.
[0045] In the method of the present application, a partitioned exposure method is adopted in which the target area where the first part (such as the license plate) of an image is located is short-exposed and other areas are long-exposed. Therefore, even if the fill light is close to the camera for frontal fill light, the shorter exposure time of the target area will not cause overexposure of the target area, thereby ensuring the imaging effect of the target area.
[0046] In addition, in the embodiment of the present application, when there is a fill light, the fill light provides frontal light, so that the imaging effect of other areas such as the car windows and car body is also better, which solves the problem in the prior art that the imaging effect of the car windows and license plates cannot be guaranteed at the same time.
[0047] In addition, the method of the present application realizes long and short exposure in one image, and does not have the image registration difficulty problem mentioned in the related art.
[0048] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0049] Figure 5 The figure shows a schematic diagram of the architecture of an image acquisition system to which the image acquisition method provided by the embodiment of the present application can be applied. Figure 5 As shown, the image acquisition system may include: an image acquisition device 51, a fill light 52 and a server 53.
[0050] The image acquisition device 51 has the function of capturing images, and may be, for example, a camera or a video camera. In some cases, the image acquisition device 51 may also have a data transmission function, such as sending the captured images to the server 53. Of course, the image acquisition device 51 may not have a network connection function, and may store the captured images solely in the memory on the image acquisition device 51. The image acquisition device 51 may also have data processing capabilities. For example, the image acquisition device 51 may determine when to capture an image based on the motion trajectory of an object in the captured image and predict the area in the image where the object's reflective material is located at the time of the capture. The specific processing methods are described below and are not elaborated here. Of course, in some cases, the image acquisition device 51 may not perform data processing, and the above-mentioned processing or other data processing may be performed by the server 53.
[0051] The fill light 52 is used to fill in the light of the object being photographed by the image acquisition device. When the ambient brightness is low, the fill light can be turned on so that the image acquisition device 51 can have a better imaging effect. The fill light 52 can be used in a variety of ways, such as constant light fill light and flash fill light.
[0052] The constant fill light can be controlled by the image acquisition device 51 through a wired or wireless connection with the fill light 52 when the image acquisition device 51 detects that the ambient brightness is lower than a threshold. Alternatively, the fill light 52 can automatically turn on the constant fill light when it detects that the ambient brightness is lower than a threshold.
[0053] In scenarios where the fill light 52 uses stroboscopic fill light, the fill light 52 generally provides fill light while the image capture device is capturing an image, thereby providing the image capture device 51 with a better imaging effect. When the fill light 52 uses stroboscopic fill light, the fill light 52 and the image capture device 51 may also be connected via a wired or wireless connection, so that while the image capture device 51 is capturing, the fill light 52 can provide stroboscopic fill light according to control commands from the image capture device 51. When using stroboscopic fill light, the image capture device 51 may be equipped with a sensor for detecting ambient brightness, and stroboscopic fill light may be activated if low ambient brightness is detected.
[0054] In addition, it should be noted that in some cases, the fill light 52 does not flash every time the image acquisition device 51 takes a photo. For example, in a road checkpoint scene, the image acquisition device may capture multiple images and calculate when to capture the vehicle through the multiple images. In this case, when the image acquisition device 51 captures the image for calculating the capture time, the fill light 52 may not perform fill light.
[0055] In this application, the distance between the fill light 52 and the image acquisition device 51 is small. In other words, the fill light is configured within the preset range of the image acquisition device, and the fill light is used to provide fill light during the image acquisition process. In this case, the deployment position of the image acquisition device and the fill light can be referred to. Figure 6 In this way, the fill light effect is better. For example, for areas on a vehicle with poor light transmittance (such as windows), the fill light can increase the amount of light irradiated on the object, so that more light is reflected into the image acquisition device, improving the visibility of the corresponding position and improving the quality of the captured image. The fill light 52 can exist independently of the image acquisition device 51. In this case, the fill light 52 should be deployed near the image acquisition device 51. Of course, the fill light 52 and the image acquisition device 51 can also be integrated together, for example, the fill light 52 is integrated inside the image acquisition device 51.
[0056] This application can be applied to the road checkpoint scene, in which case the image acquisition device 51 can be an image acquisition device installed on the road. In order to better obtain the interior of the car window and the license plate features, in the checkpoint scene, such as Figure 6 As shown, the image capture device 51 and the fill light 52 can be installed in the middle of the road. In other words, the distance difference between the image capture device deployment location and the two sides of the road is less than a preset distance threshold. In other implementations, the image capture device 51 and the fill light 52 can also be installed on the side of the road. In the checkpoint scenario, the fill light 52 can flash when the image capture device 51 is capturing a snapshot. The fill light 52 does not need to flash when the image capture device 51 is capturing other images (such as images used to calculate the snapshot timing).
[0057] The server 53 can be used to receive image data sent by the image acquisition device 51 and process the received image data, for example, by enhancing the brightness of a target area in the image, or by performing further image analysis, such as analyzing whether the image contains behaviors such as running a red light or not wearing a seat belt. In some embodiments, the system used by the method of the present application may not include the server 53.
[0058] In an optional example, the image acquisition device 51 may have Figure 7 The structure shown, such as Figure 7As shown, the image acquisition device 51 may include a processing module 710 , a storage module 720 , and a communication module 730 . Figure 7 The structure shown in the figure is only an embodiment of the present application and does not limit the image acquisition device 51 in the present application. For example, in addition to the above modules, the image acquisition device 51 may also include an image sensor for capturing images.
[0059] The processing module 710 can be any one of a CPU, a GPU, a field-programmable gate array (FPGA), and an application-specific integrated circuit (ASIC), or a combination of multiple ones.
[0060] Storage module 720 is used to store data. For example, storage module 720 can be used to store captured images. Storage module 720 can be a memory card on an image acquisition device. Storage module 720 can also store computer instructions. Processing module 710 can read and execute computer instructions stored in storage module 720 to implement corresponding functions.
[0061] The communication module 730 can be used for communication between the server 53 and the image acquisition device 51 , and the communication module 730 can also be used for communication between the image acquisition device 51 and the fill light 52 .
[0062] Next, we will combine Figure 8 , to illustrate an image capturing method shown in an exemplary embodiment of the present application. Figure 8 As shown, the image capturing method includes the following steps:
[0063] Step 801: Determine a target area in an image to be captured that includes a first portion of an object to be photographed.
[0064] The first part is a part of the object to be photographed whose reflectivity to light is greater than a preset value.
[0065] The image acquisition device can be described above and will not be further described here. In the embodiment of the present application, a fill light can also be included to provide fill light at least when capturing the image to be captured. The image to be captured is the image to be captured later. The image to be captured is an image obtained by capturing a specific object (i.e., the object to be captured).
[0066] The object to be photographed has a first part, and the first part has the characteristic of a strong reflectivity of light. The reflectivity is the ratio of the intensity of light reflected after the light hits the surface of the object to the intensity of the incident light. It can be seen that the first part reflects light more strongly, so that in the captured image, the first part may be overexposed. The first part can be realized by reflective material. Reflective material can also be called retroreflective material, retroreflective material, etc. Reflective material can include reflective film, reflective fabric, etc. Reflective material has the characteristic of reflecting light back in the incident direction, which makes it easier to overexpose the first part when performing fill light shooting if the fill light and the image acquisition device are close.
[0067] In the case where there is a fill light in the embodiment of the present application, the fill light and the image acquisition device can be placed very close. This can make the energy of the light irradiated on the object stronger, thereby making the fill light effect of the object better. However, this will also make the energy of the light received by the first part stronger, resulting in poor imaging effect of the first part in the captured image when the fill light is used. Therefore, in order to solve the above problem, the present application performs partitioned exposure. In order to perform partitioned exposure, the area for short exposure is first determined, that is, the area where the first part is located in the image to be captured. In this application, this area is also referred to as the target area. After determining the target area, the imaging effect of the target area can be improved by the partitioned exposure shooting method of step 802.
[0068] In addition, the method of the present application can be executed when the ambient brightness is lower than the brightness threshold, such as at night or in bad outdoor weather (cloudy and rainy, etc.). This can save the resource consumption of the fill light and the computing power of the image acquisition device when the ambient light is strong.
[0069] Next, several implementations of step 801 will be described.
[0070] In a first implementation, a certain area in a preset image may be a target area. Accordingly, step 801 may determine the location of the target area based on pre-set configuration information of the image acquisition device. For example, in some embodiments, the image acquisition device is fixed relative to the object to be captured. In this case, the position of the first part of the object is fixed, and accordingly, when the object is captured, the imaging position of the first part in the image is also fixed. In this scenario, configuration information may be preset in the image acquisition device, and the configuration information may include the location of the target area.
[0071] As for the shape of the target area, the shape of the target area that can cover the reflective material can be determined according to the shape of the reflective material. For example, if the reflective material on the object is fixed in a rectangular shape, a rectangular target area can be selected.
[0072] In this implementation, in addition to using a specific shape as the target area, you can also directly select some rows as the target area, which makes it easier to control the exposure. Specifically, in the prior art, the image sensor of the image acquisition device generally has two exposure modes, namely global exposure (global shutter) and rolling shutter exposure (rolling shutter). Under global exposure, after starting to shoot, all pixels of the image sensor start to be exposed at the same time. Under rolling shutter exposure, after starting to shoot, the image sensor starts to expose row by row from the first row, and the difference in the start exposure time between every two adjacent rows is less than the preset threshold. For example, see Figure 9 , Figure 9 (a) is a schematic diagram of short exposure under rolling shutter exposure. Figure 9 (b) is a schematic diagram of short exposure under global exposure. Figure 9 The first part of the row, that is, the target area, is exposed for a short time. Therefore, controlling exposure by row is more consistent with the exposure principle of the image sensor. The image sensor also has an interface to control the start of exposure for each row, which makes it easier to control the exposure of each partition. Figure 9 The horizontal line in the middle represents each row of pixels, and the position of the diagonal line is the row where the target area is located, that is, the area that requires short exposure.
[0073] In the second implementation, step 801 can also predict the location of the target area during the capture of step 802 based on the location of the object in the video frame image. When capturing an image, the image capture device generally also captures a video stream, and a video frame image is a frame in the video stream. For example, in some scenarios, the object to be captured has the following characteristics: a specific object that enters the capture range of the image capture device needs to be captured, and the object moves within the capture range according to certain motion patterns, and the object has a fixed first part. A car is an example of an object to be captured that meets these conditions, and the license plate on the car is the first part.
[0074] In this case, the image acquisition device can determine whether an object to be photographed has entered the shooting area based on the video frame images. For example, object recognition can be performed for each video frame image to identify a specific category of objects, that is, to identify the object to be photographed. When the object to be photographed is identified, object tracking can be performed, and the object's movement speed can be determined based on the relative position of the object in multiple video frames, and the imaging position of the first part of the current object in the image can be identified. Then, based on the object's speed and the current object's position, the imaging position of the first part of the object in the image when the object is captured in step 802 is confirmed, that is, the position of the target area is determined.
[0075] In the target area determination method, the location of the first portion of the image to be captured can be directly used as the target area. Furthermore, after predicting the location of the first portion in the image to be captured, the location can be magnified to obtain the target area. In this embodiment, the target area is predicted based on the position of the object in the video frame image, and the predicted position may be inaccurate. Therefore, the latter method ensures that the predicted target area is covered with reflective material, thereby maintaining the imaging effect.
[0076] In other words, when the object to be photographed is a movable object, step 801 may include: upon detecting that the object to be photographed enters the acquisition range of the image acquisition device, determining the position of the first portion of the object to be photographed in the image to be captured; and based on the position of the first portion in the image to be captured, determining the pixel row in the image to be captured that contains the first portion as the target area. Specifically, determining the position of the first portion of the object to be photographed in the image to be captured may include: prior to capturing the image to be captured, upon detecting that the object to be photographed enters the acquisition range of the image acquisition device, determining the speed of the object to be photographed; and determining the position of the first portion of the object to be photographed in the image to be captured based on the speed of the object to be photographed.
[0077] In the case of a moving object, the position of the target area can also be determined. Moreover, using several pixel rows as the target area can also make it easier to control the short exposure.
[0078] For video frames, you can choose to shoot with fill light when shooting. You can also shoot without fill light. Since video frames are used to determine the location of the target area, the location of the target area can be analyzed even if the object is dark. The location of the target area can also be well determined without fill light.
[0079] Furthermore, the specific shape of the target area can also correspond to the shape of the reflective material. For example, if the reflective material is circular, the target area can also be a circular area determined based on the video frame image. Furthermore, the target area can also be a portion of a row determined based on the video frame image, similar to the description above, which makes it easier to control the zone exposure.
[0080] Through the above method, the position of the target area can be determined more accurately even when the object is moving, thereby obtaining better imaging effects.
[0081] The above methods are examples of step 801 and do not limit the present application.
[0082] Step 802: Capture an image containing the object to be photographed to obtain an image to be captured.
[0083] The exposure time of the pixels corresponding to the target area in the image to be collected is shorter than the exposure time of other pixels in the image to be collected.
[0084] In other words, after obtaining the target area, the image can be captured using a zoned exposure method, where a shorter exposure time is used for the target area, while other areas are exposed normally. This ensures that the target area, due to the shorter exposure time, is not overexposed and therefore unclear, while other areas are exposed normally, ensuring better imaging quality. Furthermore, during image acquisition in step 802, a fill light can be used simultaneously to provide fill light. This ensures that the remaining areas, except for the first portion, are clearly imaged, preventing poor visibility due to poor fill light.
[0085] The exposure time of the pixels corresponding to the target area in the image to be collected is shorter than the exposure time of other pixels in the image to be collected, which can ensure that the exposure time of the target area is shorter than the exposure time of other areas.
[0086] Regarding the method of triggering image capture, the first implementation method can be to start shooting in response to a user operation, such as in response to the user clicking a capture button. Correspondingly, in this case, the position of the target area can be fixed, or after clicking capture, a video frame image can be captured first, and then the position of the target area is determined based on the position of the video frame image and fill light shooting is performed.
[0087] In a second implementation method, the method of triggering shooting can also be to shoot after detecting a specific object entering the shooting range based on the video frame image. Correspondingly, the position of the target area can be determined based on the position of the object in the video frame image.
[0088] For easier understanding of the specific method for controlling zoned image capture, we first explain the imaging principle of the image sensor. The imaging area of an image sensor consists of several orderly arranged pixel imaging devices, each of which consists of a photodiode (PD) as the sensing portion. The photodiode absorbs incident light during the exposure time. Due to the photoelectric effect, after absorbing the incident light, electrons begin to accumulate within the photodiode. Specifically, after receiving the light signal, the electrons in the material within the photodiode absorb energy and convert the absorbed energy into kinetic energy that escapes the gravitational field of the atomic nucleus. This accumulated flow of electrons generates a current or voltage. The longer the exposure time, the greater the accumulated electrons (i.e., the number of electrons that escape the atomic nucleus). The greater the incident light intensity, the greater the accumulated electrons. Therefore, the image sensor can determine the grayscale value of the corresponding pixel based on the accumulated electrons in the photodiode (i.e., the voltage and current values of the circuit).
[0089] Based on the above description, it can be determined that the exposure time of the target area can be controlled by electron accumulation within the photodiode. This is similar to the aforementioned method of controlling the exposure time of the target area by changing the electronic shutter, that is, controlling the time when the photodiode in the image sensor receives light, and thus controlling the time when the PD or other photosensitive element corresponding to the target area receives the light signal.
[0090] In the first method of changing the exposure time, variable resistors and capacitors can be added to the circuit of the photodiode, or a circuit that can change the size of the resistors and capacitors can be added. After determining the target area, a signal can be sent to the circuit corresponding to the target area to change the size of the resistors and capacitors, thereby controlling the current or voltage value in the photodiode circuit, thereby achieving an effect similar to short exposure.
[0091] In the second method of changing the exposure time, the exposure time of the target area can also be controlled by controlling the time at which the photodiode receives the light signal. For example, after determining the location of the target area, a control signal can be sent to the circuit corresponding to the target area to stop the exposure after the photodiode corresponding to the target area has been exposed for a preset time, which is shorter than the original exposure time of the photodiode.
[0092] A third method for changing exposure time involves resetting the electron accumulation of the image sensor's photodiodes after exposure begins, and then starting exposure. After the photodiodes corresponding to the target area have been exposed for a certain period of time, the corresponding photodiodes are reset, causing the photodiodes corresponding to the target area to resume electron accumulation. This allows for more convenient control of zone exposure. Thus, the PDs corresponding to the target area actually receive light only from the second reset to the end of exposure, thereby shortening the exposure time of the target area.
[0093] In other words, in the above scenario, step 802 includes: during the process of capturing an image of the object to be photographed, resetting the photosensitive element corresponding to the target area in the image sensor of the image capture device to capture the image to be captured; the photosensitive element is used to convert the captured light signal into an electrical signal to obtain pixels of the image to be captured. The reset mentioned here refers to the second reset described above. The photosensitive element can be a PD or another photosensitive element.
[0094] As described above, in some embodiments, the target area is a plurality of rows in the image including the first part. In this case, after executing step 802, it is also possible to: perform brightness enhancement processing on the pixels in the target area except for the first part. Since short exposure will reduce the brightness of the target area in the image, and the only area in the target area that actually requires short exposure is the area where the license plate is located, performing image gain and other processing on the target area except for the location of the reflective material to increase the brightness can make the overall brightness of the image uniform and improve the user's perception. The specific method for increasing brightness can be an image enhancement method in the prior art, and this application does not limit the specific image enhancement method.
[0095] An exemplary embodiment of the present application is described above. As for the application scenarios of the present application, the present application can be applied to various scenarios, such as road checkpoint scenarios, etc. Next, the method of the present application will be applied to the checkpoint scenario for explanation. In this scenario, it is necessary to capture the vehicles on the road. Correspondingly, in this scenario, the object to be photographed is a vehicle. There is generally a layer of reflective film on the license plate, and correspondingly, the first part is the license plate. As mentioned above, the window part is generally covered with a layer of film, which can generally block a certain amount of light. For the deployment position of the image acquisition device and the fill light in the checkpoint scenario, please refer to the Figure 5 The description of the above is not repeated here. Here, we will take the deployment of image acquisition equipment and fill light in the middle area of the road as an example to illustrate an image shooting method. The image acquisition equipment and fill light are installed together on the front of the vehicle, which can penetrate the window with the greatest probability, achieve a better fill light effect on the window, and ensure the imaging effect of the window. Figure 10 As shown, the method includes the following steps:
[0096] Step 1001: capture a video frame image.
[0097] Step 1002: Analyze the video frame image to determine whether there is a vehicle entering the acquisition range.
[0098] Specifically, in this scenario, the image capture device can detect video frames without fill light or with low-light fill light. Each video frame is analyzed to determine whether a new vehicle has entered the capture range. This can be achieved by comparing two adjacent video frames or by using object recognition to identify whether a vehicle is on the side of the video frame away from the image capture device.
[0099] Step 1003: When a vehicle enters the acquisition range, identify the license plate of the vehicle in the video frame image.
[0100] Because license plates are typically covered with a reflective film, normal flash fill-light photography is likely to overexpose the license plate in the image, affecting the imaging quality and the subsequent license plate recognition intelligent algorithm. To ensure the imaging quality of the license plate, it is necessary to identify the position of the license plate and perform short exposure processing on the imaging position of the license plate in the subsequent steps.
[0101] Step 1003 can be implemented by, after detecting a new vehicle entering the acquisition range, acquiring multiple video frames containing the newly entered vehicle and determining the license plate position in each video frame through object recognition. Object recognition can be achieved using a pre-trained artificial neural network for license plate recognition. The license plate position is the imaging position of the license plate in the video frame.
[0102] Step 1004 : predicting the imaging position of the vehicle's license plate in the captured frame based on the position of the license plate in the identified video frame image.
[0103] The vehicle's speed can be determined based on the license plate position in multiple video frames using methods such as speed estimation. This speed can be the rate of change in the license plate's image position in the image, or the vehicle's actual speed. After determining the vehicle's speed, the vehicle's image position in the captured frame can be predicted based on the license plate's position in the video frame captured closest to the current time.
[0104] The captured frame, also known as the image to be captured, is captured by the image acquisition device using a strobe light after the vehicle enters a specific area. The captured image is positioned in the specific area, typically in the center of the image, to ensure optimal imaging quality.
[0105] When vehicles of different speeds enter the capture range, the timing of the capture frame and the license plate position in the resulting captured frame will vary. Predicting the vehicle's image position in the capture frame essentially means predicting when the vehicle will reach a specific range within the image captured by the image capture device. Once the capture frame capture timing is determined, the likely image position of the license plate in the capture frame can be predicted at the time of capture.
[0106] Step 1005: The row where the determined license plate is located in the captured frame is used as the target area.
[0107] The row here refers to the pixel row, and the image is composed of several pixels.
[0108] In addition, after determining the possible imaging position of the license plate in the captured frame, in addition to directly using the row where the determined position is located as the target area, the row where the determined position is located can also be expanded, and the expanded area can be used as the target area. In this way, even if there is an error in the predicted position, the target area can be guaranteed to include the license plate through expansion, thereby ensuring the imaging effect of the license plate.
[0109] Step 1006: Capture the snapshot frame. When the snapshot frame is exposed, after the target area is exposed for a preset time, the target area is reset twice.
[0110] The schematic diagram of long and short exposure when shooting is as follows Figure 11 As shown, the row where the license plate is located can be exposed for a short time, and the rest of the positions can be exposed normally (normal exposure is referred to as long exposure here), thereby solving the problem of overexposure of the license plate when the front flash is used to fill in the light.
[0111] The secondary reset, as described above, involves resetting the corresponding photodiode after the target area's corresponding photodiode has been exposed for a certain period of time. Specifically, after the target area's corresponding PD has been exposed for a certain period of time, a control signal is used to reset the electron accumulation within the PD, causing the PD corresponding to the target area to resume electron accumulation, thus achieving a short exposure.
[0112] This method of achieving long and short exposure within a frame of image eliminates the need for image registration in related technologies, reducing the consumption of computing resources for the entire system.
[0113] Step 1007 , post-processing the captured frame to enhance the brightness of the target area except for the location of the license plate, to ensure that the overall brightness of the captured image is continuous.
[0114] Specifically, the license plate segmentation algorithm can be used to determine the imaging position of the license plate in the captured frame, and the brightness of the target area other than the imaging position of the license plate can be increased through methods such as gain in the post-processing process, so that the overall brightness after processing can be kept uniform, that is, the brightness of the short-exposure area and the long-exposure area of the vehicle other than the license plate is unified, avoiding overall brightness inconsistency and improving user viewing experience.
[0115] After obtaining the above image, the above image can be further analyzed, such as determining whether there is a target that matches a specific target feature, whether there is a vehicle that matches a specific license plate, etc.
[0116] Furthermore, if multiple vehicles simultaneously enter the image capture device's acquisition range, the above method can be performed separately for each vehicle. In other words, the location of each vehicle's license plate at the time of capture is determined based on the captured video frame image. A capture frame is captured for each vehicle using the above method. When capturing a capture frame for a vehicle, the target area is determined solely based on that vehicle's license plate. This ensures that at least one clear image is captured for each vehicle. This way, even if a single image capture device is responsible for capturing vehicles in multiple lanes, a clear image of each vehicle can be obtained.
[0117] pass Figure 10 The method described above can obtain clear images of both the vehicle window and the license plate. Compared with the existing front lighting method, the license plate position is clearly imaged. Compared with the existing side lighting method, the vehicle window position is even clearer. Figure 10 In the illustrated method, by applying flash fill light from the front in a road checkpoint scenario, the fill light effect in the vehicle window area is enhanced, making the vehicle window portion of the captured image clearer. Simultaneously, the image acquisition device shoots from the front, performing zoned exposure on the vehicle during shooting, improving the imaging quality of the license plate area. This shows that the method of this application can simultaneously ensure the imaging quality of both the license plate and the vehicle window.
[0118] The present application also provides an image acquisition device, which is applied to an image acquisition device, comprising:
[0119] The determination module is used to determine a target area in the image to be collected that contains a first part of the object to be photographed; the first part is a part of the object to be photographed whose reflectivity to light is greater than a preset value.
[0120] The acquisition module is used to acquire an image containing the object to be photographed to obtain the image to be acquired; the exposure time of the pixels corresponding to the target area in the image to be acquired is shorter than the exposure time of other pixels in the image to be acquired.
[0121] In an optional embodiment, the acquisition module is specifically used to: reset the photosensitive element corresponding to the target area in the image sensor of the image acquisition device during the process of acquiring an image of the object to be photographed to acquire the image to be acquired; the photosensitive element is used to convert the acquired light signal into an electrical signal to obtain the pixels of the image to be acquired.
[0122] In an optional embodiment, the determination module is specifically used to: when it is detected that the object to be photographed enters the acquisition range of the image acquisition device, determine the position of the first part of the object to be photographed in the image to be captured; based on the position of the first part in the image to be captured, determine the pixel row containing the first part in the image to be captured as the target area.
[0123] In an optional embodiment, when determining the position of the first part in the image to be captured, the determination module is specifically used to: before capturing the image to be captured, when it is detected that the object to be captured enters the capture range of the image capture device, determine the speed of the object to be captured; and determine the position of the first part of the object to be captured in the image to be captured based on the speed of the object to be captured.
[0124] In an optional embodiment, the device further includes a processing module configured to perform brightness enhancement processing on pixels in the target area except the first portion.
[0125] In an optional embodiment, a fill light is configured within a preset range of the image acquisition device, and the fill light is used to provide fill light during the acquisition process of the image to be acquired.
[0126] In an optional embodiment, the object to be photographed is a vehicle, and the distance difference between the deployment position of the image acquisition device and both sides of the road is less than a preset threshold.
[0127] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0128] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division, and other division methods may be used in actual implementation.
[0129] The modules described as separate components may or may not be physically separate, and the components shown as modules may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned integrated modules may be implemented in the form of hardware or software functional units.
[0131] The present application also provides a computer-readable storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the above-mentioned image acquisition method is implemented.
[0132] The storage medium may include any of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media that can store program codes.
[0133] The present application also provides an image acquisition device, including a memory, a processor and an image sensor, wherein the memory is used to store computer programs, the image sensor is used to acquire images, and the processor is used to execute the computer program to implement the above-mentioned image acquisition method.
[0134] The present application also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the above-mentioned image acquisition method is implemented.
[0135] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An image acquisition method, characterized in that: The method is applied to an image acquisition device, and the method includes: Determine a target area in the image to be captured that includes a first portion of the object to be photographed; the first portion is a portion of the object to be photographed whose reflectivity to light is greater than a preset value; An image containing the object to be photographed is acquired to obtain the image to be acquired; the exposure time of pixels corresponding to the target area in the image to be acquired is shorter than the exposure time of other pixels in the image to be acquired.
2. The method according to claim 1, characterized in that The collecting includes an image of the object to be photographed, and obtaining the image to be collected includes: During the process of capturing an image of the object to be photographed, the photosensitive element corresponding to the target area in the image sensor of the image capture device is reset to capture the image to be captured; the photosensitive element is used to convert the captured light signal into an electrical signal to obtain the pixels of the image to be captured.
3. The method according to claim 1 or 2, characterized in that Determining the target area containing the first part of the object to be photographed in the image to be captured includes: When it is detected that the object to be photographed enters the acquisition range of the image acquisition device, determining the position of the first part of the object to be photographed in the image to be captured; According to the position of the first portion in the image to be collected, a pixel row in the image to be collected that includes the first portion is determined as the target area.
4. The method according to claim 3, characterized in that Determining the position of the first part of the object to be photographed in the image to be captured includes: Before capturing the image to be captured, when detecting that the object to be captured enters the capture range of the image capture device, determining the speed of the object to be captured; According to the speed of the object to be photographed, a position of the first part of the object to be photographed in the image to be captured is determined.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Brightness enhancement processing is performed on pixels in the target area except the first part.
6. The method according to any one of claims 1 to 5, characterized in that A fill light is configured within a preset range of the image acquisition device, and the fill light is used to provide fill light during the acquisition process of the image to be acquired.
7. The method according to claim 6, characterized in that The object to be photographed is a vehicle, and the distance difference between the deployment position of the image acquisition device and both sides of the road is less than a preset threshold.
8. An image acquisition device, characterized in that: The device comprises a memory, a processor and an image sensor, wherein the memory is used to store a computer program, the image sensor is used to capture images, and the processor is used to execute the computer program to implement the image capture method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the image acquisition method according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the image acquisition method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Electronic rearview mirror flicker suppression method and related device
CN121462891A