Night imaging control method and device, electronic equipment and storage medium

By adjusting parameters in the EVS mode of the camera, the problem of moving target tailing and incorporating the background in low light is solved, and the quality of night imaging is improved.

CN119496990AActive Publication Date: 2025-02-21ZHEJIANG UNIVIEW TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311059278.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-02-21
Estimated Expiration
2043-08-21

AI Technical Summary

Technical Problem

When the ambient light is low and the brightness of the moving target is similar or the same as the background, the problem of large tails or soluble in the background will affect the imaging quality of the moving target at night.

Method used

When the camera is shooting in EVS mode, it obtains parameter information of the moving target, determines the drag area, obtains the grayscale value of each pixel in the drag area, determines the drag length, and the drag length is greater than or equal to the preset length When the EVS mode parameters are adjusted until the drag length is less than the preset length to improve the detection sensitivity of the moving target.

Benefits of technology

It effectively solves the problem of large tailings of moving targets or incorporating into the background under low light conditions, and improves the imaging quality of nighttime sports targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496990A_ABST
    Figure CN119496990A_ABST
Patent Text Reader

Abstract

The invention provides a night imaging control method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining the parameter information of a moving target under the condition that the moving target exists in a target video shot by a camera in an EVS (Event Visual Sensor) mode, determining a smear area in a target image where the moving target is located based on the parameter information; obtaining the gray value of each pixel point in the smear area, and determining the smear length according to the gray value of each pixel point; and under the condition that the smear length is greater than or equal to a preset length, adjusting an EVS parameter of the EVS mode until the smear length is less than the preset length to obtain a target EVS parameter, and controlling the camera to carry out night shooting imaging according to the target EVS parameter. Therefore, the problem that the trailing is large or the moving target is dissolved in the background under the condition that the ambient light is low and the brightness of the moving target is similar to or the same as that of the background can be solved, and the imaging quality of the moving target at night is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a nighttime imaging control method, device, electronic equipment and storage medium. Background Art

[0002] With the development of society, nighttime video surveillance has become a very important part of video surveillance. Due to the poor lighting at night, the image quality of the camera at night is lower than that during the day. When the color of the moving target is similar or the same as the background, coupled with the interference of noise, it is difficult to accurately determine the moving direction and trajectory of the moving target through the captured image, resulting in the image of the moving target having tails, blending into the background, and high noise, which in turn affects the AI ​​(Artificial Intelligence) recognition of faces, license plates, car models, etc., and also affects the subjective visual effect.

[0003] In addition, due to the poor lighting conditions at night, it is impossible to accurately determine the moving direction and trajectory of the moving target at this time, resulting in the failure to use the most reasonable strategy to ensure the image quality of the moving target during encoding. Ultimately, when there are many moving targets, the encoding effect is usually poor, further reducing the imaging quality of the moving targets at night. Therefore, how to improve the imaging quality of moving targets at night has become an urgent problem to be solved.

[0004] In related night imaging technologies, most of them judge the movement of the target based on the changes between image frames. However, when the brightness of the moving target is similar or the same as the background, the imaging of the moving target will have a large tail or blend into the background, resulting in low judgment accuracy. Some use AI ISP (Artificial Intelligence Image Signal Processing) technology to improve the problem of large tails or blending into the background when the brightness of the moving target at night is similar or the same as the background. However, the AI ​​model training cycle is long, the problem iteration efficiency is low, and it may take multiple trainings to achieve the desired effect. Summary of the invention

[0005] The present invention aims to solve one of the technical problems in the related art to at least a certain extent. To this end, the present invention provides a night imaging control method, device, electronic device and storage medium to solve the problem of large tail or dissolution into the background caused by low ambient light and the brightness of the moving target being similar or the same as the background, thereby improving the imaging quality of the moving target at night.

[0006] The present invention provides a nighttime imaging control method, comprising:

[0007] When there is a moving target in a target video captured by a camera in an event vision sensor (EVS) mode, obtaining parameter information of the moving target, and determining a smear area in a target image where the moving target is located based on the parameter information;

[0008] Obtaining the grayscale value of each pixel in the smear area, and determining the smear length according to the grayscale value of each pixel;

[0009] When the smear length is greater than or equal to a preset length, the EVS parameters of the EVS mode are adjusted until the smear length is less than the preset length, a target EVS parameter is obtained, and the camera is controlled to perform nighttime shooting with the target EVS parameter.

[0010] In some possible implementations, the parameter information includes a motion position and a motion direction; determining a smear area in a target image where the moving target is located based on the parameter information, including: filtering and edge extraction processing the target image to obtain a target sub-image; and determining the smear area on the opposite direction of the motion direction based on the motion position and the motion direction.

