Dynamic target detection method and device, computer device and readable storage medium
By dividing the dynamic vision sensor image into target sub-areas, using event thresholds and time periods to generate binary images, and decoding connected areas, the problem of target detection delay under high resolution of dynamic vision sensors is solved, and efficient dynamic target detection is achieved.
Patent Information
- Application Number
- CN202411018166.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-07-26
AI Technical Summary
When dynamic vision sensors perform target detection at high spatial resolution, the increased computational effort leads to longer output delays.
The sensor image to be tested is divided into multiple target sub-areas, a binary image is generated by the target event threshold and time period, and the connected areas are determined and decoded to reduce the computational complexity of global decoding.
It effectively reduces the output delay of target detection results and improves detection efficiency and accuracy.
Smart Images

Figure CN118748757B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, and in particular to a dynamic target detection method and device, a computer device and a readable storage medium. BACKGROUND
[0002] A dynamic vision sensor (DVS), also known as an event camera, can capture visual information by asynchronously recording pixel-level brightness changes, with high temporal resolution, low latency and data compression. It is mainly used in the fields of robot vision, autonomous driving, virtual reality, etc., and provides fast and efficient visual feedback to meet real-time perception needs in dynamic environments.
[0003] In related technologies, dynamic vision sensors generally transmit compressed and encoded timestamps, pixel positions and brightness change directions (polarity) of visual events to minimize the bandwidth of data transmission. However, as the spatial resolution of the sensor increases, the amount of computation for decoding the compressed event data and performing target detection also increases dramatically, thereby increasing the output delay of the target detection result. SUMMARY
[0004] The main purpose of the embodiments of the present application is to provide a dynamic target detection method, device, computer device and readable storage medium, which can reduce the output delay of the target detection result.
[0005] To achieve the above purpose, a first aspect of the embodiments of the present application provides a dynamic target detection method, which comprises:
[0006] An encoded sensor picture to be tested is obtained, and the sensor picture to be tested is divided into a plurality of target sub-regions;
[0007] A preset target event threshold and a target time period are obtained, and a first binary image is generated according to the difference between the first event number of each target sub-region in the target time period and the target event threshold;
[0008] At least one first connected region is determined based on the first binary image, and the corresponding position of the first connected region in the sensor picture to be tested is decoded to obtain a corresponding event accumulation image;
[0009] The event accumulation image is binarized according to a preset binarization threshold to obtain at least one second connected region determined from the event accumulation image;
[0010] The second connected region is mapped to the corresponding position in the sensor picture to be tested to obtain the dynamic target detection result of the sensor picture to be tested.
[0011] Accordingly, a second aspect of the embodiments of the present application provides a dynamic target detection device, the device comprising:
[0012] a division module configured to obtain an encoded sensor image to be tested and divide the sensor image to be tested into a plurality of target sub-regions;
[0013] a generation module configured to obtain a preset target event threshold and a target time period, and generate a first binary image according to a gap between a first event number of each target sub-region in the target time period and the target event threshold;
[0014] a decoding module 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 sensor image to be tested to obtain a corresponding event accumulation image;
[0015] a processing module configured to perform binary processing on the event accumulation image according to a preset binary threshold to obtain at least one second connected region determined from the event accumulation image;
[0016] an acquisition module configured to map the second connected region to a corresponding position in the sensor image to be tested to obtain a dynamic target detection result of the sensor image to be tested.
[0017] In some embodiments, the generation module is further configured to:
[0018] obtain an initial first time period and a first event threshold;
[0019] obtain a second event number of events occurring in each target sub-region in the first time period, and determine a first sub-region containing a second event number greater than the first event threshold;
[0020] determine a first number of the first sub-regions, and adjust the first event threshold and the first time period based on the first number and the second event number of events contained in each first sub-region to obtain a target event threshold and a target time period.
[0021] In some embodiments, the generation module is further configured to:
[0022] obtain a first sub-region number threshold;
[0023] when the first number is less than the first sub-region number threshold, calculate a first event mean of each first sub-region according to a plurality of second event numbers contained in a plurality of first sub-regions;
[0024] when the first event mean is greater than a mean threshold, taking the first event threshold as a target event threshold and taking the first time period 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 configured to:
[0026] when the first event mean is less than the mean threshold, increasing the first time period by a preset first time adjustment scale 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 containing a third event number greater than the first event threshold as a second sub-region;
[0028] determining a number of the second sub-regions as a second number, and when the second number is less than the first sub-region number threshold, calculating a second event mean of each of the second sub-regions according to a plurality of third event numbers contained in a plurality of the second sub-regions;
[0029] repeating the calculation of the second event mean of the second sub-regions until the second event mean is greater than the mean threshold, taking the first event threshold as a target event threshold, and taking the second time period in which the second event mean is greater than the mean threshold as a target time period.
[0030] In some embodiments, the generating module is further configured to:
[0031] 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 a first sub-region with noise by event number;
[0032] when there is a first sub-region with an event number greater than the second event threshold, determining a third number of first sub-regions with an event number between the first event threshold and the second event threshold, and determining a fourth number of first sub-regions with an event number greater than the first event threshold in the first time period;
[0033] obtaining a first event number ratio based on a ratio of the third number and the fourth number;
[0034] when the first event number ratio is greater than a preset ratio threshold, adjusting the first event threshold by a preset event adjustment scale to obtain a third event threshold;
[0035] taking the third event threshold as a target event threshold and taking the first time period as a target time period.
[0036] In some embodiments, the generating module is further configured to:
[0037] when there is no first sub-region with a number of events greater than the second event threshold, increasing 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 number of events occurred in each of the target sub-regions, and determining a target sub-region with a fourth number of events greater than the first event threshold as a third sub-region;
[0039] determining a fifth number of the third sub-regions, and when the fifth number is less than the first sub-region number threshold, calculating a third event mean value of each of the third sub-regions according to the fourth number of events of the plurality of third sub-regions;
[0040] repeating the calculation of the third event mean value of each of the third sub-regions until the third event mean value is greater than the mean value threshold, taking the first event threshold as a target event threshold, and taking the third time period as a target time period.
[0041] In some embodiments, the generating module is further configured to:
[0042] In the target time period, generating an event matrix composed of the first number of events of the target sub-regions according to the distribution position of the target sub-regions in the sensor image to be tested;
[0043] comparing each matrix element contained in the event matrix with the target event threshold to obtain a comparison result;
[0044] determining a binary value of each of the matrix elements according to the comparison result, and generating a corresponding first binary image based on the binary value.
[0045] In some embodiments, the decoding module is further configured to:
[0046] detecting a connected region of the first binary image to obtain at least one first basic search region;
[0047] expanding the edge of the connected region according to a preset expansion scale to obtain a second basic search region;
[0048] obtaining a preset unit matrix, and performing a moving convolution on the second basic search region based on the unit matrix to obtain a convolution result;
[0049] determining at least one first connected region according to the convolution result.
[0050] In some embodiments, the processing module is further configured to:
[0051] obtain a unit convolution kernel, and perform sliding convolution on the event accumulation image according to the unit convolution kernel at a unit step size to obtain a first convolution value calculated by each target sub-region in the event accumulation image and the unit convolution kernel;
[0052] determine a binarization value of the target sub-region based on a deviation of the first convolution value from a preset binarization threshold value;
[0053] generate a second binarization image of the event accumulation image based on a plurality of binarization values;
[0054] determine at least one second connected region from the second binarization image.
[0055] To achieve the above object, a third aspect of embodiments of the present application provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the dynamic target detection method of any one of the first aspect of embodiments of the present application when executing the computer program.
[0056] To achieve the above object, a fourth aspect of embodiments of the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the dynamic target detection method of any one of the first aspect of embodiments of the present application when executed by a processor.
[0057] Embodiments of the present application obtain an encoded to-be-detected sensor picture, and divide the to-be-detected sensor picture into a plurality of target sub-regions; obtain a preset target event threshold value and a target time period, and generate a first binarization image according to a gap between a first event number of each target sub-region occurring in the target time period and the target event threshold value; determine at least one first connected region based on the first binarization image, and decode a corresponding position of the first connected region in the to-be-detected sensor picture to obtain a corresponding event accumulation image; 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; and map the second connected region to a corresponding position in the to-be-detected sensor picture to obtain a dynamic target detection result of the to-be-detected sensor picture. In this way, the events occurring in each target sub-region can be screened by the target event threshold value in the target time period to determine the target sub-regions that are likely to change dynamically, and only the corresponding position of the first connected region formed by the plurality of target sub-regions in the to-be-detected sensor picture is decoded instead of decoding the entire to-be-detected sensor picture, and the second connected region that changes dynamically is further accurately calculated, thereby effectively reducing the output delay of the target detection result. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 is an architecture diagram of a dynamic target detection system provided by an embodiment of the present application;
[0059] Figure 2 is a flowchart of a dynamic target detection method provided by an embodiment of the present application;
[0060] Figure 3 is a compressed event encoding format diagram provided by an embodiment of the present application;
[0061] Figure 4 is an event accumulation image generation process example diagram provided by an embodiment of the present application;
[0062] Figure 5 is a general flowchart of a dynamic target detection method provided by an embodiment of the present application;
[0063] Figure 6 is a functional module diagram of a dynamic target detection device provided by an embodiment of the present application;
[0064] Figure 7 is a hardware structure diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to 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 intended 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 can be executed 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 and claims and the above-described 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 commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0068] Dynamic Vision Sensor (DVS), also known as event camera, can capture visual information by asynchronously recording pixel-level brightness changes, with high temporal resolution, low latency and data compression characteristics, mainly used in robot vision, autonomous driving, virtual reality and other fields, providing fast and efficient visual feedback to meet real-time perception needs in dynamic environments.
[0069] In related technologies, dynamic vision sensors generally transmit compressed and encoded time stamps, pixel positions and brightness change directions (polarity) of visual events to minimize the bandwidth of data transmission. However, as the spatial resolution of the sensor increases, the amount of computation for decoding the compressed event data and performing target detection also increases dramatically, thereby increasing the output delay of the target detection result.
[0070] Based on this, the embodiments of the present application provide a dynamic target detection method, device, computer equipment and readable storage medium, which can effectively reduce the output delay of the target detection result.
[0071] The dynamic target detection method, device, computer equipment and readable storage medium provided by the embodiments of the present application are specifically explained by the following embodiments, and first, the dynamic target detection system in the embodiments of the present application is described.
[0072] Please refer to Figure 1 In some embodiments, the dynamic target detection system of the embodiments of the present application can include a terminal 11 and a server 12.
[0073] In some embodiments, the terminal 11 can be an embedded system or a specific sensor device, which is used to obtain real-time pictures from a dynamic vision sensor, and to perform preliminary processing such as preprocessing, event detection, etc. on the data obtained by the dynamic vision sensor, for example, sub-region division, event quantity statistics, etc. Further, the terminal 11 can encode and optimize the transmission of real-time pictures according to system algorithms, to reduce the amount of subsequent data transmission. Further, the terminal 11 can integrate a small 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] For example, the server 12 can further process, analyze and decide the data transmitted by the terminal 11, for example, it can determine a first connected region of interest on the encoded sensor picture to be detected transmitted by the terminal 11, and decode the first connected region, and perform further refinement processing to obtain a dynamic target detection result.
[0075] Further, the server side 12 can also include a dedicated acceleration card to accelerate specific computing tasks, such as sliding convolution and the like, to improve the real-time performance and response capability of the system.
[0076] The dynamic target detection method in the embodiments of the present application can be described as follows.
[0077] It should be noted that in each specific embodiment of the present application, when it is necessary to process relevant data related to the identity or characteristics of the user according to user information, user behavior data, user historical data, and user location information, etc., 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 embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or by jumping to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiments of the present application to function normally will be obtained.
[0078] In the embodiments of the present application, the dynamic target detection device will be described from the dimension, which can be specifically integrated in a computer device. Referring to Figure 2 , Figure 2 The step flow chart of the dynamic target detection method provided by the embodiments of the present application is described as follows: when the processor of the terminal or server executes the program instructions corresponding to the dynamic target detection method, the specific process is as follows:
[0079] Step 101, an encoded sensor picture to be tested is obtained, and the sensor picture to be tested is divided into a plurality of target sub-regions.
[0080] In some embodiments, in order to reduce the computational complexity, the encoded sensor picture to be tested can be divided into a plurality of target sub-regions, so as to decompose the complex global processing task into a plurality of smaller local processing tasks, reduce the data amount of single processing, and thus effectively reduce the output delay.
[0081] The sensor picture to be tested can be data encoded by a set of luminance change events of a scene captured by a dynamic vision sensor.
[0082] The target sub-region can be a sub-block defined in the sensor picture to be tested, each target sub-region contains a group of pixels, and each target sub-region can be processed independently, so as to improve the processing speed and efficiency.
[0083] Exemplarily, due to the large amount of event data of the dynamic vision sensor, in order to reduce the bandwidth occupied by the event data transmission, the event data can be compressed into smaller data packets by encoding to obtain a to-be-tested sensor picture, so as to reduce the cost of transmission and storage.
[0084] Specifically, the dynamic vision sensor usually adopts an (x, y, t, p) event data format, wherein x and y represent the spatial coordinates on the dynamic vision sensor, t is a timestamp, and p indicates the polarity of the event occurrence. Further, the event data can be first encoded by timestamp difference to record the timestamp difference, and the spatial coordinates are integer encoded, the floating-point coordinates are converted into integers, the polarity is bit encoded, and one bit is used to represent the polarity. Finally, the event is abstractly encoded to record the key information such as the time of event occurrence, the pixel position and the event intensity. The application does not make specific limitation on the encoding manner.
[0085] As shown in Figure 3 , exemplarily, the DVSIMX636 encodes and compresses the (x, y, t, p) event data actually generated by the dynamic vision sensor in the EVT3.0 data format as follows: EVT3.0 is a 16-bit compressed event encoding format. In each EVT3.0 word, 4 most significant bits (MSB) are used to represent different types of events; for example, when the MSB is '0010', it represents an EVT_ADDR_X event type, and EVT_ADDR_X indicates that only one event has occurred in one row (X coordinate) of the dynamic vision sensor; when the MSB is '0100', it represents a VECT_12 event type, and VECT_12 uses 12 bits to represent whether an event has occurred at the X coordinate of 12 consecutive pixel positions, 1 for occurrence and 0 for non-occurrence; when the MSB is '0101', it represents a VECT_8 event type, and VECT_12 uses 8 bits to represent whether an event has occurred at the X coordinate of 8 consecutive pixel positions, 1 for occurrence and 0 for non-occurrence.
[0086] Exemplarily, assuming that the resolution of the to-be-tested sensor picture is [W, H], it can be uniformly divided into n x ×n y target sub-regions. For example, for DVSIMX636 (resolution of 720x1280), n x = 12, n y = 16, and the resolution of each target sub-region is 60x80.
[0087] By dividing the to-be-tested sensor picture into multiple target sub-regions, it is convenient to screen each target sub-region according to the target event threshold in the subsequent process, thereby realizing efficient processing of event data.
[0088] At step 102, a preset target event threshold and a target time period are obtained, and a first binary image is generated according to a gap between a first event number of each target sub-region in the target time period and the target event threshold.
[0089] The target event threshold can be used to screen out target sub-regions with non-noise and dynamic changes from the sensor image to be detected according to the event number. Specifically, the target event threshold can be an event number standard to distinguish effective dynamic time in the target sub-region from background noise and / or weak dynamic.
[0090] The target time period can be the most suitable length of time for effective dynamic target detection and can be used to count the event number in each target sub-region of the sensor image to be detected. Based on the target time period, the total number of target sub-regions in the sensor image to be detected can be calculated without causing delay, and it is determined that the target sub-region has dynamic changes.
[0091] The first event number can be the corresponding event number in each target sub-region. For example, the first event number of target sub-region A is 52.
[0092] The first binary image can be a binary image generated according to the gap between the first event number of each target sub-region in the target time period and the target event threshold. For example, if the target event threshold is 50, the first event number of target sub-region A is 62, and the first event number of target sub-region B is 38, the corresponding position of target sub-region A in the first binary image is 1, and the corresponding position of target sub-region B in the first binary image is 0.
[0093] For example, the target event threshold and the target time period can be dynamically adjusted by iteratively analyzing the dynamic visual sensor data. Specifically, the sensor image to be tested can be divided into a plurality of target sub-regions, and the number of events in each target sub-region within a given time interval can be counted to form a statistical matrix. Then, a non-uniform histogram Hg(x) can be constructed with the number of events as the abscissa and the number of target sub-regions corresponding to the number of events as the ordinate, for example, the abscissa can be 0-50, 50-100, etc., and if the target sub-regions with 0-50 events occur have 5, then the corresponding ordinate 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 condition. The preset condition can include that the number of events in a certain interval in the non-uniform histogram exceeds a certain threshold, so as to determine the target time period. At the same time, the target event threshold for binarization can be set according to the event distribution in the target time period, which is used to distinguish the target sub-region and the background region. The background region can include the target sub-region with dynamic changes caused by noise and the target sub-region without dynamic changes.
[0094] Specifically, for all target sub-regions divided from the sensor image to be tested, the first number of events 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 binarization image, so as to screen the noise sub-region.
[0095] By presetting the target event threshold and the target time period, and generating the first binarization image according to the difference between the number of events of each target sub-region in the target time period and the target event threshold, the target sub-region that may contain the dynamic target can be effectively screened from the sensor image to be tested, so as to reduce the calculation amount of the subsequent processing steps and improve the efficiency of dynamic target detection.
[0096] In some embodiments, in order to efficiently and accurately realize dynamic target detection, the preset target event threshold and target time period can be obtained to make the system more flexible to adapt to different environmental conditions and target dynamic characteristics, and effectively reduce the output delay of the target detection result. For example, the step 102 of "obtaining the preset target event threshold and target time period" can include:
[0097] (102.A1) obtaining an initial first time period and a first event threshold;
[0098] (102.A2) obtaining a second number of events of each target sub-region within the first time period, and determining the target sub-region containing the second number of events greater than the first event threshold as a first sub-region;
[0099] (102.A3) determining the number of the first sub-regions as a first number, and adjusting the first event threshold and the first time period based on the first number and a second event number of events contained in each of the first sub-regions, to obtain a target event threshold and a target time period.
[0100] The first time period can be a time length initially set for counting the number of events in the target sub-regions. In the iteration process, the first time period can be adjusted and optimized according to the data analysis result.
[0101] The first event threshold can be a number of events initially set in the initial stage to distinguish the effective dynamic events (caused by the real dynamic target) from the background noise and / or weak dynamics in the target sub-regions. The first event threshold is used to preliminarily screen out the target sub-regions that can contain the dynamic target.
[0102] The second event number can be the number of events actually recorded in each of the target sub-regions within the first time period. Compared with the first event threshold, if the second event number of events occurring in the target sub-region exceeds the first event threshold, the target sub-region is more likely to contain the dynamic target.
[0103] The first sub-region can be a target sub-region in which the second event number of events occurring within the first time period exceeds the first event threshold, and the first sub-region can contain the dynamic target of interest.
[0104] The first number can be the total number of the first sub-regions screened according to the second event number within the first time period. The first number reflects the number of sub-regions considered to possibly contain the dynamic target under the current settings, and is the basis for evaluating and adjusting the threshold and the time period.
[0105] For example, if it is required to quickly identify and track the moving objects in the monitoring video, the initial configuration of the system is as follows: the first time period is set to 100 milliseconds, and the first event threshold is set to 20, that is, if the number of events detected in a target sub-region within 100 milliseconds exceeds 20, it is determined that the target sub-region can contain the dynamic target. If the image of the sensor to be tested is divided into 100 target sub-regions, after 100 milliseconds of observation, the statistical result shows that target sub-region 1 has 25 events, target sub-region 2 has 18 events, target sub-region 3 has 22 events, and so on.
[0106] In this process, the number of events in target sub-region 1 and target sub-region 3 (25 and 22 respectively) exceeds the first event threshold 20, so target sub-region 1 and target sub-region 3 are determined as the first sub-regions.
[0107] Further, the number of the first sub-regions (the first number) is 2, i.e., the target sub-region 1 and the target sub-region 3. Based on this, by analyzing the first number and the number of the second events contained in each first sub-region, it can be evaluated whether the current set first event threshold and the first time period are appropriate, and adjusted according to real-time data feedback, so that the system can understand the baseline level of event occurrence under the current environment 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 the output delay, the target event threshold and the 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 the output delay, improving the detection efficiency and accuracy while ensuring the effective use of resources. For example, "adjusting the first event threshold and the first time period based on the first number and the number of the second events contained in each first sub-region to obtain a target event threshold and a target time period" in (102.A3) can include:
[0110] (102.A3.1) obtaining a first sub-region number threshold;
[0111] (102.A3.2) when the first number is less than the first sub-region number threshold, calculating a first event mean value of each first sub-region according to the number of the second events contained in the plurality of first sub-regions;
[0112] (102.A3.3) when the first event mean value is greater than a mean value threshold, taking the first event threshold as the target event threshold and taking the first time period as the target time period, wherein the mean value threshold is greater than or equal to the first event threshold.
[0113] The first sub-region number threshold can be a pre-set value for setting the maximum 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 number threshold, the calculation burden can be too heavy due to too many first sub-regions, causing output delay.
[0114] The first event mean value can be the average value of the number of events in all first sub-regions when the first number (i.e., the number of target sub-regions exceeding the first event threshold) is less than the first sub-region number threshold.
[0115] wherein the average threshold value can be used to determine whether the average of the number of second events 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 changes of events.
[0116] Specifically, when the first number is less than the first sub-region number threshold value, 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 average is greater than the average threshold value, it indicates that the frequency of events in the current first sub-region is high and is likely to correspond to the presence of an effective dynamic target rather than being caused by background noise or weak dynamics.
[0118] Exemplarily, when the first number is less than the first sub-region number threshold value and when the first event average is greater than the average threshold value, the processing flow is as follows:
[0119]
[0120] wherein p represents the first time period; T adaptive represents the target event threshold value; represents the number of first sub-regions, i.e., the first number; T1 represents the first sub-region number threshold value; represents the first event average; x represents the number of second events in each first sub-region; Hg(x) represents each first sub-region; T2 represents the average threshold value.
[0121] Exemplarily, the system initially sets the first time period p to 100 milliseconds, the first event threshold value 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 value T1 is set to 30. When first running, the system detects that the number of second events of 25 target sub-regions exceeds 20, which is less than the first sub-region number threshold value 30, indicating that the system processing burden is moderate. Next, the first event average of the first sub-region is calculated. If the first event average is 60 and T2 is 50, it indicates that the frequency of events in the current first sub-region is high and is likely to correspond to the presence of an effective dynamic target rather than being caused by background noise or weak dynamics. Therefore, the first event threshold value can be directly used as the target event threshold value, and the first time period can be directly used as the target time period.
[0122] Through the above method, the output delay of the system can be effectively reduced, and dynamic targets can be effectively detected based on the determined target time threshold and target time period. In this way, the accuracy of dynamic target detection is improved and the output delay of the target detection results is effectively reduced.
[0123] In some embodiments, when the mean of the first events is less than a mean threshold, it indicates that the average of all second events is insufficient to determine whether the current first sub-region contains a dynamic target or background noise and / or weak dynamics. Therefore, the interval of the first time period needs to be increased to capture more event changes. For example, after (102.A3.2), when the mean of the first events 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 the first event threshold as a second sub-region;
[0126] (a.3) determining the number of second subregions as a second number, and when the second number is less than a threshold value for the number of first subregions, calculating a second event mean for each second subregion based on the number of third events contained in the plurality of second subregions;
[0127] (a.4) Repeatedly calculate the second event mean of the second sub-region until the second event mean is greater than the mean threshold. Then, use the first event threshold as the target event threshold, and use 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 increasing by 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 proportion depends on the system designer's consideration of the balance between response speed and detection accuracy and the understanding of the specific application scenario. The embodiments of the present application do not impose specific restrictions on this.
[0129] The second time period can be a new time period obtained by increasing the length of the first time period when the system finds that the first event mean is less than the mean threshold value after the initial analysis, indicating that the currently set first time period can not be sufficient to distinguish dynamic targets from background noise. By adjusting to obtain the second time period, more dynamic changes can be captured by prolonging the observation time, and the accuracy of judging dynamic targets can be improved.
[0130] The third event number can be the number of events newly recorded in each target sub-region within the second time period.
[0131] The second sub-region can be a target sub-region whose event number within the second time period exceeds the first event threshold value after adjustment to the second time period. The second sub-region shows a higher dynamic target activity within a longer observation time.
[0132] The second number can be the total number of second sub-regions selected according to the third event number within the second time period.
[0133] The second event mean can be the average value of the third event number contained in all second sub-regions on the basis of the second sub-region. The second event mean can be used to evaluate whether the event frequency in the second sub-region within the second time period has reached a level sufficient to distinguish dynamic targets from background noise and / or subtle changes and / or unchanged sub-regions.
[0134] In some embodiments, the second time period can be continuously adjusted, and the second event mean of the updated second sub-region can be compared with the mean threshold value until the second event mean is greater than the mean threshold value, which can indicate that the event frequency in the second sub-region has reached a level sufficient to distinguish dynamic targets from background noise and / or subtle changes and / or unchanged sub-regions. At this time, the first event threshold value can be used as the target event threshold value, and the second time period corresponding to the second event mean greater than the mean threshold value can be used as the target time period.
[0135] For example, the system is initially configured as follows:
[0136] The first time period p is 100 milliseconds, the first event threshold value T1 is 20, the first sub-region number threshold value T1 is 30, the mean threshold value T2 is 50, and the preset first time adjustment scale is to increase the original time period by 100 milliseconds.
[0137] For example, in the first 100 milliseconds, the system detects that the number of events of the 25 target sub-regions exceeds 20, the first number is 25, which is less than the first sub-region number threshold 30, indicating that the detection burden is moderate, and if the first event average is 45, which is less than the average threshold 50. At this time, the first event adjustment scale 100 milliseconds is added to the first time period to obtain the second time period 200 milliseconds. In 200 milliseconds, the number of events of each target sub-region is counted again as the third event number. If there are 30 target sub-regions whose third event number exceeds 20 at this time, they become the second sub-region, and the second number is 30.
[0138] Further, the third event average of the 30 second sub-regions is calculated, and the second event average is obtained as 65. Since the second event average is greater than the average threshold, it indicates that in the second time period, the event frequency of the second sub-region is sufficient to distinguish dynamic targets from background noise, etc. Therefore, 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 the detection parameters according to real-time data feedback, the system can effectively reduce the output delay while ensuring the 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-region is in the normal range, the first number will be less than the first sub-region number threshold. However, when the dynamic target is too large or there is background noise, there may be a large number of target sub-regions, and a large number of target sub-regions may cause system delay. Therefore, in order to improve the performance of the system and effectively reduce the delay of the system, the too large dynamic target 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-region number threshold, the method can further include:
[0141] (b.1) 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;
[0142] (b.2) When there is a first sub-region with an event number greater than the second event threshold, the number of first sub-regions with an event number between the first event threshold and the second event threshold is determined as a third number, and the number of first sub-regions with an event number greater than the first event threshold in the first time period is determined as a fourth number;
[0143] (b.3) Based on the ratio of the third number and the fourth number, a first event number ratio is obtained;
[0144] (b.4) adjusting the first event threshold according to a preset event adjustment scale to obtain a third event threshold when the first event number ratio is greater than a preset ratio threshold;
[0145] (b.5) taking the third event threshold as a target event threshold and taking the first time period as a target time period.
[0146] The second event threshold can be used to determine whether the first number is too large due to a dynamic target or caused by background noise. The second event threshold can be used to filter out cases where the event number is too large to be processed by the system or where there is too much noise.
[0147] The third number can be the number of first sub-regions whose event number falls between the first event threshold and the second event threshold in the first time period. These first sub-regions are considered to be sub-regions that may contain more background noise.
[0148] The fourth number can be the number of first sub-regions whose event number exceeds the first event threshold in the same time period.
[0149] The first event number ratio can be calculated by dividing the third number (the number of noise candidate sub-regions) by the fourth number (the number of potential dynamic target sub-regions).
[0150] The ratio threshold can be a preset limit value used to determine whether the first event number ratio is too high, i.e., whether the noise proportion is too large. When the first event number ratio exceeds the ratio threshold, it indicates that the background noise may have a significant impact on the detection result.
[0151] The event adjustment scale can be used to change the first event threshold to address the problem of background noise or large target. When the first event number ratio exceeds the ratio threshold, the system will adjust 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, which is not limited in the present application.
[0152] In some embodiments, the presence of noise (such as screen jitter) or large dynamic targets can cause the number of target sub-regions to increase. For background noise, the event number of each target sub-region is also relatively low. Therefore, a second event threshold can be set to further filter and calculate the proportion of first sub-regions with noise. If the proportion is too large, it indicates that the first event threshold should be adjusted.
[0153] Exemplarily, when the first quantity is greater than the first sub-region quantity threshold value, and the first event number ratio is greater than the preset ratio threshold value, it indicates that the first sub-region quantity of background noise is relatively large, and the second event threshold value needs to be adjusted to improve the threshold value for determining the dynamic target. When the first event number ratio is less than the preset ratio threshold value, it indicates that the case that the first event number ratio is greater than the preset ratio threshold value is not caused by the background noise, but caused by the dynamic target being too large. At this time, the process of obtaining the preset target event threshold value and the target time period needs to be restarted, the first time period and the first event threshold value are obtained, and the subsequent calculation process is described above.
[0154] In some embodiments, the first event threshold value can be adjusted according to a preset event adjustment scale to obtain a third event threshold value, or the second event threshold value can be adjusted according to a preset event adjustment scale to obtain a third event threshold value. The selection is made according to actual conditions.
[0155] Exemplarily, when the first quantity is greater than the first sub-region quantity threshold value, the adjustment process is as follows:
[0156]
[0157] Wherein, p represents the first time period; T adaptive represents the target event threshold value; represents the number of the first sub-regions whose event number is greater than the second event threshold value; represents the number of the first sub-regions, that is, the first quantity; x M-2 represents the second event threshold value; represents the third quantity; represents the fourth quantity; R represents the first event number ratio; R thesh represents the ratio threshold value; x3 represents the third event threshold value.
[0158] Exemplarily, the first sub-region quantity threshold value is set to 100, the first event threshold value is set to 50, the ratio threshold value is set to 0.6, and the event adjustment scale is set to increase the original second event threshold value by 20%.
[0159] Specifically, when the first quantity is 120, which is greater than the first sub-region quantity threshold value, the second event threshold value is obtained. If the second event threshold value is 75, it is calculated that the event number of 20 sub-regions is between 50 and 75 (the third quantity), and the event number of 30 sub-regions exceeds 50 (the fourth quantity).
[0160] Further, a first event number ratio of 20 (third quantity) to 30 (fourth quantity) can be calculated to obtain 0.67. It can be known that the first event number ratio 0.67 is greater than the preset ratio threshold 0.6, indicating that the background noise ratio can be relatively high. Therefore, the system adjusts the second event threshold according to the event adjustment scale (20%), and obtains that the third event threshold is increased by 20% on the basis of 75, that is, 90.
[0161] Further, the updated 90 can be taken as a new target event threshold, and the first time period can be taken as a target time period.
[0162] By dynamically adjusting the threshold, the system can more accurately determine the reason why the first quantity is greater than the first sub-region quantity 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, which is especially suitable for scenes with large dynamic changes and complex background noise.
[0163] In some embodiments, when there is no first sub-region with an event number greater than the second event threshold, it indicates that the case that the first quantity is greater than the first sub-region quantity threshold is not caused by a large dynamic target, but caused by noise. At this time, a preset second time adjustment scale can be added to the first time period to obtain a third time period, so as to effectively filter the first sub-region with noise. For example, after (b.1), when there is no first sub-region with an event number greater than the second event threshold, the method can further include:
[0164] (c.1) when there is no first sub-region with an event number 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) in the third time period, obtaining a fourth event number of events occurring in each target sub-region, and determining a target sub-region with a contained fourth event number greater than the first event threshold as a third sub-region;
[0166] (c.3) determining a number of the third sub-regions as a fifth quantity, and when the fifth quantity is less than the first sub-region quantity threshold, calculating a third event mean value of each third sub-region according to a plurality of fourth event numbers of a plurality of third sub-regions;
[0167] (c.4) repeating the calculation of the third event mean value of each third sub-region until the third event mean value is greater than the mean value threshold, taking the first event threshold as a target event threshold, and taking the third time period as a target time period.
[0168] The second time adjustment scale can be a preset time length adjustment rule. The second time adjustment scale can be the same as or different from the first time adjustment scale, and can be flexibly adjusted as needed.
[0169] 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 the first sub-region being noise, even if the second time adjustment scale is increased, the number of events contained will not generally change. When the first sub-region is a dynamic target sub-region, increasing the second time adjustment scale will also increase the number of events corresponding to the first sub-region.
[0170] The fourth event number can be the number of events occurring in each target sub-region in the third time period.
[0171] The third sub-region can be a target sub-region whose fourth event number exceeds the first event threshold in the third time period.
[0172] The fifth number can be the sum of the number of third sub-regions in the third time period.
[0173] The third event mean can be the ratio of the product of all third sub-regions and the corresponding fourth event number to the fifth number.
[0174] In some embodiments, after adjusting the first time period to the third time period, the fourth event number of events occurring in each target sub-region in the third time period is obtained, the target sub-region whose contained event number is greater than the first event threshold is determined as the third sub-region, and the number of third sub-regions is determined as the fifth number. At this time, the fifth number can be less than or greater than the first sub-region number threshold. Then, different situations are handled according to the same method as described above. For details, please refer to the above description.
[0175] By dynamically adjusting the detection time period and the 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, reducing unnecessary computational burden, and ultimately achieving the goal of accurately identifying dynamic targets and reducing output delay.
[0176] In some embodiments, in order to effectively screen out background noise or target sub-regions without changes, each target sub-region can be screened by a determined target time threshold to determine the target sub-regions where dynamic targets actually exist, thereby effectively reducing the delay of dynamic target detection. For example, the step 102 of "generating a first binary image according to the difference between the first event number of each target sub-region in the target time period and the target event threshold" can include:
[0177] (102.B1) generating an event matrix composed of the first event number of each target sub-region according to the distribution position of the target sub-region in the sensor image to be detected in 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) determining the binary value of each matrix element according to the comparison result, and generating a corresponding first binary image based on the binary value.
[0180] Wherein, the event matrix can be an event matrix composed of the first event number generated according to the distribution position of the target sub-region in the sensor image to be detected. For example, the sensor image to be detected is divided into n x ×n y target sub-regions, then the event matrix S σ can be represented as
[0181] Wherein, the comparison result can be the result obtained by comparing each matrix element (i.e. the event number of each target sub-region) with the preset target event threshold one by one in 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] Wherein, the binary value can be a binary representation given to each element in the event matrix after comparison with the target event threshold. If the event number of a certain region exceeds the preset threshold, the binary value of that position is 1, indicating that there is a significant dynamic target; otherwise, it is 0, indicating static or background noise.
[0183] Wherein, the first binary image can be an image representation obtained after applying the above binary process to the event matrix. In this image, the position of each pixel corresponds to an element in the event matrix, and the value (0 or 1) of the pixel reflects whether the target sub-region is determined to contain a dynamic target.
[0184] For example, if the sensor image to be tested is divided into 9 uniform target sub-regions (i.e. 3x3 sub-blocks), in the target time period A, each target sub-region records the number of events triggering the dynamic vision sensor, such as light intensity changes caused by moving objects. 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] Then, the matrix elements in the event matrix greater than or equal to 50 can be marked as 1, and the matrix elements less than 50 can be marked as 0. The binary matrix generated by comparing the obtained binary values is as follows:
[0188]
[0189] Further, based on the binary values, a corresponding first binary image can be generated, in which black pixels (0) represent static or low dynamic regions, and white pixels (1) represent target sub-regions with significant dynamics.
[0190] Further, since the time matrix is generated based on the distribution of the target sub-regions in the sensor image to be tested, the first connected region and the position coordinates corresponding to the first connected region can be determined directly according to the binary values corresponding to the matrix elements without generating the first binary image.
[0191] By generating the first binary image, the region where the dynamic target actually exists can be quickly screened out, avoiding subsequent decoding and in-depth analysis of the entire image, 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 sensor image to be tested to obtain a corresponding event accumulation image.
[0193] In some embodiments, at least one first connected region, i.e. the position of the target sub-region where the dynamic target exists (the target sub-region marked as 1 in the first binary image), can be determined by using a connected algorithm based on the first binary image, and the corresponding position in the sensor image to be tested can be decoded without decoding the entire sensor image to be tested, greatly reducing the output delay.
[0194] The first connected region can be a set of adjacent pixels having the same attribute value (all marked as 1 in the first binary image, representing a target sub-region of the dynamic target existing).
[0195] The event accumulation image can be obtained by decoding and down-sampling the first connected region at the same position in the sensor image to be detected after determining the first connected region in the first binary image. The event accumulation image can be generated by counting the number of events accumulated in the target sub-region segmented in the sensor image to be detected within a target time period, and is used to highlight the distribution and intensity of dynamic events.
[0196] For example, at least one first basic search region can be determined in the first binary image based on four-connected, eight-connected, etc. The specific determination process is not described here. For each first basic search region, such as the first basic search region 1, the size thereof can be determined, and then a certain number of pixels can be expanded around the first basic search region (the expansion scale can be set by the user) to avoid omission of edge detection, to obtain a second basic search region. Then, the first basic search region is subjected to a moving convolution operation to reduce noise and extract useful information. Further, the coordinates of the corners of the smallest rectangle (circumscribed rectangle) containing the second basic search region can be determined according to the convolution result, and thus at least one first connected region can be determined.
[0197] By determining the first connected region, the first connected region in which the dynamic target exists can be determined, and the corresponding position of the first connected region in the sensor image to be detected can be determined, and the corresponding position is decoded to obtain an event accumulation image corresponding to the sensor image to be detected.
[0198] For example, k first basic search regions with a value of 1 can be determined from the first binary image, and then the first basic search regions are expanded according to a preset expansion scale [2ceil(w i / 2)+(mod(w i / 2))]x[2ceil(h i / 2)+(mod(h i / 2))] (ceil represents rounding up) to obtain a second basic search region
[0199] Further, a unit matrix with a size of 2{max[ceil(w i / 2), ceil(h i / 2)]} can be used to expand the second basic search region 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 position coordinate range of the first connected region in the event matrix or the first binary image can be directly calculated. 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 image 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 is (w,h) = (8,8), the downsampling factor is 4. By obtaining the number of events in the sub-region at intervals of 4 in each row and column, the event accumulation image after downsampling decoding can be obtained.
[0204] Through the decoding and reconstruction process, the cumulative image corresponding to the event in the first connected region is determined, which facilitates subsequent dynamic target recognition. By determining the first connected region and decoding the corresponding position in the sensor image under test, the corresponding cumulative image of the event is obtained, eliminating the need to decode the entire sensor image under test, thereby greatly improving the efficiency of dynamic target detection.
[0205] In some embodiments, to accurately determine the area where the dynamic target exists, the first binary image may be subjected to a connected region detection to quickly determine the position of the dynamic target in the image of the sensor to be detected. For example, the "determining at least one first connected region 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) extending edges of the first basic search region according to a preset extension scale to obtain a second basic search region;
[0208] (103.3) obtaining a preset unit matrix, and performing a moving convolution on the second basic search region based on the unit matrix to obtain a convolution result;
[0209] (103.4) determining at least one first connected region according to the convolution result.
[0210] The first basic search region can be a continuous region with the same binary value determined by connectedness detection, and any two pixel points in each first basic search region can be connected by a series of paths in the region.
[0211] The second basic search region can be obtained by extending the first basic search region to more comprehensively cover the region that can be affected by the dynamic target and reduce the omission caused by edge effects. The second basic search region can be obtained by adding a pixel width of a preset extension scale around the first basic search region.
[0212] The unit matrix can be a matrix used for convolution operation, and the unit matrix is a full 1 matrix, which is used to highlight or emphasize a specific region in the moving convolution operation to help locate the accurate position of the second basic search region in the sensor image to be tested.
[0213] The convolution result can be an output obtained by performing a moving convolution operation on the unit matrix and the second basic search region, and the convolution result can be used to determine the position of the second basic search region in the sensor image to be tested.
[0214] For example, at least one first basic search region can be determined in the first binary image based on four-connectedness, eight-connectedness, etc. The specific determination process is not described here. For each first basic search region, such as the first basic search region 1, the size of the first basic search region can be determined, and then a certain number of pixels (the extension scale can be set by the user) can be added around the first basic search region to avoid omission of edge detection, thereby obtaining a second basic search region. Then, a moving convolution operation is performed on the first basic search region to reduce noise and extract useful information. Further, the coordinates of the corners of the smallest rectangle (circumscribed rectangle) containing the second basic search region can be determined according to the convolution result, and thus at least one first connected region can be determined.
[0215] By determining the first connected region, the first connected region in which the dynamic target exists can be determined, and the corresponding position of the first connected region in the sensor image to be tested can be determined, and the corresponding position can be decoded to obtain an event accumulation image corresponding to the sensor image to be tested.
[0216] For example, the first binary image can be used to determine k first basic search areas with a value of 1, and then the first basic search areas are expanded according to the preset 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, a size of 2{max[ceil(w i / 2),ceil(h i / 2)]} 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 position coordinate range of the first connected region in the event matrix or the first binary image can be directly calculated. 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, so as to reduce noise and extract features of the event accumulation image, so as to subsequently obtain a dynamic target detection result according to the second connected region.
[0224] The second connected region can be an accurately determined region containing the dynamic target, and can be obtained by performing a connected algorithm detection on the second binarization image corresponding to the event accumulation image.
[0225] For example, a unit convolution kernel can be obtained, the kernel elements of the unit convolution kernel are all 1, and then the unit convolution kernel is used to perform sliding convolution on the event accumulation image at a unit step, such as a step of 1, to obtain a first convolution value of each target sub-region in the event accumulation image and the unit convolution kernel; based on the deviation of the first convolution value from the 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 a plurality of 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). 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] In this way, the region where the dynamic target is located can be effectively identified and accurately positioned from the event accumulation image, so as to realize effective detection and positioning of the dynamic target.
[0227] In some embodiments, in order to further reduce noise of the event accumulation image and accurately position the dynamic target through the event accumulation image, at least one connected region can be determined through a set binarization threshold, and at least one second connected region can be determined from the to-be-detected sensor image according to the connected region, so as to improve the accuracy of dynamic target detection. For example, step 104 can include:
[0228] (104.1) obtaining a unit convolution kernel, and performing sliding convolution on the event accumulation image at a unit step according to the unit convolution kernel to obtain a first convolution value of 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 the deviation of the first convolution value from a preset binarization threshold;
[0230] (104.3) generating a second binarization image of the event accumulation image based on a plurality of binarization values;
[0231] (104.4) determining at least one second connected region from the second binary image.
[0232] wherein the unit convolution kernel can be used to calculate the sum of local pixels. Specifically, the unit convolution kernel can be used to perform a sliding convolution on the event accumulation image to evaluate the dynamic degree of each target sub-region.
[0233] wherein the first convolution value can be the result of the calculation of each target sub-region in the event accumulation image with the kernel elements in the unit convolution kernel during the sliding convolution process. Specifically, it is the numerical value after multiplying and summing all pixel values in the corresponding target sub-region with the corresponding elements of the unit convolution kernel.
[0234] wherein the binary threshold can be a pre-set fixed value used to distinguish between (dynamic targets) and background noise in the image. If the first convolution value exceeds the binary threshold, it is considered that the corresponding position is the sub-region of the dynamic target; otherwise, it is considered to be a noise background or other non-dynamic target sub-region.
[0235] wherein the binary value can be a value (usually 0 or 1) assigned to each target sub-region based on the comparison of 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 belongs to the dynamic target, and the corresponding binary value is 1; otherwise, it is 0.
[0236] wherein the second binary image can be a binary image generated by applying a plurality of binary values to the event accumulation image. The second binary image can be used to further highlight the dynamic target after fine processing, and the second binary image has clearer target boundaries and less noise interference.
[0237] wherein the second connected region can 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] For example, a unit convolution kernel can be obtained, the kernel elements of which are all 1, and then a sliding convolution is performed on the event accumulation image according to the unit convolution kernel at a unit step to obtain the first convolution value calculated by the pixels in each target sub-region in the event accumulation image and the unit convolution kernel. Specifically, the size of the unit convolution kernel can be 3, 7 or 9, etc., which can be adjusted according to actual conditions.
[0239] Further, the binarization value of the target sub-region can be determined based on the deviation of the first convolution value from a preset binarization threshold. For example, when the binarization threshold is 10, if the first convolution value is 6, the binarization value is 0; if the first convolution value is 20, the binarization value is 1. It can be understood that when the binarization value is 1, it indicates that the corresponding region has a significant feature in the image, and can be determined as a dynamic target.
[0240] For example, a second binarization image of the event accumulation image can be generated based on the plurality of binarization values, and at least one second connected region can be determined from the second binarization image by using a connected algorithm (such as a four-connected algorithm or an eight-connected algorithm, etc.). Specifically, the binarization threshold can be a fixed threshold, which can be less than 15 or other values, for example, the binarization threshold can be 10, 12, etc.
[0241] It can be understood that when the second connected region is determined in the second binarization image, the position of the second connected region in the second binarization image can be determined, so as to subsequently map the second connected region to the corresponding position in the to-be-measured sensor image. For example, after determining a plurality of second connected regions by using the connected algorithm, the plurality of second connected regions can be further processed, and specifically, the accurate positioning frame of each second connected region can be determined. Specifically, for each second connected region, the contour of the second connected region can be determined, and then the coordinates of the four corners of the circumscribed rectangle (containing) of the second connected region 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 region, i.e. The position of the second connected region is described in this way.
[0242] By setting the binarization threshold and using the connected domain algorithm, the positioning frame of the second connected region, i.e., the positioning frame of the dynamic target in the to-be-measured sensor image, can be accurately extracted from the denoised image, so as to realize accurate positioning of the dynamic target.
[0243] In step 105, the second connected region is mapped to the corresponding position in the to-be-measured sensor image to obtain the dynamic target detection result of the to-be-measured sensor image.
[0244] In some embodiments, in order to realize accurate positioning of the dynamic target, the second connected region can be mapped to the to-be-measured sensor image according to the position of the second connected region in the second binarization image and in combination with the up-sampling ratio, so as to quickly and accurately obtain the corresponding dynamic target detection result of the to-be-measured sensor image.
[0245] The dynamic target detection result can be the position and range of the dynamic target determined from the to-be-measured sensor image.
[0246] Exemplarily, since the event accumulation image is decoded based on the to-be-tested sensor picture, the second binary image generated according to the event accumulation image corresponds to a second connected region The to-be-tested sensor picture can be mapped to a corresponding position in the to-be-tested sensor picture to obtain a dynamic target detection result of the to-be-tested sensor picture.
[0247] Specifically, the positioning frame of the second connected region determined from the second binary image can be mapped to the to-be-tested sensor picture in combination with an up-sampling rate ratio {max[ceil(w i / 2), ceil(h i / 2)]} to obtain an accurate detection frame of the i-th second connected region at the same position in the to-be-tested sensor picture. (ceil represents rounding up) and the corresponding region is taken as the dynamic target detection result.
[0248] The embodiment of the present application obtains an encoded to-be-tested sensor picture, divides the to-be-tested sensor picture into a plurality of target sub-regions, obtains a preset target event threshold and a target time period, and generates a first binary image according to the difference between the first event number of each target sub-region in the target time period and the target event threshold. At least one first connected region is determined based on the first binary image, and the corresponding position of the first connected region in the to-be-tested sensor picture is decoded to obtain a corresponding event accumulation image. The event accumulation image is binarized according to a preset binarization threshold to obtain at least one second connected region determined from the event accumulation image. The second connected region is mapped to the corresponding position in the to-be-tested sensor picture to obtain a dynamic target detection result of the to-be-tested sensor picture. In this way, the events of each target sub-region in the target time period are screened by the target event threshold to determine the target sub-region that is likely to change dynamically, and only the corresponding position of the first connected region formed by the plurality of target sub-regions in the to-be-tested sensor picture is decoded instead of decoding the entire to-be-tested sensor picture. The second connected region that changes dynamically is further accurately calculated, and the output delay of the target detection result is effectively reduced.
[0249] Please refer to Figure 5 In some embodiments, the present application introduces the general embodiment in combination with Figure 5 The to-be-tested sensor picture can be divided into n x ×n y target sub-regions, the number of events N ijσ in the [i, j]th target sub-region in the target time period is counted using the to-be-tested sensor picture, and finally an event matrix For example, for DVSIMX636 (resolution 720x1280), n x = 12, n y = 16, corresponding to the target sub-region resolution of 60x80.
[0250] Further, the number of events corresponding to different event types can be obtained by the value of the most significant bit (MSB) using formula (1) (Note that at this time, only the number of events is counted without decoding the specific position coordinates of the event occurrence).
[0251] In some embodiments, in order to determine the minimum cumulative time interval, i.e. the target time period, sufficient for dynamic target detection and the adaptive threshold value, i.e. the target time threshold value, for binarizing the event matrix, the following embodiments can be used for determination:
[0252] For example, an initial first time period p = 100us can be set, and the number of events in the [i,j]th target sub-region within the first time period p can be obtained by formula (2) ijσ , and then an initial event matrix S
[0253] Further, based on the initial event matrix S σ , M non-complete uniform intervals [0,x1,x2,..,xM-2,xM-1,∞] can be divided according to the number of events, for example, the non-complete uniform intervals can be [0 50 100 150 200 250 300 350 500 1000 ∞] and the like, and the non-complete uniform intervals are denoted as Hr, and the specific interval values can be determined according to actual conditions; further, the number of events in which the matrix elements of the initial event matrix S σ are distributed in the H r interval can be counted to obtain a non-uniform histogram Hg(x). In the non-uniform histogram Hg(x), the horizontal coordinate represents the number of events, and the vertical coordinate represents the number of target sub-regions corresponding to the number of events. For example, in the non-uniform histogram, the horizontal coordinate is 50, i.e. the number of events is 50, and according to the number of events of each target sub-region, it can be determined that there are 6 target sub-regions with the number of events of 50, and therefore 6 can be taken as the vertical coordinate of the corresponding non-uniform histogram. According to the number of events of each target sub-region, the non-uniform histogram Hg(x) in which the matrix elements of the initial event matrix S σ are distributed in the H r interval can be obtained.
[0254] Further, the non-uniform histogram Hg(x) can be used to determine a target time period p for dynamic target detection by the following method σ and a target event threshold T pσ for binarizing S adaptive to efficiently implement target detection on the sensor image to be tested:
[0255]
[0256]
[0257] Further, the target event threshold T adaptive determined finally can be used to binarize the event matrix S pσ to obtain a binarization matrix B or a first binarization image;
[0258] Illustratively, the k connected regions with a value of 1 in the binarization matrix B (w k ×h k represent the size of the kth connected region) can be obtained by a connected region method as first basic search regions;
[0259] Further, for the ith (i = 1, 2,..., k) first basic search region, its periphery can be expanded to a size of [2ceil(w i / 2) + (mod(w i / 2))] × [2ceil(h i / 2) + (mod(h i / 2))] (ceil represents rounding up) to obtain a second basic search region
[0260]
[0261] Further, a unit matrix with a size of 2{max[ceil(w i / 2), ceil(h i / 2)]} can be used to move and convolve the second basic search region to obtain a convolution result:
[0262] Further, the positioning frame of the ith first connected region in the sensor image to be tested can be obtained according to the position of max(C i ) in C i as
[0263] Illustratively, for DVSIMX636, when 2{max[ceil(w i / 2), ceil(hi When i=8, the target base region can be uniformly searched by J8 (J8 represents occupying 8 sub-blocks in the row direction and the column direction, and so on).
[0264] Further, the to-be-detected sensor picture in the i-th (i=1, 2,..., k) first connected region is decoded to obtain an event represented by (x, y, t, p), and an event accumulation image Ii with a down-sampling rate of {max[ceil(w i / 2), ceil(h i / 2)]} is obtained at the same time. For example, for the DVS IMX636, C i the resolution is up to 640X480, and direct decoding will consume a lot of computing resources, so the application directly down-samples to a fixed resolution of 120X160 in the decoding process to simplify the complexity of calculation. Figure 4 The process of obtaining the event accumulation image Ii by down-sampling decoding is shown: the left side is the to-be-detected sensor picture target base search region, and the right side is the image Ii after down-sampling decoding (the numbers in the sub-grid represent the number of events), since the base search region (w, h) = (8, 8) on the left side, the down-sampling rate is 4, and the number of events in the sub-region is obtained by spacing 4 in the row and column, and the event accumulation image Ii after down-sampling decoding can be obtained.
[0265] Further, a second binary image IBi of the event accumulation image Ii can be obtained by binarization thresholding;
[0266] Further, 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 and combined with the up-sampling rate {max[ceil(w i / 2), ceil(h i / 2)]} to map the second connected region to the to-be-detected sensor picture to obtain the accurate detection frame of the i-th target of interest in the to-be-detected sensor picture and the accurate positioning frame is taken as the dynamic target detection result.
[0267] The embodiment of the present application obtains an encoded to-be-detected sensor picture, divides the to-be-detected sensor picture into a plurality of target sub-regions, obtains a preset target event threshold and a target time period, generates a first binary image according to a gap between a first event number of events occurring in each target sub-region in the target time period and the target event threshold, determines at least one first connected region based on the first binary image, decodes a corresponding position of the first connected region in the to-be-detected sensor picture to obtain a corresponding event accumulation image, performs binary processing on the event accumulation image according to a preset binary threshold to obtain at least one second connected region determined from the event accumulation image, maps the second connected region to a corresponding position in the to-be-detected sensor picture to obtain a dynamic target detection result of the to-be-detected sensor picture. In this way, the events occurring in each target sub-region can be screened according to the target event threshold in the target time period, the target sub-region that is likely to change dynamically is determined, and only the corresponding position of the first connected region formed by the plurality of target sub-regions in the to-be-detected sensor picture is decoded instead of decoding the entire to-be-detected sensor picture, and the second connected region that changes dynamically is further accurately calculated, thereby effectively reducing the output delay of the target detection result.
[0268] Please refer to Figure 6 The embodiment of the present application also provides a dynamic target detection device, which can implement the dynamic target detection method. The dynamic target detection device comprises:
[0269] The dividing module 61 is configured to obtain an encoded to-be-detected sensor picture, and divide the to-be-detected sensor picture into a plurality of target sub-regions.
[0270] The generating module 62 is configured to obtain a preset target event threshold and a target time period, and generate a first binary image according to a gap between a first event number of events occurring in each target sub-region in the target time period and the target event threshold.
[0271] The decoding module 63 is 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 to-be-detected sensor picture to obtain a corresponding event accumulation image.
[0272] The processing module 64 is configured to perform binary processing on the event accumulation image according to a preset binary threshold to obtain at least one second connected region determined from the event accumulation image.
[0273] The obtaining module 65 is configured to map the second connected region to a corresponding position in the to-be-detected sensor picture to obtain a dynamic target detection result of the to-be-detected sensor picture.
[0274] The specific implementation of the dynamic target detection apparatus is basically the same as the specific embodiments of the dynamic target detection method described above, and will not be repeated here. The dynamic target detection apparatus can also be provided with other functional modules to implement the dynamic target detection method in the above embodiments, under the premise of meeting the requirements of the embodiments of the present application.
[0275] The embodiments of the present application also provide a computer device, which comprises a memory and a processor. The memory stores a computer program, and the processor implements the dynamic target detection method when executing the computer program. The computer device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0276] Please refer to Figure 7 , Figure 7 The hardware structure of the computer device of another embodiment is illustrated, which comprises:
[0277] The processor 71 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0278] The memory 72 can be implemented in the form of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 72 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 72 and are called and executed by the processor 71 to implement the dynamic target detection method of the embodiments of the present application.
[0279] The input / output interface 73 is used to realize information input and output.
[0280] The communication interface 74 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (such as a USB, a network cable, etc.) or a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.).
[0281] The bus 75 transmits information between various components (such as the processor 71, the memory 72, the input / output interface 73, and the communication interface 74) of the device.
[0282] The processor 71, the memory 72, the input / output interface 73, and the communication interface 74 are connected to each other through the bus 75 for communication within the device.
[0283] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the dynamic target detection method.
[0284] The memory is a non-transitory computer readable storage medium, and can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0285] The embodiments described in the embodiments of the present application are used 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 by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0286] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures, or combine certain steps, or different steps.
[0287] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiments of the present application.
[0288] Those skilled in the art can understand that all or some steps in the above disclosed method, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0289] The terms "first", "second", "third", "fourth", and the like in the description and in the claims of this application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological mundane operation, reverse order operation, based on circuitry availability, based on stated preference or the like, and that "default" or other orderings are thus permissible. Further, the terms "comprise", "comprising", "include", "including", and the like, are specifically intended to be open-ended. That is, references to individual steps and the like do not suhstantially exclude the presence of two or more of a recited step or its integral sub-steps or additional steps whether or not readily ascertainable from the description or the like. Further, the words "a" or "an", as used herein in the disclosure and elsewhere, are used indiscriminately and are to be interpreted in the same way, i.e. as meaning "one or more".
[0290] It should be understood that, in the application, "at least one" and "several" refer to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: 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 represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple 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, and c can be single or multiple.
[0291] In several embodiments provided in the application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are only illustrative, for example, the division of the above-mentioned units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be 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 can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0293] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0294] If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.
[0295] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A dynamic target detection method, characterized in that: The method comprises: Acquire an encoded image of the sensor to be tested, and divide the image of the sensor 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 target sub-region within the target time period and the target event threshold; 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; performing binarization processing 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; 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; Acquire a second event number of events occurring in each of the target sub-regions within a first time period, and determine a target sub-region having 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 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 a first event mean of each first sub-region according to a plurality of second event numbers contained in a plurality of 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; During 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 having a third event number greater than the first event threshold as a second sub-region; determining the number of the second sub-regions as a second number, and when the second number is less than a threshold value of the number of the first sub-regions, calculating a second event mean for each second sub-region based on a number of third events included in the plurality of second sub-regions; Repeatedly calculate the second event mean of the second sub-area until the second event mean is greater than the mean threshold, use the first event threshold as the target event threshold, and use 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 according to the number of events; 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; Obtaining a first event number ratio based on a ratio of the third number to the fourth number; 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; Acquire a fourth event number of events occurring in each target sub-region within the third time period, and determine a target sub-region having a fourth event number greater than the first event threshold as a third sub-region; 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 a third event mean of each of the third sub-regions according to a plurality of fourth event numbers of the plurality of third sub-regions; Repeatedly calculate 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, wherein: 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 includes: generating, within the target time period, an event matrix consisting of the first number of events in the target sub-region according to the distribution positions of the target sub-region in the image of the sensor to be tested; Comparing each matrix element included in the event matrix with the target event threshold to obtain a comparison result; A binarized value of each matrix element is determined according to the comparison result, and a corresponding first binarized image is generated based on the binarized value.
8. The dynamic target detection method according to claim 1, wherein: The determining of at least one first connected region based on the first binarized image includes: Performing connected region detection on the first binarized image to obtain at least one first basic search region; Expanding the edge of the connected region according to a preset expansion scale to obtain a second basic search region; Obtaining a preset identity matrix, and performing a moving convolution on the second basic search area based on the identity 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, wherein: The binarization processing 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 according to the unit convolution kernel with a unit step size 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; generating a second binarized image of the event accumulation image based on a plurality of binarized values; 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, configured to obtain the encoded image of the sensor to be tested and divide the image of the sensor to be tested into a plurality of target sub-areas; a generating module, configured to obtain a preset target event threshold and a target time period, and generate a first binary image according to a difference between the number of first events occurring in each target sub-region within the target time period and the target event threshold; a decoding module, configured to determine at least one first connected region based on the first binarized 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; 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, and 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