Dynamic target detection method and device, computer equipment and readable storage medium
By dividing the dynamic vision sensor picture into target sub-areas and performing binarization processing, only the areas that may dynamically change are deeply decoded, which solves the output delay problem of the dynamic vision sensor during target detection and improves detection efficiency and accuracy. sex.
Patent Information
- Application Number
- CN202411018166.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-26
AI Technical Summary
During target detection of dynamic vision sensors, due to the increased decoding calculation amount after data compression, the output delay increases, making it difficult to meet the needs of real-time perception.
By dividing the sensor screen to be tested into multiple target sub-areas, a binary image is generated based on the preset target event threshold and time period, connected areas are determined and decoded, and only areas that may change dynamically are processed in depth to reduce the global The amount of computation required to decode.
It effectively reduces the output delay of target detection results, improves the efficiency and accuracy of dynamic target detection, and reduces computational complexity.
Smart Images

Figure CN118748757A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a dynamic target detection method, device, computer equipment and readable storage medium. Background Art
[0002] Dynamic Vision Sensor (DVS), also known as event camera, can capture visual information by asynchronously recording pixel-level brightness changes. It has the characteristics of high temporal resolution, low latency and data compression. It is mainly used in robot vision, autonomous driving, virtual reality and other fields to provide fast and efficient visual feedback to meet real-time perception needs in dynamic environments.
[0003] In the related art, dynamic vision sensors generally compress and encode the timestamp, pixel position and brightness change direction (polarity) of visual events before transmission to minimize the bandwidth of data transmission. However, as the spatial resolution of the sensor increases, the amount of calculation required to decode the compressed event data and perform target detection will also increase dramatically, thereby increasing the output delay of the target detection results. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a dynamic target detection method, device, computer equipment and readable storage medium, which can reduce the output delay of target detection results.
[0005] To achieve the above object, a first aspect of an embodiment of the present application provides a dynamic target detection method, the method comprising:
[0006] Acquire the encoded sensor image to be tested, and divide the sensor image to be tested into a plurality of target sub-areas;
[0007] Obtaining a preset target event threshold and a target time period, and generating a first binary image according to the difference between the number of first events occurring in each of the target sub-areas within the target time period and the target event threshold;
[0008] Determine at least one first connected area based on the first binary image, and decode the corresponding position of the first connected area in the image of the sensor to be tested to obtain a corresponding event accumulation image;
[0009] Binarizing the event accumulation image according to a preset binarization threshold to obtain at least one second connected region determined from the event accumulation image;
[0010] The second connected area is mapped to a corresponding position in the image of the sensor to be tested to obtain a dynamic target detection result of the image of the sensor to be tested.
[0011] Accordingly, a second aspect of an embodiment of the present application provides a dynamic target detection device, the device comprising:
[0012] A division module, used for acquiring the encoded sensor picture to be tested, and dividing the sensor picture to be tested into a plurality of target sub-areas;
[0013] A generating module, used for acquiring a preset target event threshold and a target time period, and generating a first binary image according to the difference between the number of first events occurring in each of the target sub-areas within the target time period and the target event threshold;
[0014] A decoding module, used for determining at least one first connected area based on the first binary image, and decoding a corresponding position of the first connected area in the image of the sensor to be tested to obtain a corresponding event accumulation image;
[0015] A processing module, configured to perform binarization processing on the event accumulation image according to a preset binarization threshold value to obtain at least one second connected region determined from the event accumulation image;
[0016] The acquisition module is used to map the second connected area to a corresponding position in the image of the sensor to be tested, so as to obtain a dynamic target detection result of the image of the sensor to be tested.
[0017] In some embodiments, the generating module is further used to:
[0018] Obtaining an initial first time period and a first event threshold;
[0019] In a first time period, obtaining a second event number of events occurring in each of the target sub-regions, and determining a target sub-region including a second event number greater than the first event threshold as a first sub-region;
[0020] The number of the first sub-areas is determined as a first number, and based on the first number and a second event number of events included in each of the first sub-areas, the first event threshold and the first time period are adjusted to obtain a target event threshold and a target time period.
[0021] In some embodiments, the generating module is further used to:
[0022] Get the first sub-region quantity threshold;
[0023] When the first number is less than the first sub-region number threshold, calculating the first event mean of each first sub-region according to the number of second events included in the first sub-regions;
[0024] When the first event mean is greater than a mean threshold, the first event threshold is used as a target event threshold, and the first time period is used as a target time period, wherein the mean threshold is greater than or equal to the first event threshold.
[0025] In some embodiments, the generating module is further used to:
[0026] When the first event mean is less than the mean threshold, adding a preset first time adjustment scale to the first time period to obtain a second time period;
[0027] In the second time period, obtaining a third event number of events occurring in each of the target sub-regions, and determining a target sub-region including a third event number greater than the first event threshold as a second sub-region;
[0028] Determine the number of the second sub-regions as a second number, and when the second number is less than the first sub-region number threshold, calculate the second event mean of each second sub-region according to the number of third events included in the second sub-regions;
[0029] Repeat the calculation of the second event mean of the second sub-area until the second event mean is greater than the mean threshold, take the first event threshold as the target event threshold, and take the second time period corresponding to the second event mean being greater than the mean threshold as the target time period.
[0030] In some embodiments, the generating module is further used to:
[0031] When the first number is greater than the first sub-region number threshold, a second event threshold is obtained; wherein the second event threshold is a threshold for filtering out the first sub-region with noise by the number of events;
[0032] when there is a first sub-region with a number of events greater than the second event threshold, determining the number of first sub-regions with a number of events between the first event threshold and the second event threshold as a third number, and determining the number of first sub-regions with a number of events greater than the first event threshold within the first time period as a fourth number;
[0033] Based on the ratio of the third number to the fourth number, obtaining a first event number ratio;
[0034] When the first event number ratio is greater than a preset ratio threshold, adjusting the first event threshold according to a preset event adjustment scale to obtain a third event threshold;
[0035] The third event threshold is used as a target event threshold, and the first time period is used as a target time period.
[0036] In some embodiments, the generating module is further used to:
[0037] When there is no first sub-region in which the number of events is greater than the second event threshold, adding a preset second time adjustment scale to the first time period to obtain a third time period;
[0038] In the third time period, obtaining a fourth event number of events occurring in each of the target sub-regions, and determining a target sub-region including a fourth event number greater than the first event threshold as a third sub-region;
[0039] Determine the number of the third sub-regions as a fifth number, and when the fifth number is less than the first sub-region number threshold, calculate the third event mean of each of the third sub-regions according to a plurality of fourth event numbers of a plurality of the third sub-regions;
[0040] Repeat the calculation of the third event mean of each of the third sub-areas until the third event mean is greater than the mean threshold, use the first event threshold as the target event threshold, and use the third time period as the target time period.
[0041] In some embodiments, the generating module is further used to:
[0042] In the target time period, according to the distribution positions of the target sub-regions in the image of the sensor to be tested, an event matrix consisting of the first number of events of the target sub-regions is generated;
[0043] Compare each matrix element included in the event matrix with the target event threshold to obtain a comparison result;
[0044] The binarization value of each of the matrix elements is determined according to the comparison result, and a corresponding first binarization image is generated based on the binarization value.
[0045] In some implementations, the decoding module is further configured to:
[0046] Performing connected region detection on the first binary image to obtain at least one first basic search region;
[0047] Expanding the edge of the connected area according to a preset expansion scale to obtain a second basic search area;
[0048] Obtaining a preset unit matrix, and performing a moving convolution on the second basic search area based on the unit matrix to obtain a convolution result;
[0049] At least one first connected region is determined according to the convolution result.
[0050] In some embodiments, the processing module is further used to:
[0051] Obtain a unit convolution kernel, and perform sliding convolution on the event accumulation image with a unit step size according to the unit convolution kernel to obtain a first convolution value calculated between each target sub-region in the event accumulation image and the unit convolution kernel;
[0052] Determining a binarization value of the target sub-region based on a deviation between the first convolution value and a preset binarization threshold;
[0053] Based on the plurality of binarized values, generating a second binarized image of the event accumulation image;
[0054] At least one second connected region is determined from the second binarized image.
[0055] To achieve the above-mentioned purpose, the third aspect of the embodiments of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the dynamic target detection method described in any one of the embodiments of the first aspect of the present application when executing the computer program.
[0056] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the dynamic target detection method described in any one of the embodiments of the first aspect of the present application.
[0057] The embodiment of the present application obtains the encoded sensor screen to be tested, and divides the sensor screen to be tested into multiple target sub-areas; obtains the preset target event threshold and target time period, and generates a first binary image according to the difference between the number of first events occurring in each target sub-area within the target time period and the target event threshold; determines at least one first connected area based on the first binary image, and decodes the corresponding position of the first connected area in the sensor screen to be tested to obtain a corresponding event accumulation image; binarizes the event accumulation image according to the preset binary threshold to obtain at least one second connected area determined from the event accumulation image; maps the second connected area to the corresponding position in the sensor screen to be tested to obtain the dynamic target detection result of the sensor screen to be tested. In this way, the target sub-area that may undergo dynamic changes can be screened by using the target event threshold to screen the events occurring in each target sub-area in the target time period, and only decodes the first connected area formed by multiple target sub-areas at the corresponding position of the sensor screen to be tested, instead of decoding the entire sensor screen to be tested, and further accurately calculates the second connected area that undergoes dynamic changes, effectively reducing the output delay of the target detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a schematic diagram of the architecture of a dynamic target detection system provided in an embodiment of the present application;
[0059] Figure 2 is a flow chart of a dynamic target detection method provided by an embodiment of the present application;
[0060] Figure 3 It is a compression event encoding format diagram provided by an embodiment of the present application;
[0061] Figure 4 This is an example diagram of the event accumulation image generation process provided by the embodiment of the present application;
[0062] Figure 5 is an example diagram of the overall process of the dynamic target detection method provided in the embodiment of the present application;
[0063] Figure 6 is a schematic diagram of functional modules of a dynamic target detection device provided in an embodiment of the present application;
[0064] Figure 7 It is a schematic diagram of the hardware structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0068] Dynamic Vision Sensor (DVS), also known as event camera, can capture visual information by asynchronously recording pixel-level brightness changes. It has the characteristics of high temporal resolution, low latency and data compression. It is mainly used in robot vision, autonomous driving, virtual reality and other fields to provide fast and efficient visual feedback to meet real-time perception needs in dynamic environments.
[0069] In the related art, dynamic vision sensors generally compress and encode the timestamp, pixel position and brightness change direction (polarity) of visual events before transmission to minimize the bandwidth of data transmission. However, as the spatial resolution of the sensor increases, the amount of calculation required to decode the compressed event data and perform target detection will also increase dramatically, thereby increasing the output delay of the target detection results.
[0070] Based on this, the embodiments of the present application provide a dynamic target detection method, apparatus, computer equipment and readable storage medium, which can effectively reduce the output delay of target detection results.
[0071] The dynamic target detection method, apparatus, computer device and readable storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the dynamic target detection system in the embodiments of the present application is described.
[0072] Please refer to Figure 1 In some implementations, the dynamic target detection system of the embodiment of the present application may include a terminal 11 and a server 12 .
[0073] In some embodiments, the terminal 11 may be an embedded system or a specific sensor device for acquiring real-time images from a dynamic vision sensor, and performing preliminary processing such as preprocessing and event detection on the data acquired by the dynamic vision sensor, such as operations such as sub-area division and event quantity statistics. Further, the terminal 11 may encode and optimize the transmission of the real-time images according to the system algorithm to reduce the amount of subsequent data transmission. Further, the terminal 11 may integrate a smaller processor (such as an ARM architecture processor), a dedicated sensor interface, and a data storage device (such as a flash memory) to support real-time processing and storage requirements.
[0074] Exemplarily, the server 12 can further process, analyze and make decisions on the data transmitted by the terminal 11. For example, it can determine the first connected area of interest in the encoded sensor image to be tested transmitted by the terminal 11, decode the first connected area, and perform further refinement processing to obtain a dynamic target detection result.
[0075] Furthermore, the server side 12 may also include a dedicated accelerator card to accelerate specific computing tasks, such as operations such as sliding convolution, to improve the real-time performance and responsiveness of the system.
[0076] The dynamic target detection method in the embodiment of the present application can be illustrated by the following embodiment.
[0077] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0078] In the embodiments of the present application, the dynamic target detection device will be described from the perspective of the dynamic target detection device, which can be integrated into a computer device. Figure 2 , Figure 2 This is a flowchart of the steps of the dynamic target detection method provided in the embodiment of the present application. In the embodiment of the present application, the dynamic target detection device is specifically integrated in a terminal or a server as an example. When the processor on the terminal or the server executes the program instructions corresponding to the dynamic target detection method, the specific process is as follows:
[0079] Step 101 : acquiring an encoded sensor image to be tested, and dividing the sensor image to be tested into a plurality of target sub-areas.
[0080] In some embodiments, in order to reduce computational complexity, the encoded sensor image to be tested can be divided into multiple target sub-areas to decompose the complex global processing task into multiple smaller local processing tasks, thereby reducing the amount of data processed at a single time and effectively reducing the output delay.
[0081] The sensor image to be tested may be data obtained by encoding a set of brightness change events of a scene captured by a dynamic vision sensor.
[0082] The target sub-region may be a sub-block defined in the image of the sensor to be tested, each target sub-region includes a group of pixels, and each target sub-region may be processed independently, thereby improving processing speed and efficiency.
[0083] For example, since the amount of event data of a dynamic vision sensor is very large, in order to reduce the bandwidth occupied by event data transmission, the event data can be compressed into smaller data packets through encoding to obtain the sensor image to be tested, thereby reducing the transmission and storage costs.
[0084] Specifically, dynamic vision sensors usually use the (x, y, t, p) event data format, where x and y represent the spatial coordinates on the dynamic vision sensor, t is the timestamp, and p indicates the polarity of the event. Furthermore, the event data can first use timestamp differential encoding to record the timestamp difference, and integer encode the spatial coordinates, convert the floating-point coordinates to integers, bit encode the polarity, use one bit to represent the polarity, and finally, perform summary encoding on the event to record key information, such as the time of the event, pixel position, and event intensity. This application does not specifically limit the encoding method.
[0085] like Figure 3 As shown, exemplarily, the process of encoding, compressing and transmitting the (x, y, t, p) event data actually generated by the dynamic vision sensor using the EVT3.0 data format is as follows: EVT3.0 is a 16-bit compressed event encoding format. In each EVT3.0 word, 4 most significant bits (MSBs) are used to represent different types of events; for example, when the MSB is '0010', it represents the EVT_ADDR_X event type, and EVT_ADDR_X indicates that only one event has occurred in one row of the dynamic vision sensor (X coordinate); when the MSB is '0100', it represents the VECT_12 event type, and VECT_12 uses 12 bits to indicate whether an event has occurred at 12 consecutive pixel positions of the X coordinate. If it has occurred, it is 1, and if it has not occurred, it is 0; when the MSB is '0101', it represents the VECT_8 event type, and VECT_12 uses 8 bits to indicate whether an event has occurred at 8 consecutive pixel positions of the X coordinate. If it has occurred, it is 1, and if it has not occurred, it is 0.
[0086] For example, assuming that the image resolution of the sensor to be tested is [W, H], it can be evenly divided into n x ×n y For example, for DVSIMX636 (resolution 720×1280), n x =12,n y =16, and the corresponding resolution of each target sub-region is 60×80.
[0087] By dividing the sensor screen to be tested into multiple target sub-areas, it is convenient to subsequently screen each target sub-area according to the target event threshold, thereby achieving efficient processing of event data.
[0088] Step 102, obtaining a preset target event threshold and a target time period, and generating a first binary image according to the difference between the number of first events occurring in each target sub-region within the target time period and the target event threshold.
[0089] The target event threshold can be used to filter out the target sub-area with non-noise and dynamic changes from the image of the sensor to be tested according to the number of events. Specifically, the target event threshold can be an event number standard to distinguish the effective dynamic time from the background noise and / or weak dynamics in the target sub-area.
[0090] The target time period may be the most suitable accumulated time length for effective dynamic target detection, and may be used to count the number of events in each target sub-area of the current sensor screen to be tested. In the sensor screen to be tested determined based on the target time period, the total number of target sub-areas is calculable without causing delay, and there are target sub-areas that have changed dynamically.
[0091] The first event number may be the number of events that occur in each target sub-area. For example, the first event number of the target sub-area A is 52.
[0092] The first binary image may be a binary image generated according to the difference between the number of first events occurring in the plurality of target sub-regions within the target time period and the target event threshold. For example, if the target event threshold is 50, the number of first events in the target sub-region A is 62, and the number of first events in the target sub-region B is 38, then the corresponding position of the target sub-region A in the first binary image is 1, and the corresponding position of the target sub-region B in the first binary image is 0.
[0093] Exemplarily, the target event threshold and the target time period can be dynamically adjusted by iteratively analyzing the dynamic visual sensor data. Specifically, the sensor screen to be tested can be divided into multiple target sub-areas, and the number of events in each target sub-area within a given time interval can be counted to form a statistical matrix. Then, a non-uniform histogram Hg(x) is constructed with the number of events as the horizontal coordinate and the number of target sub-areas corresponding to the number of events as the vertical coordinate. For example, the horizontal coordinate can be 0 to 50, 50 to 100, etc. There are 5 target sub-areas with the number of events from 0 to 50, and the corresponding vertical coordinate is 5. Further, the value of the time period can be adjusted by continuously accumulating the interval of the time period until the target time period is determined, and the statistical characteristics of the distribution of the number of events in the target time period meet the preset conditions. The preset conditions can include that the number of events in a specific interval in the non-uniform histogram exceeds a specific threshold, so as to determine the target time period. At the same time, the binary target event threshold can be set according to the event distribution in the target time period to distinguish the target sub-area from the background area. The background area can include the target sub-area that changes dynamically due to noise and the target sub-area that does not change dynamically.
[0094] Specifically, for all target sub-regions obtained by dividing the sensor screen to be tested, the first event number corresponding to the target sub-region can be compared with the target event threshold to determine the value of the corresponding position of the target sub-region in the first binary image, so as to facilitate screening of noise sub-regions.
[0095] By presetting the target event threshold and target time period, and generating a first binary image based on the difference between the number of events in each target sub-area within the target time period and the target event threshold, the target sub-area that may contain dynamic targets can be effectively screened out from the sensor image to be tested, so as to reduce the amount of calculation in subsequent processing steps and improve the efficiency of dynamic target detection.
[0096] In some implementations, in order to efficiently and accurately implement dynamic target detection, the system can be more flexibly adapted to different environmental conditions and target dynamic characteristics by obtaining a preset target event threshold and target time period, thereby effectively reducing the output delay of the target detection result. For example, the "obtaining a preset target event threshold and target time period" in step 102 may include:
[0097] (102.A1) Obtaining an initial first time period and a first event threshold;
[0098] (102.A2) obtaining a second event number of events occurring in each target sub-region within a first time period, and determining a target sub-region including a second event number greater than a first event threshold as a first sub-region;
[0099] (102.A3) Determine the number of first sub-regions as a first number, and adjust the first event threshold and the first time period based on the first number and a second event number of events included in each first sub-region to obtain a target event threshold and a target time period.
[0100] The first time period may be a time length initially set for counting the number of events in the target sub-area. In the iterative process, the first time period may be adjusted and optimized based on the data analysis results.
[0101] The first event threshold may be an event quantity standard set in the initial stage to distinguish effective dynamic events (caused by real dynamic targets) from background noise and / or weak dynamics in the target sub-region. The first event threshold is used to preliminarily screen out target sub-regions that may contain dynamic targets.
[0102] The second event number may refer to the number of events actually recorded in each target sub-area during the first time period. Compared with the first event threshold, if the second event number of events in the target sub-area exceeds the first event threshold, it is more likely that these target sub-areas contain dynamic targets.
[0103] The first sub-region may be a target sub-region where the number of second events occurring in the first time period exceeds a first event threshold, and the first sub-region may contain a dynamic target of interest.
[0104] The first number may refer to the total number of first sub-areas selected according to the second event number within the first time period. The first number reflects the number of sub-areas that are considered to have dynamic targets under the current setting, and is the basis for evaluating and adjusting the threshold and time period.
[0105] For example, if it is necessary to quickly identify and track moving objects in surveillance videos, the initial configuration of the system is as follows: set the first time period to 100 milliseconds, and set the first event threshold to 20, that is, if the number of events detected in a target sub-area within 100 milliseconds exceeds 20, it is determined that there may be a dynamic target in this target sub-area. If the sensor screen to be tested is divided into 100 target sub-areas, after 100 milliseconds of observation, the statistical results show that: 25 events occurred in target sub-area 1, 18 events occurred in target sub-area 2, 22 events occurred in target sub-area 3, and so on, and the number of events in other target sub-areas is similar.
[0106] In this process, the event numbers of target sub-region 1 and target sub-region 3 (25 and 22 respectively) exceed the first event threshold 20, so the target sub-region 1 and target sub-region 3 are determined as the first sub-regions.
[0107] Furthermore, the number of first sub-regions (first number) is 2, namely, target sub-region 1 and target sub-region 3. Based on this, by analyzing the first number and the number of second events contained in each first sub-region, it is possible to evaluate whether the currently set first event threshold and first time period are appropriate, and adjust them according to real-time data feedback, so that the system can understand the baseline level of event occurrence in the current environment, so as to capture more dynamic details and gradually improve the accuracy and efficiency of dynamic target detection.
[0108] By adjusting the first event threshold and the first time period, the accuracy and efficiency of dynamic target detection can be improved, and the subsequent generation of the first binary image can be facilitated.
[0109] In some embodiments, in order to maximize the response speed and adaptability of the system while maintaining high detection accuracy, thereby effectively reducing output delay, the target event threshold and target time period can be obtained by continuously iterating and optimizing the event threshold and the monitored time period, so as to ultimately achieve the purpose of reducing output delay and improving detection efficiency and accuracy while ensuring effective use of resources. For example, "based on the first number and the second number of events included in each first sub-area, the first event threshold and the first time period are adjusted to obtain the target event threshold and the target time period" in (102.A3) may include:
[0110] (102.A3.1) Obtain the first sub-area quantity threshold;
[0111] (102.A3.2) when the first number is less than the first sub-region number threshold, calculating the first event mean of each first sub-region according to the number of second events contained in the plurality of first sub-regions;
[0112] (102.A3.3) When the first event mean is greater than the mean threshold, the first event threshold is used as the target event threshold, and the first time period is used as the target time period, wherein the mean threshold is greater than or equal to the first event threshold.
[0113] The first sub-region quantity threshold may be a preset value, which is used to set the maximum value of the number of first sub-regions that can be calculated within a given first time period. If the first number is greater than the first sub-region quantity threshold, then the calculation burden may be too heavy due to the excessive number of first sub-regions, resulting in output delay.
[0114] The first event mean may be an average value of the number of events in all first sub-regions when the first number (ie, the number of target sub-regions exceeding the first event threshold) is less than the first sub-region number threshold.
[0115] The mean threshold may be used to determine whether the mean value of all the second event numbers in the current first time period is sufficient to determine whether the current first sub-region contains a dynamic target or background noise and / or weak dynamics. If it is not sufficient to determine whether the current first sub-region contains a dynamic target or background noise and / or weak dynamics, the interval of the first time period needs to be increased to capture more event changes.
[0116] Specifically, when the first number is less than the first sub-region number threshold, it indicates that the first number of first sub-regions that need to be processed is moderate and will not cause excessive consumption of computing resources.
[0117] Specifically, when the first event mean is greater than the mean threshold, it indicates that the event occurrence frequency of the current first sub-region is relatively high, and it is likely to correspond to the existence of a valid dynamic target rather than being caused only by background noise or weak dynamics.
[0118] Exemplarily, when the first number is less than the first sub-region number threshold, and when the first event mean is greater than the mean threshold, the processing flow is as follows:
[0119]
[0120] Wherein, p represents the first time period; T adaptive represents the target event threshold; represents the number of the first sub-regions, that is, the first number; T1 represents the threshold value of the number of the first sub-regions; represents the mean of the first events; x represents the number of second events in each first sub-region; Hg(x) represents each first sub-region; T2 represents the mean threshold.
[0121] Exemplarily, the system initially sets the first time period p to 100 milliseconds and the first event threshold T adaptive is 20 (indicating that a target sub-region is considered a dynamic target only when at least 20 events occur in 100 milliseconds), and the first sub-region number threshold T1 is pre-set to 30. During the first run, the system detected that the number of second events in 25 target sub-regions exceeded 20, which was less than the first sub-region number threshold of 30, indicating that the system processing burden was moderate. Next, the mean of the first events in the first sub-region is calculated. If the mean of the first event is 60 and T2 is 50, it indicates that the current frequency of events in the first sub-region is high, and it is likely to correspond to the existence of a valid dynamic target, rather than being caused only by background noise or weak dynamics. Therefore, the first event threshold can be directly used as the target event threshold, and the first time period can be used as the target time period.
[0122] Through the above method, the output delay of the system can be effectively reduced, and it can be ensured that dynamic targets can be effectively detected based on the determined target time threshold and target time period, thereby improving the accuracy of dynamic target detection and effectively reducing the output delay of target detection results.
[0123] In some embodiments, when the first event mean is less than the mean threshold, it indicates that the average value of all second event numbers is insufficient to determine whether the current first sub-region contains a dynamic target or background noise and / or weak dynamics. Therefore, it is necessary to increase the interval of the first time period to capture more event changes. For example, after (102.A3.2), when the first event mean is less than the mean threshold, the method may further include:
[0124] (a.1) When the first event mean is less than the mean threshold, a preset first time adjustment scale is added to the first time period to obtain a second time period;
[0125] (a.2) obtaining a third event number of events occurring in each target sub-region within a second time period, and determining a target sub-region having a third event number greater than a first event threshold as a second sub-region;
[0126] (a.3) determining the number of second sub-regions as a second number, and when the second number is less than the first sub-region number threshold, calculating the second event mean of each second sub-region according to the number of third events included in the plurality of second sub-regions;
[0127] (a.4) Repeat the calculation of the second event mean of the second sub-area until the second event mean is greater than the mean threshold, take the first event threshold as the target event threshold, and take the second time period corresponding to the second event mean being greater than the mean threshold as the target time period.
[0128] Among them, the preset first time adjustment scale can be a predetermined increment or multiplier for adjusting the length of the time period, and the preset first time adjustment scale can be used to determine the specific value of increasing the first time period in order to obtain a better event differentiation effect. Specifically, if the first event mean is less than the mean threshold, indicating that the current event frequency is not sufficient to clearly identify the dynamic target, the system will extend the first time period according to the preset time adjustment scale to generate a second time period. The first time adjustment scale can be a fixed number of milliseconds increase, such as an increase of 100 milliseconds each time, or a proportional factor, such as multiplying the original time period by 1.5 times. The first time adjustment scale can be flexibly set, and the specific value or ratio depends on the system designer's consideration of the balance between response speed and detection accuracy and the understanding of specific application scenarios. The embodiments of the present application do not impose specific restrictions on this.
[0129] The second time period may be a new time period obtained by increasing the length of the first time period when the system finds that the mean of the first event is less than the mean threshold after the initial analysis, indicating that the currently set first time period may not be sufficient to distinguish dynamic targets from background noise. By adjusting the second time period, more dynamic changes can be captured by extending the observation time, thereby improving the accuracy of judging dynamic targets.
[0130] The third number of events may be the number of events newly recorded in each target sub-area within the second time period.
[0131] The second sub-region may be a target sub-region where the number of events occurring in the second time period exceeds the first event threshold after being adjusted to the second time period. The second sub-region shows a higher dynamic target activity during a longer observation time.
[0132] The second number may be the total number of second sub-areas selected according to the third event number within the second time period.
[0133] The second event mean may be an average value of the number of third events contained in all second sub-regions calculated based on the second sub-regions. The second event mean may be used to evaluate whether the frequency of events in the second sub-region during the second time period has reached a level sufficient to distinguish dynamic targets from background noise and / or sub-regions with slight changes and / or no changes.
[0134] In some embodiments, the second time period can be continuously adjusted, and the updated second event mean of the second sub-area can be compared with the mean threshold until the second event mean is greater than the mean threshold. This indicates that the frequency of events in the second sub-area has reached a level sufficient to distinguish dynamic targets from background noise and / or subtle changes and / or no change sub-areas. At this time, the first event threshold can be used as the target event threshold, and the second time period corresponding to the second event mean being greater than the mean threshold can be used as the target time period.
[0135] Exemplarily, the initial configuration of the system is as follows:
[0136] The first time period p is 100 milliseconds, the first event threshold T1 is 20, the first sub-region quantity threshold T1 is 30, the mean threshold T2 is 50, and the preset first time adjustment scale is to increase the original time period by 100 milliseconds.
[0137] Exemplarily, within the first 100 milliseconds, the system detects that the number of events in 25 target sub-areas exceeds 20, and the first number is 25, which is less than the first sub-area number threshold of 30, indicating that the detection burden is moderate. If the first event mean is 45, which is less than the mean threshold of 50. At this time, the first event adjustment scale is increased by 100 milliseconds for the first time period, and the second time period is 200 milliseconds. Within 200 milliseconds, the number of events in each target sub-area is counted again as the third event number. If at this time, 30 target sub-areas have a third event number exceeding 20, they become the second sub-areas, and the second number is 30.
[0138] Furthermore, the third event means of 30 second sub-areas are calculated, and if the second event mean is 65, since the second event mean is greater than the mean threshold, it indicates that in the second time period, the event frequency of the second sub-area is sufficient to distinguish dynamic targets from background noise, etc., so the first event threshold is determined as the target event threshold, and the second time period is determined as the target time period.
[0139] By optimizing detection parameters based on real-time data feedback, the system can effectively reduce output delays while ensuring detection accuracy, thereby improving the response speed and accuracy of dynamic target detection.
[0140] In some embodiments, generally, when the first number of the first sub-area is within a normal range, the first number will be less than the first sub-area number threshold. However, when the dynamic target is too large or there is background noise, there will be a large number of target sub-areas, and when the number of target sub-areas is large, it may cause system delay. Therefore, in order to improve the performance of the system and effectively reduce the delay of the system, the dynamic target that is too large or the background noise can be distinguished for further processing. For example, after (102.A3.1), when the first number is greater than the first sub-area number threshold, the method may further include:
[0141] (b.1) when the first number is greater than the first sub-region number threshold, obtaining a second event threshold; wherein the second event threshold is a threshold for filtering out the first sub-region with noise by the number of events;
[0142] (b.2) when there is a first sub-region in which the number of events is greater than the second event threshold, determining the number of first sub-regions in which the number of events is between the first event threshold and the second event threshold as a third number, and determining the number of first sub-regions in which the number of events is greater than the first event threshold within the first time period as a fourth number;
[0143] (b.3) obtaining a first event number ratio based on a ratio of the third number to the fourth number;
[0144] (b.4) when the first event number ratio is greater than a preset ratio threshold, adjusting the first event threshold according to a preset event adjustment scale to obtain a third event threshold;
[0145] (b.5) The third event threshold is used as the target event threshold, and the first time period is used as the target time period.
[0146] The second event threshold can be used to determine whether the first large number is caused by too large a dynamic target or background noise. The second event threshold can be used to filter out situations where the number of events is particularly large and the system cannot process it or there is too much noise.
[0147] The third number may be the number of first sub-regions in which the number of events falls between the first event threshold and the second event threshold within the first time period, and these first sub-regions are considered as sub-regions that may contain more background noise.
[0148] The fourth number may be the number of first sub-areas in which the number of events exceeds the first event threshold within the same time period.
[0149] The first event number ratio may be obtained by calculating the ratio of the third number (the number of noise candidate sub-regions) to the fourth number (the number of potential dynamic target sub-regions).
[0150] The ratio threshold may be a preset limit value used to determine whether the first event number ratio is too high, that is, whether the noise ratio is too large. When the first event number ratio exceeds the ratio threshold, it indicates that the background noise may have a greater impact on the detection result.
[0151] Among them, the event adjustment scale can be used to change the first event threshold to deal with the problem of background noise or overly large targets. When the first event number ratio exceeds the ratio threshold, the system will increase the first event threshold according to the preset event adjustment scale to reduce the impact of noise. The event adjustment scale can be a fixed numerical increment or a proportional adjustment, and this application does not make specific restrictions on this.
[0152] In some embodiments, due to the presence of noise (such as screen jitter) or a large dynamic target, the number of target sub-areas will increase. For background noise, the number of events in each target sub-area will also be low. Therefore, further screening can be performed by setting a second event threshold, and the proportion of the first sub-area with noise is calculated. If the proportion is too large, it indicates that the first event threshold should be adjusted.
[0153] Exemplarily, when the first number is greater than the first sub-region number threshold, and the first event number ratio is greater than the preset ratio threshold, it indicates that the number of first sub-regions with background noise is large, and the second event threshold needs to be adjusted to increase the threshold for determining dynamic targets. When the first event number ratio is less than the preset ratio threshold, it indicates that the situation where the first event number ratio is greater than the preset ratio threshold is not caused by background noise, but because the dynamic target is too large. At this time, it is necessary to restart the process of obtaining the preset target event threshold and target time period, obtain the first time period and the first event threshold, and refer to the above for the subsequent calculation process.
[0154] In some implementations, the first event threshold may be adjusted according to a preset event adjustment scale to obtain a third event threshold, or the second event threshold may be adjusted according to a preset event adjustment scale to obtain a third event threshold. The selection is made based on actual conditions.
[0155] Exemplarily, when the first number is greater than the first sub-region number threshold, the adjustment process is as follows:
[0156]
[0157] Wherein, p represents the first time period; T adaptive represents the target event threshold; a number of first sub-regions indicating a number of events greater than a second event threshold; represents the number of the first sub-region, that is, the first number; x M-2 represents the second event threshold; Indicates the third quantity; represents the fourth quantity; R represents the ratio of the first event number; R thesh represents the ratio threshold; x3 represents the third event threshold.
[0158] Exemplarily, the first sub-region quantity threshold is set to 100, the first event threshold is set to 50, the ratio threshold is set to 0.6, and the event adjustment scale is set to increase the original second event threshold by 20%.
[0159] Specifically, when the first number is 120, it is greater than the first sub-area number threshold, and the second event threshold is obtained at this time. If the second event threshold is 75, after calculation, there are 20 sub-areas with event numbers between 50 and 75 (third number), and at the same time, there are 30 sub-areas with event numbers exceeding 50 (fourth number).
[0160] Furthermore, it can be calculated that the first event number ratio is 20 (third number) divided by 30 (fourth number), which is 0.67. Therefore, the first event number ratio of 0.67 is greater than the preset ratio threshold of 0.6, indicating that the background noise ratio may be high. Therefore, the system adjusts the second event threshold according to the event adjustment scale (20%), and the third event threshold becomes 75, which is increased by 20%, that is, 90.
[0161] Further, the updated 90 may be used as a new target event threshold, and the first time period may be used as the target time period.
[0162] By dynamically adjusting the threshold, the system can more accurately determine the reason why the first number is greater than the first sub-area number threshold, so as to dynamically adjust the processing strategy, enhance the adaptability and robustness of the system, and effectively balance the accuracy and efficiency of target detection, especially suitable for scenes with large dynamic changes and complex background noise.
[0163] In some embodiments, when there is no first sub-region with a number of events greater than the second event threshold, it indicates that the first number greater than the first sub-region number threshold is not caused by a large dynamic target, but by noise. In this case, the first time period can be re-added with a preset second time adjustment scale to obtain a third time period to effectively filter the first sub-region with noise. For example, after (b.1), when there is no first sub-region with a number of events greater than the second event threshold, the method may further include:
[0164] (c.1) when there is no first sub-region in which the number of events is greater than the second event threshold, adding a preset second time adjustment scale to the first time period to obtain a third time period;
[0165] (c.2) obtaining a fourth event number of events occurring in each target sub-region within a third time period, and determining a target sub-region having a fourth event number greater than the first event threshold as a third sub-region;
[0166] (c.3) determining the number of the third sub-regions as a fifth number, and when the fifth number is less than the first sub-region number threshold, calculating the third event mean of each third sub-region according to the plurality of fourth event numbers of the plurality of third sub-regions;
[0167] (c.4) Repeat the calculation of the third event mean of each third sub-region until the third event mean is greater than the mean threshold, take the first event threshold as the target event threshold, and take the third time period as the target time period.
[0168] The second time adjustment scale may be a preset time length adjustment rule, and the second time adjustment scale may be the same as or different from the first time adjustment scale, and may be flexibly adjusted according to needs.
[0169] Among them, the third time period can be used to further determine whether the first sub-region is noise. It can be understood that when there is a sub-region corresponding to noise, even if the second time adjustment scale is increased, the number of events contained therein generally does not change; and when the first sub-region is a dynamic target sub-region, the number of events corresponding to the first sub-region will also increase when the second time adjustment scale is increased.
[0170] The fourth number of events may be the number of events occurring in each target sub-area re-counted by the system within the third time period.
[0171] The third sub-region may be a target sub-region where the number of fourth events exceeds the first event threshold within the third time period.
[0172] The fifth number may be the sum of the numbers determined as the third sub-areas within the third time period.
[0173] The third event mean may be the ratio of the product of all the third sub-regions and the corresponding number of fourth events to the fifth number after the third sub-region is determined.
[0174] In some embodiments, after adjusting the first time period to the third time period, it is necessary to obtain the fourth event number of events occurring in each of the target sub-areas within the third time period, and determine the target sub-area containing a number of events greater than the first event threshold as the third sub-area, and determine the number of the third sub-area as the fifth number. At this time, the fifth number may be less than the first sub-area number threshold or the fifth number may be greater than the first sub-area number threshold. The processing is then performed according to different situations in the same manner as above. Please refer to the above for details and will not be repeated here.
[0175] By dynamically adjusting the detection time period and threshold, false detections caused by background noise can be effectively distinguished and filtered out, thereby improving the accuracy and noise resistance of dynamic target detection in complex environments, while ensuring efficient use of system resources and reducing unnecessary computing burdens, ultimately achieving the goal of accurately identifying dynamic targets and reducing output delays.
[0176] In some embodiments, in order to effectively screen out background noise or unchanged target sub-regions, each target sub-region may be screened by a determined target time threshold to determine the target sub-regions where dynamic targets actually exist, thereby effectively reducing the delay in detecting dynamic targets. For example, "generating a first binary image based on the difference between the number of first events occurring in each target sub-region within the target time period and the target event threshold" in step 102 may include:
[0177] (102.B1) generating an event matrix consisting of the number of first events of the target sub-regions according to the distribution positions of the target sub-regions in the image of the sensor to be tested within the target time period;
[0178] (102.B2) comparing each matrix element contained in the event matrix with the target event threshold to obtain a comparison result;
[0179] (102.B3) Determine a binarization value of each matrix element according to the comparison result, and generate a corresponding first binarization image based on the binarization value.
[0180] The event matrix may be an event matrix composed of the first number of events generated according to the distribution positions of the target sub-regions in the sensor screen to be tested. x ×n y target sub-regions, then the event matrix S σ Can be used express.
[0181] Among them, the comparison result can be the result obtained by comparing each matrix element (i.e., the number of events in each target sub-area) with the preset target event threshold one by one during the process of processing the event matrix. The comparison result can be that the first event number represented by the matrix element is greater than the target event threshold, or the first event number is less than the target event threshold.
[0182] The binary value can be a binary representation assigned to each element in the event matrix after comparison with the target event threshold. If the number of events in a certain area exceeds the preset threshold, the binary value of the location is 1, indicating a significant dynamic target; otherwise, it is 0, indicating static or background noise.
[0183] The first binarized image may be an image representation obtained by applying the above binarization process to the event matrix. In this image, the position of each pixel corresponds to an element in the event matrix, and the value of the pixel (0 or 1) reflects whether the target sub-region is determined to contain a dynamic target.
[0184] For example, if the sensor screen to be tested is divided into 9 uniform target sub-areas (i.e., 3x3 sub-blocks), each target sub-area records the number of events that trigger the dynamic vision sensor, such as changes in light intensity caused by moving objects, within the target time period A. If the target event threshold is set to 50, the process of generating the first binary image is as follows:
[0185] If the corresponding event matrix is:
[0186]
[0187] After that, the matrix elements in the event matrix that are greater than or equal to 50 can be calibrated to 1, and the matrix elements that are less than 50 can be calibrated to 0. The binary matrix generated by comparing the binary values is as follows:
[0188]
[0189] Furthermore, a corresponding first binarized image may be generated based on the binarized value, wherein black pixels (0) represent static or low-dynamic areas, and white pixels (1) represent target sub-areas with significant dynamics.
[0190] Furthermore, since the time matrix is generated based on the distribution position of the target sub-regions in the sensor screen to be tested, there is no need to generate the first binary image. Instead, the first connected region and the position coordinates corresponding to the first connected region are directly determined based on the binarization corresponding to the matrix elements.
[0191] By generating the first binary image, the area where the dynamic target actually exists can be quickly screened out, avoiding the subsequent decoding and in-depth analysis of the entire picture, and effectively reducing the delay of dynamic target detection.
[0192] Step 103: determining at least one first connected region based on the first binary image, and decoding the corresponding position of the first connected region in the image of the sensor to be tested to obtain a corresponding event accumulation image.
[0193] In some embodiments, at least one first connected area, that is, the position of a target sub-area where a dynamic target exists (the target sub-area calibrated as 1 in the first binary image) can be determined by a connectivity algorithm through the first binary image, and the corresponding position in the sensor screen to be tested can be decoded without decoding the global sensor screen to be tested, thereby greatly reducing the output delay.
[0194] The first connected region may be a set of adjacent pixels having the same attribute value (all of which are marked as 1 in the first binary image, representing a target subregion where a dynamic target exists). The first connected region is used to characterize a continuous and consistent portion of the first binary image, and can be used to exclude target subregions corresponding to scattered noise or insignificant changes.
[0195] The event accumulation image may be an image obtained by decoding and downsampling the first connected region at the same position in the image of the sensor to be tested after determining the first connected region of the first binary image. The event accumulation image may be generated by counting the number of events accumulated in the target sub-region segmented in the image of the sensor to be tested within the target time period, and is used to highlight the distribution and intensity of dynamic events.
[0196] Exemplarily, at least one first basic search area can be determined in the first binary image based on four-connectivity, eight-connectivity, etc., and the specific determination process is not repeated here. For each first basic search area, such as selecting the first basic search area 1, its size can be determined, and then on this basis, a certain number of pixels are expanded to the surrounding areas (the expansion scale can be set by yourself) to avoid omissions in edge detection, and obtain the second basic search area. Afterwards, a moving convolution operation is performed on the first basic search area to reduce noise and extract useful information. Furthermore, the coordinate positions of each angle of the minimum rectangle (circumscribed rectangle) containing the second basic search area can be determined according to the result of the convolution, thereby determining at least one first connected area.
[0197] By determining the first connected area, the first connected area where the dynamic target exists can be determined, and the corresponding position of the first connected area in the sensor screen to be tested is determined, and the corresponding position is decoded to obtain the event accumulation image corresponding to the sensor screen to be tested.
[0198] For example, through the first binarized image, k first basic search areas with a value of 1 can be determined, and then, according to the preset expansion scale [2ceil(w i / 2)+(mod(w i / 2))]×[2ceil(h i / 2)+(mod(h i / 2))] (ceil means rounding up) to expand the first basic search area to obtain the second basic search area
[0199] Furthermore, we can use a size of 2{max[ceil(w i / 2),ceil(h i / 2)]}The identity matrix and the second basic search area Perform mobile convolution and get the convolution result: In this way, events within each second basic area can be highlighted, thereby extracting key features of the target.
[0200] Furthermore, in C i The coordinates of the four corners of the outer rectangle of each first connected region are determined as
[0201]
[0202] Furthermore, since the first connected region is generated in the event matrix or the first binary image, the first connected region can be directly obtained based on the position coordinate range of the first connected region in the event matrix or the first binary image. Determine the corresponding position of the first connected area in the image of the sensor to be tested, and The image of the sensor to be tested is decoded to obtain the event represented by (x, y, t, p), and the downsampling rate is {max[ceil(w i / 2),ceil(h i / 2)]} event accumulation image.
[0203] Please refer to Figure 4 , exemplary, Figure 4 The left side is the target basic search area of the sensor screen to be tested, and the right side is the event accumulation image after downsampling decoding (the numbers in the sub-grids represent the number of events). Since the basic search area on the left side is (w,h) = (8,8), the downsampling multiple is 4. The number of events in the sub-area is obtained by 4 intervals in each row and column, and the event accumulation image after downsampling decoding can be obtained.
[0204] Through the decoding and reconstruction process, the cumulative image of the corresponding event in the first connected area is determined, which is conducive to the subsequent further dynamic target recognition. By determining the first connected area and decoding the first connected area and the corresponding position in the sensor screen to be tested to obtain the corresponding event cumulative image, it is not necessary to decode the entire sensor screen to be tested, thereby greatly improving the efficiency of dynamic target detection.
[0205] In some implementations, in order to accurately determine the area where the dynamic target exists, the first binary image may be subjected to a connected area detection so as to quickly determine the position of the dynamic target in the image of the sensor to be tested. For example, the "determining at least one first connected area based on the first binary image" in step 103 may include:
[0206] (103.1) detecting connected regions on the first binary image to obtain at least one first basic search region;
[0207] (103.2) Expanding the edge of the first basic search area according to a preset expansion scale to obtain a second basic search area;
[0208] (103.3) Obtain a preset unit matrix, and perform a moving convolution on the second basic search area based on the unit matrix to obtain a convolution result;
[0209] (103.4) Determine at least one first connected region based on the convolution result.
[0210] The first basic search area may be a continuous area with the same binary value determined by connectivity detection, and any two pixels in each first basic search area may be connected through a series of paths in the area.
[0211] The second basic search area can be obtained by expanding the first basic search area in order to more comprehensively cover the area that may be affected by the dynamic target and reduce omissions caused by edge effects. The second basic search area can be obtained by increasing the pixel width of the preset expansion scale around the first basic search area.
[0212] The unit matrix may be a matrix used for convolution operation, and the unit matrix is an all-1 matrix, which is used to highlight or emphasize a specific area in a moving convolution operation, and helps locate the precise position of the second basic search area in the image of the sensor to be tested.
[0213] The convolution result may be an output obtained by performing a moving convolution operation on the unit matrix and the second basic search area, and the convolution result may be used to determine the position of the second basic search area in the image of the sensor to be tested.
[0214] Exemplarily, at least one first basic search area can be determined in the first binary image based on four-connectivity, eight-connectivity, etc., and the specific determination process is not repeated here. For each first basic search area, such as selecting the first basic search area 1, its size can be determined, and then on this basis, a certain number of pixels are expanded to the surrounding areas (the expansion scale can be set by yourself) to avoid omissions in edge detection, and obtain the second basic search area. Afterwards, a moving convolution operation is performed on the first basic search area to reduce noise and extract useful information. Furthermore, the coordinate positions of each angle of the minimum rectangle (circumscribed rectangle) containing the second basic search area can be determined according to the result of the convolution, thereby determining at least one first connected area.
[0215] By determining the first connected area, the first connected area where the dynamic target exists can be determined, and the corresponding position of the first connected area in the sensor screen to be tested is determined, and the corresponding position is decoded to obtain the event accumulation image corresponding to the sensor screen to be tested.
[0216] For example, through the first binarized image, k first basic search areas with a value of 1 can be determined, and then, according to the preset expansion scale [2ceil(w i / 2)+(mod(w i / 2))]×[2ceil(h i / 2)+(mod(h i / 2))] (ceil means rounding up) to expand the first basic search area to obtain the second basic search area
[0217] Furthermore, we can use a size of 2{max[ceil(w i / 2),ceil(h i / 2)]}The identity matrix and the second basic search area Perform mobile convolution and get the convolution result: In this way, events within each second basic area can be highlighted, thereby extracting key features of the target.
[0218] Furthermore, in C i The coordinates of the four corners of the outer rectangle of each first connected region are determined as
[0219]
[0220] Furthermore, since the first connected region is generated in the event matrix or the first binary image, the first connected region can be directly obtained based on the position coordinate range of the first connected region in the event matrix or the first binary image. Determine the corresponding position of the first connected area in the image of the sensor to be tested, and The image of the sensor to be tested is decoded to obtain the event represented by (x, y, t, p), and the downsampling rate is {max[ceil(w i / 2),ceil(h i / 2)]} event accumulation image.
[0221] Determining the cumulative image of the corresponding event in the first connected region through the decoding and reconstruction process is beneficial to improving the efficiency of dynamic target recognition.
[0222] Step 104 , binarizing the event accumulation image according to a preset binarization threshold value to obtain at least one second connected region determined from the event accumulation image.
[0223] In some embodiments, in order to accurately determine the position of the dynamic target, the decoded event accumulation image can be binarized according to a preset binarization threshold to reduce noise and extract features from the event accumulation image, so as to facilitate the subsequent rapid acquisition of dynamic target detection results based on the second connected area.
[0224] The second connected region may be a precisely determined region containing a dynamic target, and may be obtained by performing a connected algorithm detection on the second binary image corresponding to the event accumulation image.
[0225] Exemplarily, a unit convolution kernel can be obtained, and the kernel elements of the unit convolution kernel are all 1. Then, according to the unit convolution kernel, a sliding convolution is performed on the event accumulation image with a unit step size, such as a step size of 1, to obtain a first convolution value calculated between each target sub-region in the event accumulation image and the unit convolution kernel; based on the deviation between the first convolution value and a preset binarization threshold, the binarization value of the target sub-region can be determined, for example, when the first convolution value is greater than the binarization threshold, the corresponding element of the target sub-region is 1, and when the first convolution value is less than the binarization threshold, the corresponding element of the target sub-region is 0; then, based on multiple binarization values, a second binarization image of the event accumulation image is generated; further, at least one second connected region can be determined from the second binarization image based on a connected domain algorithm (such as a four-connected algorithm or an eight-connected algorithm, etc.). Specifically, the binarization threshold is a fixed threshold, and the specific value can be flexibly set, for example, it can be set to 8, 10, 12, etc.
[0226] Through the above method, the area where the dynamic target is located can be effectively identified and accurately located from the event accumulation image, thereby achieving effective detection and positioning of the dynamic target.
[0227] In some implementations, in order to further perform noise reduction processing on the event accumulation image and accurately locate the dynamic target through the event accumulation image, at least one connected area can be determined by a set binary threshold, and at least one second connected area can be determined from the sensor image to be tested based on the connected area to improve the accuracy of dynamic target detection. For example, step 104 may include:
[0228] (104.1) Obtain a unit convolution kernel, and perform sliding convolution on the event accumulation image with a unit step size according to the unit convolution kernel to obtain a first convolution value calculated between each target sub-region in the event accumulation image and the unit convolution kernel;
[0229] (104.2) determining a binarization value of the target sub-region based on a deviation between the first convolution value and a preset binarization threshold;
[0230] (104.3) generating a second binarized image of the event accumulation image based on the plurality of binarized values;
[0231] (104.4) Determine at least one second connected region from the second binarized image.
[0232] The unit convolution kernel can be used to calculate the sum of local pixels. Specifically, the unit convolution kernel can be used to perform sliding convolution on the event accumulation image to evaluate the dynamic degree of each target sub-region.
[0233] The first convolution value may be the result of calculating each target sub-region in the event accumulation image and the kernel element in the unit convolution kernel during the sliding convolution process. Specifically, it is the value obtained by multiplying the corresponding elements of all pixel values in the corresponding target sub-region with the unit convolution kernel and summing them.
[0234] The binarization threshold can be a preset fixed value used to distinguish (dynamic targets) from background noise in the image. If the first convolution value exceeds the binarization threshold, the corresponding position is considered to be the sub-region where the dynamic target is located; otherwise, it is considered to be the sub-region where the noise background or other non-dynamic targets are located.
[0235] The binary value can be a value (usually 0 or 1) assigned to each target sub-region based on the comparison between the first convolution value and the binary threshold. Specifically, if the first convolution value is greater than the binary threshold, it indicates that the target sub-region is a dynamic target, and the corresponding binary value is 1; otherwise, it is 0.
[0236] The second binary image may be a binary image generated by applying multiple binary values to the event accumulation image. The second binary image may be used to further highlight the dynamic target after the refinement processing, and the second binary image has a clearer target boundary and less noise interference.
[0237] The second connected region may be an interconnected region composed of pixels with a value of 1, identified by connectivity analysis in the second binary image. The second connected region accurately identifies the location of the dynamic target, providing a reliable basis for subsequent dynamic target recognition and analysis.
[0238] Exemplarily, a unit convolution kernel can be obtained, the kernel elements of which are all 1, and then the event accumulation image is subjected to sliding convolution with a unit step size according to the unit convolution kernel to obtain the first convolution value calculated by the unit convolution kernel and the pixel in each target sub-region in the event accumulation image. Specifically, the size of the unit convolution kernel can be 3, 7, or 9, etc., which can be adjusted according to actual conditions.
[0239] Furthermore, the binarization value of the target sub-region can be determined based on the deviation between the first convolution value and the preset binarization threshold value. For example, when the binarization threshold value is 10, if the first convolution value is 6, then the binarization value is 0; if the first convolution value is 20, then the binarization value is 1. It can be understood that when the binarization value is 1, it indicates that the corresponding region has significant features in the image and can be determined as a dynamic target.
[0240] Exemplarily, a second binary image of the event accumulation image can be generated based on multiple binary values, and at least one second connected area can be determined from the second binary image by a connectivity algorithm (such as a four-connectivity algorithm or an eight-connectivity algorithm, etc.). Specifically, the binarization threshold can be a fixed threshold, and specifically a value less than 15 or other values can be selected, for example, the binarization threshold can be 10, 12, etc.
[0241] It can be understood that when the second connected area is determined in the second binary image, the position of the second connected area in the second binary image can be determined, so as to facilitate the subsequent mapping of the second two connected areas to the corresponding position in the image of the sensor to be tested. For example, after multiple second connected areas are determined by the connectivity algorithm, the multiple second connected areas can be further processed, and specifically, the precise positioning frame of each second connected area can be determined. Specifically, for each second connected area, the outline of the second connected area can be determined, and then the coordinates of the four corners of the circumscribed rectangle of the second connected area (contained by the circumscribed rectangle) are determined to obtain the positions of the minimum horizontal coordinate, the maximum horizontal coordinate, the minimum vertical coordinate, and the maximum vertical coordinate of the second connected area, that is, This is used to describe the position of the second connected region.
[0242] By setting the binarization threshold and using the connected domain algorithm, the positioning frame of the second connected area, that is, the positioning frame of the dynamic target in the sensor image to be tested, can be accurately extracted from the denoised image, thereby achieving accurate positioning of the dynamic target.
[0243] Step 105 , mapping the second connected area to a corresponding position in the image of the sensor to be tested, and obtaining a dynamic target detection result of the image of the sensor to be tested.
[0244] In some embodiments, in order to accurately locate the dynamic target, the position of the second connected area in the second binary image can be mapped to the sensor screen to be tested in combination with the upsampling ratio to quickly and accurately obtain the dynamic target detection result corresponding to the sensor screen to be tested.
[0245] The dynamic target detection result may be the position and range of the dynamic target determined from the image of the sensor to be detected.
[0246] Exemplarily, since the event accumulation image is obtained based on the decoding of the sensor screen to be tested, the second connected area corresponding to the second binary image generated according to the event accumulation image It can be mapped to the corresponding position in the image of the sensor to be tested to obtain the dynamic target detection result of the image of the sensor to be tested.
[0247] Specifically, we can combine the upsampling rate multiplier {max[ceil(w i / 2),ceil(h i / 2)]}, the positioning box of the second connected region determined from the second binary image (ceil means rounding up) is mapped to the image of the sensor to be tested, and the accurate detection frame of the i-th second connected area at the same position in the image of the sensor to be tested is obtained And the corresponding area is used as the dynamic target detection result.
[0248] The embodiment of the present application obtains the encoded sensor screen to be tested, and divides the sensor screen to be tested into multiple target sub-areas; obtains the preset target event threshold and target time period, and generates a first binary image according to the difference between the number of first events occurring in each target sub-area in the target time period and the target event threshold; determines at least one first connected area based on the first binary image, and decodes the corresponding position of the first connected area in the sensor screen to be tested to obtain a corresponding event accumulation image; binarizes the event accumulation image according to the preset binary threshold to obtain at least one second connected area determined from the event accumulation image; maps the second connected area to the corresponding position in the sensor screen to be tested, and obtains the dynamic target detection result of the sensor screen to be tested. In this way, the target sub-area that may undergo dynamic changes can be screened by the target event threshold in the target time period, and only the first connected area formed by the multiple target sub-areas is decoded at the corresponding position of the sensor screen to be tested, instead of decoding the entire sensor screen to be tested, and further accurately calculates the second connected area that undergoes dynamic changes, effectively reducing the output delay of the target detection result.
[0249] Please refer to Figure 5 In some embodiments, the present application is combined with Figure 5 The overall embodiment is introduced. For example, the sensor screen to be tested can be divided into n x ×n y target sub-areas, using the sensor screen to be tested, count the number of events N in the [i,j]th target sub-area during the target time period ijσ , and finally obtain the event matrix For example, for DVSIMX636 (resolution 720×1280), n x =12,n y =16, corresponding to the target sub-region resolution of 60×80.
[0250] Furthermore, the number of events corresponding to different event types can be obtained by using the value of the most significant bit (MSB) using formula (1): (It should be noted that at this time, only the number of events is counted without decoding the specific location coordinates of where the events occurred).
[0251] In some implementations, in order to determine the minimum cumulative time interval that is ultimately sufficient for dynamic target detection, that is, the target time period, and the adaptive threshold for binarizing the event matrix, that is, the target time threshold, the following implementations may be used to determine:
[0252] For example, the initial first time period p can be set to 100 us, and the number of events N in the [i, j]th target sub-area within the first time period p can be obtained by formula (2): ijσ , and then obtain the initial event matrix determined according to the distribution position of the target sub-area in the sensor screen to be tested
[0253] Furthermore, based on the initial event matrix S σ , according to the number of events, M non-completely uniform intervals are divided into [0, x1, x2, .., xM-2, xM-1, ∞], for example, the non-completely uniform interval can be [0 50 100150 200 250 300350 500 1000∞] and so on. The non-completely uniform interval is denoted as Hr, and the specific interval value can be determined according to the actual situation; further, the initial event matrix S can be statistically analyzed. σ The matrix elements are distributed in H r The number of events in the interval is used to obtain the non-uniform histogram Hg(x). In the non-uniform histogram Hg(x), the horizontal axis represents the number of events, and the vertical axis represents the number of target sub-regions corresponding to the number of events. For example, in the non-uniform histogram, when the horizontal axis is 50, that is, when the number of events is 50, according to the number of events in each target sub-region, it can be determined that there are 6 target sub-regions with 50 events. Therefore, 6 can be used as the vertical axis of the corresponding non-uniform histogram. According to the number of events in each target sub-region, the initial event matrix S can be obtained σ The matrix elements are distributed in H r Non-uniform histogram Hg(x) in the interval.
[0254] Furthermore, the non-uniform histogram Hg(x) can be used to determine the target time period p sufficient for dynamic target detection using the following method: σ , and for binarization S pσ The target event threshold T adaptive , in order to efficiently realize the target detection of the sensor image to be tested:
[0255]
[0256]
[0257] Furthermore, the final target event threshold T can be used adaptive For the event matrix S pσ Perform binarization to obtain a binarization matrix B or a first binarized image;
[0258] For example, the connected region method can be used to obtain k connected regions with a value of 1 in the binary matrix B. (w k ×h k represents the size of the k-th connected region), as the first basic search area;
[0259] Furthermore, for the i-th (i=1, 2, ..., k) first basic search area, the area around it can be expanded to a size of [2ceil(w i / 2)+(mod(w i / 2))]×[2ceil(h i / 2)+(mod(h i / 2))] (ceil means rounding up), get the second basic search area
[0260]
[0261] Furthermore, we can use a size of 2{max[ceil(w i / 2),ceil(h i / 2)]}The identity matrix and the second basic search area Perform mobile convolution and get the convolution result:
[0262] Furthermore, we can use max(C i ) in C i The position of the first connected area in the image of the sensor to be tested is obtained by
[0263] For example, for DVSIMX636, when 2{max[ceil(w i / 2),ceil(hi / 2)]}>8, J8 (J8 means that 8 sub-blocks are occupied in both the row direction and the column direction, and so on) can be uniformly adopted to perform neighborhood search on the target basic area.
[0264] Furthermore, the i-th (i=1, 2, ..., k) first connected region can be The image of the sensor to be tested is decoded to obtain the event represented by (x, y, t, p), and the downsampling rate is {max[ceil(w i / 2),ceil(h i / 2)]} event accumulation image Ii. Exemplarily, for DVS IMX636, C i The maximum resolution can reach 640X480. Direct decoding will consume a lot of computing resources. Therefore, this application directly downsamples to a fixed resolution of 120×160 during the decoding process to simplify the complexity of the calculation. Figure 4 The process of obtaining the event accumulation image Ii by downsampling decoding is shown: the left side is the basic search area of the target of the sensor screen to be tested, and the right side is the image Ii after downsampling decoding (the numbers in the sub-grids represent the number of events). Since the basic search area on the left side is (w,h)=(8,8), the downsampling multiple is 4. The number of events in the sub-area is obtained by 4 intervals in each row and column, and the event accumulation image Ii after downsampling decoding can be obtained.
[0265] Furthermore, a second binarized image IBi of the event accumulation image Ii can be obtained by binarization thresholding;
[0266] Furthermore, by using the connected domain method, the positioning frame of the second connected region with a value of 1 in the second binary image IBi can be obtained. Combined with the upsampling rate multiplier {max[ceil(w i / 2),ceil(h i / 2)]}The second connected region Map it to the image of the sensor to be tested, and obtain the accurate detection frame of the i-th target of interest in the image of the sensor to be tested And the accurate positioning box is used as the dynamic target detection result.
[0267] The embodiment of the present application obtains the encoded sensor screen to be tested, and divides the sensor screen to be tested into multiple target sub-areas; obtains the preset target event threshold and target time period, and generates a first binary image according to the difference between the number of first events occurring in each target sub-area in the target time period and the target event threshold; determines at least one first connected area based on the first binary image, and decodes the corresponding position of the first connected area in the sensor screen to be tested to obtain a corresponding event accumulation image; binarizes the event accumulation image according to the preset binary threshold to obtain at least one second connected area determined from the event accumulation image; maps the second connected area to the corresponding position in the sensor screen to be tested, and obtains the dynamic target detection result of the sensor screen to be tested. In this way, the target sub-area that may undergo dynamic changes can be screened by the target event threshold in the target time period, and only the first connected area formed by the multiple target sub-areas is decoded at the corresponding position of the sensor screen to be tested, instead of decoding the entire sensor screen to be tested, and further accurately calculates the second connected area that undergoes dynamic changes, effectively reducing the output delay of the target detection result.
[0268] See also Figure 6 The embodiment of the present application further provides a dynamic target detection device, which can implement the above-mentioned dynamic target detection method. The dynamic target detection device includes:
[0269] A division module 61 is used to obtain the encoded sensor picture to be tested, and divide the sensor picture to be tested into a plurality of target sub-areas;
[0270] A generating module 62 is used to obtain a preset target event threshold and a target time period, and generate a first binary image according to the difference between the number of first events occurring in each target sub-region within the target time period and the target event threshold;
[0271] A decoding module 63, configured to determine at least one first connected region based on the first binary image, and decode a corresponding position of the first connected region in the image of the sensor to be tested to obtain a corresponding event accumulation image;
[0272] A processing module 64 is used to perform binarization processing on the event accumulation image according to a preset binarization threshold value to obtain at least one second connected area determined from the event accumulation image;
[0273] The acquisition module 65 is used to map the second connected area to a corresponding position in the image of the sensor to be tested, and obtain a dynamic target detection result of the image of the sensor to be tested.
[0274] The specific implementation of the dynamic target detection device is basically the same as the specific implementation of the dynamic target detection method described above, and will not be repeated here. On the premise of meeting the requirements of the embodiments of the present application, the dynamic target detection device can also be provided with other functional modules to implement the dynamic target detection method in the above embodiments.
[0275] The embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the above dynamic target detection method when executing the computer program. The computer device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0276] See also Figure 7 , Figure 7 The hardware structure of a computer device according to another embodiment is shown, and the computer device includes:
[0277] The processor 71 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0278] The memory 72 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 72 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 72, and the processor 71 is called to execute the dynamic target detection method of the embodiment of the present application;
[0279] Input / output interface 73, used to implement information input and output;
[0280] Communication interface 74, used to realize communication interaction between the device and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0281] A bus 75 that transmits information between the various components of the device (e.g., the processor 71, the memory 72, the input / output interface 73, and the communication interface 74);
[0282] The processor 71 , the memory 72 , the input / output interface 73 and the communication interface 74 are connected to each other in communication within the device via a bus 75 .
[0283] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned dynamic target detection method is implemented.
[0284] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0285] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0286] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0287] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0288] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0289] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0290] It should be understood that in the present application, "at least one (item)" and "several" refer to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0291] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0292] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0293] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0294] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0295] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A dynamic target detection method, characterized in that: The method comprises: Acquire the encoded sensor image to be tested, and divide the sensor image to be tested into a plurality of target sub-areas; Obtaining a preset target event threshold and a target time period, and generating a first binary image according to the difference between the number of first events occurring in each of the target sub-areas within the target time period and the target event threshold; Determine at least one first connected area based on the first binary image, and decode the corresponding position of the first connected area in the image of the sensor to be tested to obtain a corresponding event accumulation image; Binarizing the event accumulation image according to a preset binarization threshold to obtain at least one second connected region determined from the event accumulation image; The second connected area is mapped to a corresponding position in the image of the sensor to be tested to obtain a dynamic target detection result of the image of the sensor to be tested.
2. The dynamic target detection method according to claim 1, characterized in that: The step of obtaining a preset target event threshold and a target time period includes: Obtaining an initial first time period and a first event threshold; In a first time period, obtaining a second event number of events occurring in each of the target sub-regions, and determining a target sub-region including a second event number greater than the first event threshold as a first sub-region; The number of the first sub-areas is determined as a first number, and based on the first number and a second event number of events included in each of the first sub-areas, the first event threshold and the first time period are adjusted to obtain a target event threshold and a target time period.
3. The dynamic target detection method according to claim 2, characterized in that: The adjusting the first event threshold and the first time period based on the first number and the second event number of the events included in each of the first sub-areas to obtain a target event threshold and a target time period includes: Get the first sub-region quantity threshold; When the first number is less than the first sub-region number threshold, calculating the first event mean of each first sub-region according to the number of second events included in the first sub-regions; When the first event mean is greater than a mean threshold, the first event threshold is used as a target event threshold, and the first time period is used as a target time period, wherein the mean threshold is greater than or equal to the first event threshold.
4. The dynamic target detection method according to claim 3, characterized in that: The method further comprises: When the first event mean is less than the mean threshold, adding a preset first time adjustment scale to the first time period to obtain a second time period; In the second time period, obtaining a third event number of events occurring in each of the target sub-regions, and determining a target sub-region including a third event number greater than the first event threshold as a second sub-region; Determine the number of the second sub-regions as a second number, and when the second number is less than the first sub-region number threshold, calculate the second event mean of each second sub-region according to the number of third events included in the second sub-regions; Repeat the calculation of the second event mean of the second sub-area until the second event mean is greater than the mean threshold, take the first event threshold as the target event threshold, and take the second time period corresponding to the second event mean being greater than the mean threshold as the target time period.
5. The dynamic target detection method according to claim 3, characterized in that: The method further comprises: When the first number is greater than the first sub-region number threshold, a second event threshold is obtained; wherein the second event threshold is a threshold for filtering out the first sub-region with noise by the number of events; when there is a first sub-region with a number of events greater than the second event threshold, determining the number of first sub-regions with a number of events between the first event threshold and the second event threshold as a third number, and determining the number of first sub-regions with a number of events greater than the first event threshold within the first time period as a fourth number; Based on the ratio of the third number to the fourth number, obtaining a first event number ratio; When the first event number ratio is greater than a preset ratio threshold, adjusting the first event threshold according to a preset event adjustment scale to obtain a third event threshold; The third event threshold is used as a target event threshold, and the first time period is used as a target time period.
6. The dynamic target detection method according to claim 5, characterized in that: The method further comprises: When there is no first sub-region in which the number of events is greater than the second event threshold, adding a preset second time adjustment scale to the first time period to obtain a third time period; In the third time period, obtaining a fourth event number of events occurring in each of the target sub-regions, and determining a target sub-region including a fourth event number greater than the first event threshold as a third sub-region; Determine the number of the third sub-regions as a fifth number, and when the fifth number is less than the first sub-region number threshold, calculate the third event mean of each of the third sub-regions according to the plurality of fourth event numbers of the plurality of third sub-regions; Repeat the calculation of the third event mean of each of the third sub-areas until the third event mean is greater than the mean threshold, use the first event threshold as the target event threshold, and use the third time period as the target time period.
7. The dynamic target detection method according to claim 1, characterized in that: The step of generating a first binary image according to the difference between the number of first events occurring in each target sub-region within the target time period and the target event threshold comprises: In the target time period, according to the distribution positions of the target sub-regions in the image of the sensor to be tested, an event matrix consisting of the first number of events of the target sub-regions is generated; Compare each matrix element included in the event matrix with the target event threshold to obtain a comparison result; The binarization value of each of the matrix elements is determined according to the comparison result, and a corresponding first binarization image is generated based on the binarization value.
8. The dynamic target detection method according to claim 1, characterized in that: The determining at least one first connected region based on the first binary image comprises: Performing connected region detection on the first binary image to obtain at least one first basic search region; Expanding the edge of the connected area according to a preset expansion scale to obtain a second basic search area; Obtaining a preset unit matrix, and performing a moving convolution on the second basic search area based on the unit matrix to obtain a convolution result; At least one first connected region is determined according to the convolution result.
9. The dynamic target detection method according to claim 1, characterized in that: The binarization process is performed on the event accumulation image according to a preset binarization threshold to obtain at least one second connected area determined from the event accumulation image, including: Obtain a unit convolution kernel, and perform sliding convolution on the event accumulation image with a unit step size according to the unit convolution kernel to obtain a first convolution value calculated between each target sub-region in the event accumulation image and the unit convolution kernel; Determining a binarization value of the target sub-region based on a deviation between the first convolution value and a preset binarization threshold; Based on the plurality of binarized values, generating a second binarized image of the event accumulation image; At least one second connected region is determined from the second binarized image.
10. A dynamic target detection device, characterized in that: The device comprises: A division module, used for acquiring the encoded sensor picture to be tested, and dividing the sensor picture to be tested into a plurality of target sub-areas; A generating module, used for acquiring a preset target event threshold and a target time period, and generating a first binary image according to the difference between the number of first events occurring in each of the target sub-areas within the target time period and the target event threshold; A decoding module, used for determining at least one first connected area based on the first binary image, and decoding a corresponding position of the first connected area in the image of the sensor to be tested to obtain a corresponding event accumulation image; A processing module, configured to perform binarization processing on the event accumulation image according to a preset binarization threshold value to obtain at least one second connected region determined from the event accumulation image; The acquisition module is used to map the second connected area to a corresponding position in the image of the sensor to be tested, so as to obtain a dynamic target detection result of the image of the sensor to be tested.
11. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the dynamic target detection method according to any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the dynamic target detection method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
System and method for event camera data processing
CN115052141A
Image processing method and device
CN116114260A
Video recording system, server, system, and storage medium
US20180227538A1
Method, apparatus, and storage medium for identifying identification code
US20200394376A1