[0011] In some possible implementations, determining the length of the trailing shadow based on the grayscale value of each pixel point includes: taking the first pixel point in the trailing shadow area as the starting point and comparing the grayscale value of each pixel point with a preset grayscale value in sequence along the opposite direction of the movement direction; when the grayscale value of the first pixel point is greater than or equal to the preset grayscale value, determining the pixel point as a first target pixel point; when the grayscale value of the pixel point and the grayscale values ​​of a preset number of pixel points longitudinally adjacent to the pixel point are less than the preset grayscale value, determining the pixel point as a second target pixel point; and determining the length of the trailing shadow based on the first target pixel point and the second target pixel point.

[0012] In some possible implementations, determining the ghost length based on the first target pixel and the second target pixel includes: acquiring first coordinate data of the first target pixel in the image and second coordinate data of the second target pixel in the image; and determining the ghost length based on the first coordinate data and the second coordinate data.

[0013] In some possible implementations, the filtering and edge extraction processing of the target image to obtain the target sub-image includes: cropping the target image according to the motion position and the motion direction; filtering and edge extraction processing of the cropped target image to obtain the target sub-image.

[0014] In some possible implementations, the method further includes: acquiring a gain value of the camera; and controlling the camera to shoot in the EVS mode when the gain value is greater than or equal to a preset gain value.

[0015] In some possible implementations, the method further includes: obtaining an initial video shot by the camera in the EVS mode, the initial video including the moving target, and obtaining contour information of the moving target; when it is determined according to the contour information that the moving target includes a human body, adjusting the shutter time of the camera to a first preset value; when it is determined according to the contour information that the moving target includes a vehicle, adjusting the shutter time of the camera to a second preset value, the second preset value being less than the first preset value; and controlling the camera to shoot the target video with the adjusted shutter time.

[0016] The present invention also provides a nighttime imaging control device, comprising: a moving target detection module, for obtaining parameter information of the moving target when there is a moving target in a target video shot by a camera in an EVS mode, and determining a smear area in a target image where the moving target is located based on the parameter information; a smear length determination module, for obtaining the grayscale value of each pixel in the smear area, and determining the smear length according to the grayscale value of each pixel; an adjustment module, for adjusting the EVS parameters of the EVS mode when the smear length is greater than or equal to a preset length until the smear length is less than the preset length, thereby obtaining target EVS parameters, and controlling the camera to perform nighttime shooting and imaging with the target EVS parameters.

[0017] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the nighttime imaging control methods described above is implemented.

[0018] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the nighttime imaging control method as described in any one of the above is implemented.

[0019] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the nighttime imaging control method as described above is implemented.

[0020] The night imaging control method, device, electronic device and storage medium provided by the present invention control the camera to shoot in EVS mode at night. When there is a moving target in the target video shot by the camera in the EVS mode, parameter information of the moving target is obtained, and a smear area is determined in the target image where the moving target is located according to the parameter information; then the grayscale value of each pixel in the smear area is obtained, and the smear length is determined according to the grayscale value of each pixel; when the smear length is greater than or equal to a preset length, the EVS parameters of the EVS mode are adjusted until the smear length is less than the preset length. By adjusting the EVS parameters, the camera is made more sensitive to the detection of moving targets. When the brightness of the moving target is similar to or the same as the background, the camera can still accurately detect the moving target, thereby solving the problem of large tail or dissolution into the background when the ambient light is low and the brightness of the moving target is similar to or the same as the background, and improving the imaging quality of the moving target at night. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 is one of the flow charts of the nighttime imaging control method according to an embodiment of the present invention;

[0023] Figure 2 This is the second flowchart of the nighttime imaging control method according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a target image and a target sub-image of a specific example of the present invention;

[0025] Figure 4 is the third flowchart of the nighttime imaging control method according to an embodiment of the present invention;

[0026] Figure 5 is a fourth flowchart of the nighttime imaging control method according to an embodiment of the present invention;

[0027] Figure 6 is the fifth flowchart of the nighttime imaging control method according to an embodiment of the present invention;

[0028] Figure 7 is the sixth flowchart of the nighttime imaging control method according to an embodiment of the present invention;

[0029] Figure 8 is a flowchart of a nighttime imaging control method according to a specific example of the present invention;

[0030] Fig. 9 is a block diagram of a nighttime imaging control device according to an embodiment of the present invention;

[0031] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Figure 1 FIG. 1 is one of the flow charts of the nighttime imaging control method according to an embodiment of the present invention. Figure 1 As shown, the night imaging control method may include the following steps:

[0034] Step 110: when there is a moving target in the target video shot by the camera in the event vision sensor (EVS) mode, obtain parameter information of the moving target, and determine a smear area in the target image where the moving target is located based on the parameter information.

[0035] First of all, it should be noted that the execution subject of the night imaging control method of the embodiment of the present invention can be a processing chip in a camera, and the camera can be a surveillance camera supporting EVS technology. Specifically, the camera is provided with an EVS (Event Vision Sensor), which can detect the change in the brightness of each pixel, and combine the "coordinates" and "time information" to output only the data corresponding to the changed pixels, thereby achieving high-efficiency, high-speed and low-latency data output.

[0036] In this embodiment, the camera includes two shooting modes, one is the normal shooting mode and the other is the EVS mode. When it is in the daytime with sufficient light, the camera can be controlled to shoot or film in the normal mode, because in the environment with good light, the moving direction, trajectory and speed of the moving target can be accurately judged according to the image, in this case, the output image with good imaging quality can be guaranteed, and the normal shooting mode can meet the application.

[0037] When it is nighttime with insufficient light, the camera can be controlled to record or shoot in EVS mode. As the ambient light decreases, the noise increases, and the brightness of the picture decreases, when the brightness of the moving target is similar to or the same as the background, it is extremely difficult to accurately judge the movement state of the moving target. At this time, EVS is needed to output image data or video data to the processing chip in the camera.

[0038] When the camera shoots a video in EVS mode, if there is a moving target in the video, EVS will output the position information, direction information, and contour information of the moving target in the image to the processing chip while outputting the video data to the processing chip. Therefore, when there is a moving target in the target video shot by the camera, the parameter information of the moving target can be obtained through EVS.

[0039] It should be noted that the moving target may be any moving object such as pedestrians and vehicles, the target video may be video data captured with the moving target, and the parameter information may be position information, direction information, and contour information of the moving target.

[0040] After obtaining the parameter information of the moving target, the smear area in the target image where the moving target is located can be determined according to the parameter information. Here, it should be noted that the target image can be any frame of the target video with the moving target, and the smear area refers to the smear generated by the camera when shooting the moving target because the moving target is in a moving state. Obviously, in the image, the smear area is generally behind the moving target, so the rear position of the moving target can be determined according to the position information and movement direction information of the moving target, and then the smear area can be determined.

[0041] Step 120: Obtain the grayscale value of each pixel in the smear area, and determine the smear length according to the grayscale value of each pixel.

[0042] When the target image is determined, the target image can be converted into a grayscale image first; after the smear area is determined, the grayscale value of each pixel of the target image can be collected; and the smear length in the target image is determined according to the grayscale value of each pixel in the smear area. The larger the smear length value, the worse the imaging quality of the moving target captured by the camera, and the smaller the smear length value, the better the imaging quality of the moving target captured by the camera.

[0043] Step 130: When the smear length is greater than or equal to the preset length, adjust the EVS parameters of the EVS mode until the smear length is less than the preset length, obtain the target EVS parameters, and control the camera to perform night shooting imaging with the target EVS parameters.

[0044] It should be noted that the preset length can be manually set by the staff according to actual needs, and no specific restrictions are made here.

[0045] After obtaining the smear length in the target image, the smear length can be compared with a preset length. When the smear length is less than the preset length, it is considered that the target image meets the standard and the imaging quality is good; when the smear length is greater than or equal to the preset length, it is considered that the target image does not meet the standard and the imaging quality is poor. Therefore, when the smear length is greater than or equal to the preset length, the EVS parameters of the EVS mode are adjusted to make the camera more sensitive to the detection of moving targets, thereby reducing the degree of smearing. In this embodiment, the EVS parameters can be voltage values, current values, etc. of the EVS.

[0046] After adjusting the EVS parameters, a new target image is acquired again to determine the smear area in the target image; the target image is then converted into a grayscale image; finally, the smear length of the new target image is determined according to the grayscale value of the smear area; when the smear length is still greater than or equal to the preset length, the EVS parameters of the EVS mode are continuously adjusted, and the above steps are continuously repeated until the smear length is less than the preset length. The EVS parameters at this time can be used as the target EVS parameters, and the camera can be controlled to monitor and record with the target EVS parameters.

[0047] In this embodiment, if the smear length is greater than or equal to the preset length, not only can the EVS parameters of the EVS mode be adjusted, but also different spatiotemporal noise reduction can be used for moving targets and stationary targets respectively to perform noise reduction processing on the video data. For example, when reducing the noise of moving targets, 3D noise reduction is used less or even not used, and 2D noise reduction is used more to improve the problem of moving targets trailing or blending into the background. In addition, other parameters of the camera can also be adjusted to improve the night imaging quality, such as clarity, brightness, etc.

[0048] Therefore, by calculating the length of the trailing shadow in the image and continuously adjusting the EVS parameters, the captured video data or image data can meet the required standards, which solves the problem of large trailing shadow or dissolving into the background when the ambient light is low and the brightness of the moving target is similar to or the same as the background, and effectively improves the imaging quality of moving targets at night.

[0049] In some embodiments, the parameter information includes a movement position and a movement direction. Figure 2 FIG. 2 is a flowchart of the nighttime imaging control method according to an embodiment of the present invention. Figure 2 As shown, in step 110, determining the smear area in the target image where the moving target is located based on the parameter information may include the following steps:

[0050] Step 210: Filter and extract edges of the target image to obtain a target sub-image.

[0051] Step 220: On the opposite side of the moving direction, determine the smear area based on the moving position and the moving direction.

[0052] It should be noted that the moving position of the moving target may be a coordinate value of the moving target in the target image.

[0053] In this embodiment, the target image may be first filtered and edge extracted to filter out most of the noise in the target image and obtain a target sub-image with a stronger edge, thereby improving subsequent calculation and detection accuracy. Figure 3 is a schematic diagram of a target image and a target sub-image of a specific example of the present invention, such as Figure 3 As shown, after the target image is filtered and edge extracted, the outline, position, etc. of the moving target can be clearly determined.

[0054] The target image can be filtered by Gaussian filtering, mean filtering, median filtering, etc. For example, Gaussian filtering is a process of weighted averaging the target image, where the value of each pixel is obtained by weighted averaging the value of itself and other pixels in the neighborhood. The filtering method is not specifically limited here.

[0055] The edge in an image is where the pixel value changes. It is one of the significant features of the image and plays an important role in image feature extraction, target detection, etc. If there is a change in grayscale value in an image, there will be a gradient, thus generating an edge. At the edge, there is a change in strength and direction.

[0056] The method of edge extraction of the target image includes using the first-order or second-order derivative to find the gradient, and then extracting the edge according to the gradient. In this embodiment, it can be determined whether to use the first-order or second-order derivative to find the gradient according to the edge characteristics of the target image. When the first-order or high-order derivative is found for the target image, some peak values ​​will be obtained. When these peak values ​​exceed the specified threshold, the pixels corresponding to these peak values ​​are considered to be edges. After the edge is determined, the edge can be extracted. The specific edge extraction process can refer to the existing image edge extraction process, which will not be repeated here.

[0057] It is understandable that the smear area is usually behind the moving target. After obtaining the target sub-image, the position of the smear area can be determined according to the moving position and moving direction of the moving target in the target sub-image. Figure 3 , Figure 3 The moving direction of the moving target in the target sub-image is to the left, and the right area of ​​the moving target in the target sub-image (excluding the moving target) can be used as the trailing area. The trailing area is Figure 3 The area where the white box 301 is located.

[0058] In some implementations, the contour information of the moving target may also be obtained, that is, the coordinate value of the contour of the moving target in the target sub-image. According to the coordinate value and the moving direction of the contour, a boundary line is first determined, and then the smear area is determined based on the boundary line. Figure 3 , Figure 3 If the moving target is moving to the left, the contour line on the right side of the moving target can be used as the boundary line, and then the boundary line can be used as the reference to take the area on the right side of the boundary line as the smear area. Figure 3 The white box 301 is the smear.

[0059] In some embodiments, filtering and edge extraction processing are performed on the target image in step 210 to obtain a target sub-image, which may include: cropping the target image according to the motion position and motion direction; filtering and edge extraction processing are performed on the cropped target image to obtain a target sub-image.

[0060] Specifically, when the moving target moves to a single background without complex details, the moving target can be cropped first. When cropping, the moving target itself and the area behind it with a width of x pixels can be selected, where x can take a larger value to ensure that the cropped image contains a complete smear. Further, the cropped target image is filtered and edge extracted to obtain a target sub-image. In this way, the processing time of filtering and edge extraction can be reduced, and the detection of smear can be accelerated.

[0061] Figure 4 FIG. 3 is a flowchart of the nighttime imaging control method according to an embodiment of the present invention. Figure 4 As shown, in some implementations, determining the smear length according to the grayscale value of each pixel in step 120 may include the following steps:

[0062] Step 410: Taking the first pixel in the smear area as the starting point and moving in the opposite direction of the moving direction, the grayscale value of each pixel is compared with the preset grayscale value in sequence.

[0063] Step 420: When the grayscale value of the first pixel is greater than or equal to the preset grayscale value, determine the pixel as a first target pixel.

[0064] Step 430: When the grayscale value of the pixel point and the grayscale values ​​of a preset number of pixel points vertically adjacent to the pixel point are less than the preset grayscale value, determine that the pixel point is a second target pixel point.

[0065] Step 440: Determine the smear length according to the first target pixel and the second target pixel.

[0066] It should be noted that the preset grayscale value can be manually set by the staff according to actual needs, and no specific restrictions are made here.

[0067] Specifically, the detection can be started from the first pixel point in the smear area, where the first pixel point can be the pixel point closest to the moving target and located on the upper side of the target sub-image. Further, along the opposite direction of the moving target, the grayscale value of each pixel point is detected in turn to see if it is greater than a preset grayscale value; if the grayscale value of the pixel point is less than the preset grayscale value, it indicates that the pixel point is not a smear point; if the grayscale value of the pixel point is greater than or equal to the preset grayscale value, it indicates that the pixel point is a smear point.

[0068] In this embodiment, a coordinate system can be established with any point in the target sub-image as the origin, and each pixel point has a corresponding coordinate value, so that the smear length can be calculated according to the coordinates later.

[0069] When the grayscale value of a pixel is detected for the first time to be greater than or equal to the preset grayscale value, the coordinate value P (p, q) of the pixel at this time can be recorded, and the pixel is the first target pixel. Then, along the horizontal coordinate direction in the opposite direction of the movement direction, continue to detect whether each pixel is a smear point. If the grayscale values ​​of each subsequent pixel are greater than or equal to the preset grayscale value, continue to detect in the horizontal direction; if a pixel appears later with a grayscale value less than the preset grayscale value, the coordinate value M (m, n) of this pixel can be recorded, and the pixel M point is used as the starting point to detect along the vertical direction.

[0070] When the detection is performed along the longitudinal direction with the pixel point as the starting point, the detection range can be n±α, and α can be manually set according to actual needs. Specifically, α pixels above point M are detected, and α pixels below point M are detected. If the grayscale value of a pixel point is detected to be greater than or equal to the preset grayscale value, the coordinate value F(f, t) of the pixel point can be recorded, and the detection is performed again in the opposite direction of the movement direction with point W as the starting point.

[0071] Repeat the above process until a pixel is found, the grayscale value of which is less than the preset grayscale value, and the grayscale values ​​of the α pixels above and below the pixel are all less than the preset grayscale value, then the pixel can be considered as the tailing end point (i.e., the second target pixel), and the coordinate value W (w, v) of the pixel can be recorded. Finally, the length of the tailing in the target sub-image can be determined based on the first target pixel and the second target pixel.

[0072] Figure 5 FIG. 4 is a flowchart of the nighttime imaging control method according to an embodiment of the present invention. Figure 5As shown, in some implementations, determining the smear length according to the first target pixel and the second target pixel in step 440 may include the following steps:

[0073] Step 510: Obtain first coordinate data of a first target pixel point in the image and second coordinate data of a second target pixel point in the image.

[0074] Step 520: Determine the length of the smear according to the first coordinate data and the second coordinate data.

[0075] Specifically, the straight-line distance between the first coordinate data of the first target pixel and the second coordinate data of the second target pixel in the image can be calculated, and the straight-line distance can be used as the smear length. The smear length can also be calculated based on the abscissa in the first coordinate data and the abscissa in the second coordinate data. In this implementation, the abscissa in the first coordinate data and the abscissa in the second coordinate data are mainly used to calculate the smear length.

[0076] In the process of smear point detection, the coordinate values ​​of the first target pixel point and the second target pixel point are recorded. At this time, the coordinate value P (p, q) of the first target pixel point can be retrieved as the first coordinate data, and the coordinate value W (w, v) of the second target pixel point can be retrieved as the second coordinate data. After obtaining the first coordinate data and the second coordinate data, the smear length can be calculated by the following formula:

[0077] L=|wp|

[0078] Wherein, L is the smear length, w is the horizontal coordinate of the second target pixel point, and p is the horizontal coordinate of the first target pixel point.

[0079] After the smear length is obtained in the above manner, the EVS parameters, noise reduction and other parameters of the EVS mode can be adjusted according to the smear length.

[0080] Figure 6 FIG5 is a flowchart of the nighttime imaging control method according to an embodiment of the present invention. Figure 6 As shown, in some implementations, the camera can be controlled to switch shooting modes by the following steps:

[0081] Step 610: Obtain the gain value of the camera.

[0082] Step 620: When the gain value is greater than or equal to the preset gain value, control the camera to shoot in the EVS mode.

[0083] It should be noted that gain refers to a technology that increases the brightness of an image by increasing the signal amplification degree of the camera during the camera shooting process. The greater the increased gain, the lower the light intensity of the camera environment. In addition, the preset gain value can be manually set by the staff according to actual needs, and no specific restrictions are made here.

[0084] Specifically, the camera can be controlled to shoot in normal mode first. During the shooting process, the current gain value can be obtained from the processing chip of the camera in real time. After obtaining the gain value, the gain value is compared with the preset gain value. If the gain value is detected to be less than the preset gain value, it indicates that the lighting of the camera's surrounding environment is good and does not affect the image quality. If the gain value is detected to be greater than or equal to the preset gain value, it indicates that the lighting of the camera's surrounding environment is low and has affected the image quality. At this time, it is necessary to control the camera to switch from the normal shooting mode to the EVS mode for subsequent shooting.

[0085] Similarly, when the camera is shooting in the EVS mode, the current gain value is still obtained in real time. When it is detected that the gain value is less than the preset gain value, the camera can be controlled to switch from the EVS mode to the normal shooting mode.

[0086] Figure 7 FIG6 is a flowchart of the nighttime imaging control method according to an embodiment of the present invention. Figure 7 As shown, in some implementations, the imaging quality of the camera can also be improved by the following steps:

[0087] Step 710: Acquire an initial video shot by a camera in EVS mode, the initial video including a moving target, and acquire contour information of the moving target.

[0088] Step 720: When it is determined according to the contour information that the moving target includes a human body, the shutter time of the camera is adjusted to a first preset value.

[0089] Step 730: When it is determined according to the contour information that the moving target includes a vehicle, the shutter time of the camera is adjusted to a second preset value, where the second preset value is smaller than the first preset value.

[0090] Step 740: Control the camera to shoot the target video with the adjusted shutter time.

[0091] It should be noted that the first preset value and the second preset value can be set by staff based on experience.

[0092] Specifically, when the camera is shooting in EVS mode, if there is a moving target in the initial video, EVS will output the position information, direction information, and contour information of the moving target in the image to the processing chip while outputting the video data to the processing chip. It should be noted that the contour information can be the coordinate value of the contour of the moving target in the image.

[0093] After obtaining the contour information, the type of the moving target can be determined according to the contour information, and the type can be a human body, a vehicle, etc.; and the shutter time is adjusted according to the type of the moving target to prevent the problem of ghosting caused by a slow shutter shooting speed. Since different moving targets have different moving speeds, this embodiment adjusts the shutter time according to the type of the moving target, and can adjust the shutter time to the required speed more quickly and accurately.

[0094] In this embodiment, an existing contour recognition model may be used to determine the type of the moving target. Specifically, contour information may be input into a trained contour recognition model, and the contour recognition model may classify the contour information to obtain the type of the moving target.

[0095] When it is determined that the moving target includes a human body, the shutter time can be adjusted to a first preset value, and then the shutter time can be adjusted continuously based on the first preset value until the camera does not produce a ghost image when shooting the moving target. Similarly, when it is determined that the moving target includes a vehicle, the shutter time can be adjusted to a second preset value, and then the shutter time can be adjusted continuously based on the second preset value until the camera does not produce a ghost image when shooting the moving target.

[0096] If there is no moving target in the initial video, the shutter time can be restored to a normal value to ensure picture brightness and imaging quality.

[0097] Therefore, the type of the moving target is first determined based on the contour information of the moving target, and the shutter time is first adjusted to a preset speed based on the type of the moving target, and then the shutter speed is continuously adjusted based on this speed, so that the shutter time can be adjusted to a suitable value more quickly. And by adjusting the shutter time, it is possible to effectively prevent the generation of ghost images when shooting moving targets, further improving the imaging quality of the camera output picture.

[0098] In some implementations, the method for improving the camera imaging quality may also include: the camera may detect in real time whether there is mosaic in the captured video, and if there is mosaic, the encoding-related parameters may be adjusted, such as the code control strategy, to further improve the imaging quality of the camera output image. The method for detecting whether there is mosaic in the video may adopt an existing detection method, which will not be described in detail here.

[0099] For ease of understanding, the nighttime imaging control method according to an embodiment of the present invention is further described below with reference to a specific example. Figure 8 FIG. 1 is a flowchart of a night imaging control method according to a specific example of the present invention. Figure 8 As shown, the night imaging control method may further include the following steps:

[0100] Step 810: When the camera works in a normal shooting mode, the gain value of the camera is obtained in real time.

[0101] Step 820 : Determine whether the gain value is greater than or equal to the preset gain value. If not, continue to work in the normal shooting mode. If so, proceed to step 830 .

[0102] Step 830: Control the camera to work in EVS mode.

[0103] Step 840: Determine whether a moving target is detected. If not, do not process. If so, obtain the contour information of the moving target and adjust the shutter time according to the contour information.

[0104] Step 850 : Calculate the length of the smear and determine whether the smear length is greater than or equal to a preset length. If not, proceed to step 840 ; if yes, proceed to step 860 .

[0105] Step 860: Adjust EVS parameters, spatiotemporal noise reduction, and other image-related parameters.

[0106] Step 870: Determine whether mosaic is detected, if not, proceed to step 850, if yes, proceed to step 880.

[0107] Step 880: Adjust encoding related parameters.

[0108] Step 890 : Determine whether the gain value is less than the preset gain value, if not, proceed to step 840 , if yes, proceed to step 810 .

[0109] Therefore, when the ambient light is low and the brightness of the moving target is similar to or the same as the background, by adjusting the shutter time when a moving target is detected, motion ghosting is prevented, thereby improving the imaging quality of the night camera output picture. By determining the smear length of the target image, it is determined whether there is a problem of tailing or blending into the background in the captured target image, and when the smear length is greater than or equal to the preset length, the EVS parameters, spatiotemporal noise reduction and other image-related parameters are adjusted to improve the camera's detection sensitivity to moving targets, thereby further improving the imaging quality of the night camera output picture. By detecting whether there is a mosaic in the captured image and adjusting the encoding-related parameters when there is a mosaic in the image, the imaging quality of the night camera output picture is once again improved.

[0110] Fig. 9 FIG. 1 is a block diagram of a nighttime imaging control device according to an embodiment of the present invention. Fig. 9 As shown, the night imaging control device 900 may include:

[0111] A moving target detection module 910 is used to obtain parameter information of the moving target when there is a moving target in the target video shot by the camera in the EVS mode, and determine a smear area in the target image where the moving target is located based on the parameter information;

[0112] The smear length determination module 920 is used to obtain the gray value of each pixel in the smear area and determine the smear length according to the gray value of each pixel;

[0113] The adjustment module 930 is used to adjust the EVS parameters of the EVS mode when the smear length is greater than or equal to the preset length until the smear length is less than the preset length, obtain the target EVS parameters, and control the camera to perform night shooting imaging with the target EVS parameters.

[0114] Therefore, by controlling the camera to shoot in EVS mode at night, when there is a moving target in the target video shot by the camera in EVS mode, the moving target detection module 910 obtains the parameter information of the moving target, and determines the smear area in the target image where the moving target is located according to the parameter information; the smear length determination module 920 then obtains the grayscale value of each pixel in the smear area, and determines the smear length according to the grayscale value of each pixel; when the smear length is greater than or equal to the preset length, the adjustment module 930 adjusts the EVS parameters of the EVS mode until the smear length is less than the preset length. By adjusting the EVS parameters, the camera is made more sensitive to the detection of moving targets. When the brightness of the moving target is similar to or the same as the background, the camera can still detect the moving target, thereby solving the problem of large tail or dissolution into the background when the ambient light is low and the brightness of the moving target is similar to or the same as the background, thereby improving the imaging quality of moving targets at night.

[0115] Based on any of the above embodiments, the parameter information includes a motion position and a motion direction; the moving target detection module 910 is specifically used for:

[0116] Performing filtering and edge extraction processing on the target image to obtain a target sub-image;

[0117] On the opposite direction side of the moving direction, a smear area is determined based on the moving position and the moving direction.

[0118] Based on any of the above embodiments, the smear length determination module 920 is specifically used for:

[0119] Taking the first pixel point in the smear area as the starting point and in the opposite direction of the moving direction, the grayscale value of each pixel point is compared with the preset grayscale value in sequence;

[0120] When the grayscale value of the first pixel is greater than or equal to the preset grayscale value, determining the pixel as a first target pixel;

[0121] When the grayscale value of the pixel point and the grayscale values ​​of a preset number of pixel points vertically adjacent to the pixel point are less than the preset grayscale value, determining the pixel point as a second target pixel point;

[0122] The smear length is determined according to the first target pixel point and the second target pixel point.

[0123] Based on any of the above embodiments, the smear length determination module 920 is further specifically used for:

[0124] Acquire first coordinate data of the first target pixel point in the image and second coordinate data of the second target pixel point in the image;

[0125] The smear length is determined according to the first coordinate data and the second coordinate data.

[0126] Based on any of the above embodiments, the moving target detection module 910 is further specifically used for:

[0127] Cutting the target image according to the motion position and the motion direction;

[0128] The cropped target image is filtered and edge extracted to obtain the target sub-image.

[0129] Based on any of the above embodiments, the nighttime imaging control device 900 further includes:

[0130] A gain value acquisition module, used to acquire the gain value of the camera;

[0131] The shooting module is used to control the camera to shoot in the EVS mode when the gain value is greater than or equal to a preset gain value.

[0132] Based on any of the above embodiments, the nighttime imaging control device 900 further includes:

[0133] A video acquisition module, used to acquire an initial video shot by the camera in the EVS mode, wherein the initial video includes the moving target, and acquire contour information of the moving target;

[0134] an adjusting module, configured to adjust the shutter time of the camera to a first preset value when it is determined according to the contour information that the moving target includes a human body;

[0135] The adjustment module is further configured to adjust the shutter time of the camera to a second preset value when it is determined according to the contour information that the moving target includes a vehicle, wherein the second preset value is smaller than the first preset value;

[0136] The control module is used to control the camera to shoot the target video with the adjusted shutter time.

[0137] It should be noted that for details not disclosed in the nighttime imaging control device of this embodiment, please refer to the details disclosed in the embodiment of the nighttime imaging control method in the embodiment of this specification, and no further details will be given here.

[0138] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the night imaging control method, which includes: when there is a moving target in the target video shot by the camera in the event vision sensor EVS mode, obtaining parameter information of the moving target, and determining the smear area in the target image where the moving target is located based on the parameter information; obtaining the gray value of each pixel in the smear area, and determining the smear length according to the gray value of each pixel; when the smear length is greater than or equal to the preset length, adjusting the EVS parameters of the EVS mode until the smear length is less than the preset length, obtaining the target EVS parameters, and controlling the camera to perform night shooting imaging with the target EVS parameters.

[0139] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0140] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the night imaging control method provided by the above-mentioned methods, which includes: when there is a moving target in the target video shot by the camera in the event vision sensor EVS mode, obtaining parameter information of the moving target, and determining a smear area in the target image where the moving target is located based on the parameter information; obtaining the grayscale value of each pixel in the smear area, and determining the smear length according to the grayscale value of each pixel; when the smear length is greater than or equal to a preset length, adjusting the EVS parameters of the EVS mode until the smear length is less than the preset length, obtaining the target EVS parameters, and controlling the camera to perform night shooting imaging with the target EVS parameters.

[0141] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the night imaging control method provided by the above-mentioned methods, the method comprising: when there is a moving target in the target video shot by the camera in the event vision sensor EVS mode, obtaining parameter information of the moving target, and determining a smear area in the target image where the moving target is located based on the parameter information; obtaining the grayscale value of each pixel in the smear area, and determining the smear length according to the grayscale value of each pixel; when the smear length is greater than or equal to a preset length, adjusting the EVS parameters of the EVS mode until the smear length is less than the preset length, obtaining the target EVS parameters, and controlling the camera to perform night shooting imaging with the target EVS parameters.

[0142] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A nighttime imaging control method, characterized in that: include: When there is a moving target in a target video captured by a camera in an event vision sensor (EVS) mode, obtaining parameter information of the moving target, and determining a smear area in a target image where the moving target is located based on the parameter information; Obtaining the grayscale value of each pixel in the smear area, and determining the smear length according to the grayscale value of each pixel; When the smear length is greater than or equal to a preset length, the EVS parameters of the EVS mode are adjusted until the smear length is less than the preset length, a target EVS parameter is obtained, and the camera is controlled to perform nighttime shooting with the target EVS parameter.

2. The nighttime imaging control method according to claim 1, characterized in that: The parameter information includes movement position and movement direction; The determining of the smear area in the target image where the moving target is located based on the parameter information includes: Performing filtering and edge extraction processing on the target image to obtain a target sub-image; On the opposite direction side of the moving direction, a smear area is determined based on the moving position and the moving direction.

3. The nighttime imaging control method according to claim 2, characterized in that: Determining the smear length according to the grayscale value of each pixel point includes: Taking the first pixel point in the smear area as the starting point and in the opposite direction of the moving direction, the grayscale value of each pixel point is compared with the preset grayscale value in sequence; When the grayscale value of the first pixel is greater than or equal to the preset grayscale value, determining the pixel as a first target pixel; When the grayscale value of the pixel point and the grayscale values ​​of a preset number of pixel points vertically adjacent to the pixel point are less than the preset grayscale value, determining the pixel point as a second target pixel point; The smear length is determined according to the first target pixel point and the second target pixel point.

4. The nighttime imaging control method according to claim 3, characterized in that: The determining the smear length according to the first target pixel point and the second target pixel point includes: Acquire first coordinate data of the first target pixel point in the image and second coordinate data of the second target pixel point in the image; The smear length is determined according to the first coordinate data and the second coordinate data.

5. The nighttime imaging control method according to claim 2, characterized in that: The filtering and edge extraction processing of the target image to obtain a target sub-image includes: Cutting the target image according to the motion position and the motion direction; The cropped target image is filtered and edge extracted to obtain the target sub-image.

6. The nighttime imaging control method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining a gain value of the camera; When the gain value is greater than or equal to a preset gain value, the camera is controlled to shoot in the EVS mode.

7. The nighttime imaging control method according to any one of claims 1 to 5, characterized in that: The method further comprises: Acquire an initial video shot by the camera in the EVS mode, wherein the initial video includes the moving target, and acquire contour information of the moving target; In a case where it is determined according to the contour information that the moving target includes a human body, adjusting the shutter time of the camera to a first preset value; In a case where it is determined according to the contour information that the moving target includes a vehicle, adjusting the shutter time of the camera to a second preset value, where the second preset value is smaller than the first preset value; The camera is controlled to shoot the target video with the adjusted shutter time.

8. A nighttime imaging control device, characterized in that: include: A moving target detection module, used for obtaining parameter information of the moving target when there is a moving target in the target video shot by the camera in the EVS mode, and determining a smear area in the target image where the moving target is located based on the parameter information; A smear length determination module, used to obtain the grayscale value of each pixel in the smear area, and determine the smear length according to the grayscale value of each pixel; The adjustment module is used to adjust the EVS parameters of the EVS mode when the smear length is greater than or equal to the preset length until the smear length is less than the preset length, obtain the target EVS parameters, and control the camera to perform night shooting imaging with the target EVS parameters.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the nighttime imaging control method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the nighttime imaging control method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Image smear processing method and device, equipment and medium

    CN112330544A

  • Tail smear removing method, tail smear removing device and electronic equipment

    CN115719314A

  • Smear detecting method and image processor employing the smear detecting method

    JP2003174642A

  • Imaging device, imaging method and hand-held terminal device

    US20130050516A1