Image processing method and device for detecting target motion based on multi-layer suppression network
Through improved multi-layer suppression network and filtering processing technology, the problem of low target motion detection accuracy in complex motion scenes is solved, and high-accuracy target motion detection in complex scenes is achieved, which is suitable for unmanned driving and drone shooting. and other applications.
Patent Information
- Application Number
- CN202410611064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-16
AI Technical Summary
Existing technology is difficult to accurately detect target motion in complex motion scenes, especially when the background and objects are moving at the same time. Traditional algorithms are difficult to distinguish between the foreground and the background, resulting in low detection accuracy.
A multi-layer suppression network improved based on the traditional EMD model is used to process the image through time sliding mean filtering and Gaussian filter, suppress the background motion response, extract the contour and motion direction of the foreground target, and enhance the target motion detection ability in complex scenes.
It improves the precision and accuracy of target motion detection in complex scenes, and can accurately detect the movement of the target itself when the target is partially blocked, motion blurred, brightness changes, etc., and is suitable for fields such as unmanned driving and drone photography. .
Smart Images

Figure CN118537770A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a brain-inspired image processing method and device for detecting target motion based on a multi-layer recursive inhibition network. Background Art
[0002] In fields such as military and intelligent driving, there are a large number of complex phenomena in videos, such as motion blur, occlusion, morphological diversity, internal texture motion, and lighting changes, which increase the requirements for target detection algorithms. The existing mainstream algorithms based on feature detection are not sufficient to distinguish complex motion scenes. The common feature of these motion scenes is that the moving objects themselves have complex patterns, and these patterns are not static relative to the objects themselves, but have different motion speeds and directions. Therefore, the spatiotemporal correlation of brightness is destroyed. In this case, if common target detection algorithms based on optical flow changes are used, they will encode the motion of internal or edge patterns instead of the motion of the object itself. In addition, in practical application scenarios, such as drones equipped with cameras, the movement of the drone will cause both the background and the object to be in motion, which further increases the difficulty of correctly detecting objects.
[0003] Motion determined by the relationship of contrast changes, texture changes, and flicker from two or more stimulus locations is called second order motion or non-Fourier motion. Common examples of second order motion include theta motion, balanced drift motion, reverse phi motion, etc. This type of motion is important in everyday life, such as the free-flowing rope of a soldier wearing a ghillie suit during military field operations, a striped sphere that rotates and moves in motion, or a moving transparent glass plate.
[0004] Interestingly, insects, zebrafish, cats, guinea pigs, and other animals are able to efficiently discern this second-order motion, which is essential for their adaptation to the environment and survival. The visual processing systems of these organisms, including photoreceptors and visual lobes, can process specific moving objects and features. In the visual systems of insects such as fruit flies and hoverflies, different photoreceptor cells sense different wavelengths to discern colors. The perception of local motion signals occurs in the medulla and lobule, and downstream local motion signals are integrated in the lobule plate. The optic ganglia and central brain then integrate this information into the perception of self-motion.
[0005] Current moving object detection algorithms can be roughly divided into two categories: (1) extracting object motion information by taking the difference between consecutive frames; (2) determining the contour and motion information of the object by extracting object features such as texture, edge and shape. The first category includes classical methods such as time difference method, background subtraction, optical flow method and elementary motion detector (EMD) algorithm inspired by biological neural mechanism. Time difference, background subtraction and optical flow methods have difficulties in dealing with moving camera scenes because the background is also in motion and it is difficult to distinguish between moving objects and background. The second category includes feature-based algorithms, such as the widely used deep learning algorithms and algorithms combined with wavelet transform, which are used to extract object features. Deep learning algorithms need to be trained in advance to recognize obvious features, so it is difficult to detect object motion in complex texture foreground-background and missing features. Similarly, wavelet transform algorithms rely on contour extraction and need to be combined with methods such as time difference, background subtraction, K-means or Gaussian mixture model (GMM) to extract motion information. Their performance in complex texture and moving camera scenes is not ideal.
[0006] The EMD algorithm is based on the neural computing mechanism of the fruit fly visual system. It discovered motion-sensitive neurons with direction selectivity in the lobula plate by detecting intracellular and extracellular electrical signals. This global direction selectivity is achieved by integrating the outputs of local motion detectors T4 and T5 cells. Each unit acts as a specialized matched filter to extract direction information by detecting changes in optical flow during motion. Compared with mainstream algorithms, the EMD algorithm relies on the extraction of motion discontinuities, enabling it to recognize patterns against a texture-like background. Several derivative algorithms have also been developed based on the basic EMD algorithm, such as the Basic Small Target Motion Detector (ESTMD) algorithm for small target detection and the EMD algorithm for second-order motion. However, most of these algorithms are customized for specific application scenarios and lack sufficient biological evidence to support them.
[0007] How to improve the accuracy of target motion detection in complex motion scenes has become a technical problem that needs to be solved. Summary of the invention
[0008] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an image processing method and device for detecting target motion based on a multi-layer inhibition network.
[0009] The purpose of the present invention can be achieved by the following technical solutions:
[0010] According to one aspect of the present invention, there is provided an image processing method for detecting target motion based on a multi-layer inhibition network, the method comprising the following steps:
[0011] Step S1, graying the input image and preprocessing it to obtain differential image data;
[0012] Step S2, using a multi-layer suppression network improved based on the traditional EMD model to process the image processed in step S1;
[0013] Step S3, performing temporal sliding mean filtering on the result after the multi-layer suppression network processing to fill the internal texture of the foreground target;
[0014] Step S4, inputting the result processed in step S3 into a Gaussian filter for spatial filtering to blur the internal texture of the foreground object;
[0015] Step S5, using the first layer of the multi-layer suppression network to process the result of step S4, extracting the outline and motion direction of the foreground target.
[0016] Preferably, the multi-layer suppression network includes a multi-layer EMD model, and high-pass filtering is performed only on the first layer of the multi-layer EMD model. The multi-layer EMD model suppresses background motion response according to the velocity gradient, thereby distinguishing foreground motion from background motion.
[0017] More preferably, in the step S2, the process of using the multi-layer suppression network improved based on the traditional EMD model to process the image processed in step S1 includes inputting the horizontally adjacent pixels of all images processed in step S1 into the multi-layer suppression network for processing, and inputting the vertically adjacent pixels of all images processed in step S1 into the multi-layer suppression network for processing.
[0018] More preferably, the input multi-layer suppression network performs processing specifically as follows: input adjacent pixels are sequentially passed through multiple layers of the multi-layer suppression network until the background response is suppressed to a minimum.
[0019] More preferably, the number of layers of the multi-layer suppression network is set according to the suppression requirement of the background motion response.
[0020] Preferably, in the step S3, the result after the multi-layer suppression network processing is subjected to time sliding mean filtering to fill the internal texture of the foreground target. Specifically, each pixel of the result after the processing of step S2 is arranged in time sequence and the corresponding time window width is selected, so that the time window slides on the time series of a pixel, and the value in the time window is averaged as the output each time it slides.
[0021] More preferably, the standard deviation of the Gaussian filter is one sixth of the operator side length.
[0022] Preferably, in the step S1, the preprocessing specifically includes: using Gaussian filtering to preprocess the grayscale image.
[0023] Preferably, in step S1, obtaining the differential image data is specifically performed by subtracting two adjacent frames of images according to grayscale values to obtain the differential image data.
[0024] According to a second aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] 1) The present invention improves the traditional EMD model and constructs a multi-layer suppression network that can suppress background motion response according to the velocity gradient, thereby distinguishing foreground motion from background motion, making up for the fact that the traditional EMD model cannot extract foreground target motion in scenes where the foreground and background move simultaneously, thereby improving the precision and accuracy of target motion detection in complex scenes, and can be applied to unmanned driving, drone photography and other fields.
[0027] 2) The present invention adds a time-space smoothing network and a Gaussian filter after the multi-layer suppression network to fill and blur the internal texture of the foreground target respectively, eliminating the interference of the internal texture change of the target on the motion detection of the target itself. Therefore, when facing the feature changes caused by partial occlusion of the target, motion blur, brightness change, and change of the target's own morphological texture, the motion of the target itself can be accurately detected, further improving the accuracy of target motion detection.
[0028] 3) After processing the internal texture of the foreground target, the present invention uses the first layer of the multi-layer suppression network to further perform direction detection processing, thereby further improving the accuracy of target motion detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the image processing flow for detecting target motion based on a multi-layer inhibition network in the present invention;
[0030] Figure 2 It is a structural diagram of the existing traditional EMD model;
[0031] Figure 3 It is a schematic diagram of the structure of the multi-layer suppression network in the present invention;
[0032] Figure 4 It is a schematic diagram of time sliding mean filtering in the present invention;
[0033] Figure 5 Schematic diagram of spatial Gaussian filtering in the present invention;
[0034] In the attached figure, HP is a high-pass filter; LP is a low-pass filter; DC is direct current processing; L1 and L2 are positive and negative ramp functions, corresponding to different layers of cells in Drosophila, respectively; and M is multiplication. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] The invention is based on the traditional EMD model and constructs a multi-layer recursive inhibition network to improve the accuracy of target motion detection in complex motion scenes. The innovation of the invention is to use the structure of the lobule and lobule plate in the fruit fly visual system to construct a multi-layer recursive structure and a time-space smoothing network to enhance the accuracy of target motion detection in the traditional EMD in motion background scenes and high-order motion scenes.
[0037] Example 1
[0038] This embodiment relates to an image processing method for detecting target motion based on a multi-layer inhibition network. Figure 1 , the method comprising:
[0039] Step S1: grayscale the input image and use Gaussian filtering for preprocessing, and subtract the grayscale values of two adjacent frames of images to obtain differential image data.
[0040] Step S1 specifically includes:
[0041] Step S1-1: read the image frame by frame and convert the RGB image into a grayscale image;
[0042] Step S1-2: Use a Gaussian filter to preprocess the image, the Gaussian operator size is 12*12, and the standard deviation is 3.5;
[0043] Step S1-3: subtract the grayscale values of two adjacent frames of images to obtain differential image data.
[0044] Step S2: Improved EMD model, constructing a multi-layer suppression network, processing the result after the difference in step S1 until the background response is suppressed to a minimum, which is conducive to extracting the foreground target motion in the scene where the foreground and background move simultaneously.
[0045] The multi-layer inhibition network suppresses the background motion response according to the speed gradient. Specifically, the background motion response is suppressed according to the speed of the moving object. The background motion response of a fast object will be suppressed to 0 in one or two layers of EMD models, while the background motion response of a slow object requires several layers of EMD models to be suppressed to 0. This is because the suppression is not based on the exact value of the speed, but is discrete and equally spaced according to the number of EMD layers, that is, gradient suppression.
[0046] like Figure 3 , the multi-layer suppression network includes multi-layer EMD models. Except for the first layer, the EMD models of other layers are not subjected to high-pass filtering (HP) processing. Among them, the traditional EMD model is Figure 2 shown.
[0047] like Figure 2 and Figure 3 , step S2 specifically includes:
[0048] Step S2-1: The horizontally adjacent pixels of all images after the difference are processed by the first layer of the multi-layer inhibition network (same as the traditional EMD model) to obtain the EMD results of the horizontal pixels. Specifically, two horizontally adjacent pixels of the differenced image are used as inputs, and the inputs are respectively processed by direct current (DC) and noise reduction by high-pass filter (HP), and then added. The ON signal (increase in grayscale) and OFF signal (decrease in grayscale) in the difference data are separated by a ramp function. The positive and negative ramp functions correspond to different layer cells of Drosophila ( Figure 2 The ON signals of the two pixels are input to the left and right arms of one EMD unit, and the OFF signals are input to the left and right arms of another EMD unit. The left and right arms of the two EMD units are then delayed in time series using a low-pass filter (LP). In one EMD unit, the delayed left arm signal is multiplied by the undelayed right arm signal ( Figure 3 The delayed right arm signal is multiplied by the undelayed left arm signal, the signals of the two arms are subtracted to obtain the ON / OFF result, and the ON and OFF results are added to obtain the EMD result;
[0049] Step S2-2: input the result obtained in step S2-1 into other layers of the multi-layer suppression network (except the first layer, other layers no longer use high-pass filters for noise reduction) until the background response is suppressed to a minimum;
[0050] Step S2-3: Input the vertically adjacent pixels of all images after differentiation into a multi-layer suppression network and perform the same processing as the horizontally adjacent pixels until the background response is suppressed to a minimum.
[0051] Step S3: Use a sliding time window to slide through the results of the multi-layer inhibition network processing frame by frame, and perform mean processing on the sequence in the window to fill the internal texture of the foreground target and eliminate the interference of the internal texture change of the foreground target on the high-order motion detection of the target itself;
[0052] like Figure 4 , step S3 specifically includes:
[0053] Step S3-1: Arrange each pixel obtained in S2 in time sequence and select the corresponding time window width, so that the time window slides on the time sequence of a pixel, and the value in the time window is averaged as the output each time it slides;
[0054] Step S3-2: Repeat step S3-1 and perform the same process on each pixel.
[0055] Step S4: Input the result after processing in step S3 into a Gaussian filter with a suitable operator and standard deviation for processing. The standard deviation of the Gaussian filter is one sixth of the side length of the operator. Figure 5 ) The internal texture of the foreground target is blurred to facilitate the next step of extracting the motion information of the foreground target and further eliminate the interference of the internal texture change of the foreground target on the high-order motion detection of the target itself.
[0056] Step S5: Use the first layer of the multi-layer suppression network (same as the traditional EMD model) to process the result of step S4 to extract the outline and motion direction of the foreground target.
[0057] Compared with the classic EMD model, the present invention adopts more layers of classic EMD models to simulate the loop feedback structure of Drosophila T4 and T5 cells, thereby realizing the detection of moving targets in a dynamic background; a time-space smoothing network that simulates the neural firing process and the Drosophila receptive field structure is added to realize the detection of the real movement of the target in scenes containing high-order motion; and an additional direction detection layer (step S5) is added according to the functional characteristics of the Drosophila lobula tangential cells, thereby retaining the direction detection function of the classic EMD.
[0058] Example 2
[0059] This embodiment involves comparison with other motion detection algorithms.
[0060] The present invention is compared with the EMD leaflet network model proposed in 2023 and the 3D discrete wavelet algorithm proposed in 2019 in three practical scenarios, and the comparison results are shown in Table 1.
[0061] Table 1
[0062]
[0063] We use F-measure to measure the algorithm's ability to extract targets, and use PI to measure the algorithm's ability to suppress moving backgrounds. The calculation method of F-measure is 2TP / (2TP+FP+FN), where TP is true positive, FP is false positive, and FN is false negative; the calculation method of PI is the sum of all output values in the target area divided by the sum of all response values in the object and background areas.
[0064] It can be seen from the comparison results in Table 1 that the present invention is superior to the above two methods in terms of suppressing dynamic background and extracting targets in complex scenes.
[0065] Example 3
[0066] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0067] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.
[0068] The processing unit performs the various methods and processes described above, which are tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the CPU can be configured to perform the method in any other appropriate manner (e.g., by means of firmware).
[0069] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An image processing method for detecting target motion based on a multi-layer inhibition network. It is characterized in that The method comprises the following steps: Step S1, graying the input image and preprocessing it to obtain differential image data; Step S2, using a multi-layer suppression network improved based on the traditional EMD model to process the image processed in step S1; Step S3, performing temporal sliding mean filtering on the result after the multi-layer suppression network processing to fill the internal texture of the foreground target; Step S4, inputting the result processed in step S3 into a Gaussian filter for spatial filtering to blur the internal texture of the foreground object; Step S5, using the first layer of the multi-layer suppression network to process the result of step S4, extracting the outline and motion direction of the foreground target.
2. According to the image processing method for detecting target motion based on a multi-layer inhibition network according to claim 1, It is characterized in that The multi-layer suppression network includes a multi-layer EMD model, and high-pass filtering is performed only on the first layer of the multi-layer EMD model. The multi-layer EMD model suppresses background motion response according to the speed gradient, thereby distinguishing foreground motion from background motion.
3. According to claim 2, an image processing method for detecting target motion based on a multi-layer inhibition network, It is characterized in that In the step S2, the process of using the multi-layer suppression network improved based on the traditional EMD model to process the image processed in step S1 includes inputting the horizontally adjacent pixels of all images processed in step S1 into the multi-layer suppression network for processing, and inputting the vertically adjacent pixels of all images processed in step S1 into the multi-layer suppression network for processing.
4. According to claim 3, an image processing method for detecting target motion based on a multi-layer inhibition network, It is characterized in that The input multi-layer suppression network is processed specifically as follows: the input adjacent pixels are sequentially passed through multiple layers of the multi-layer suppression network until the background response is suppressed to a minimum.
5. According to the image processing method for detecting target motion based on a multi-layer inhibition network according to claim 4, It is characterized in that The number of layers of the multi-layer inhibition network is set according to the inhibition requirements of the background motion response.
6. The image processing method for detecting target motion based on a multi-layer inhibition network according to claim 1, It is characterized in that In the step S3, the result after the multi-layer inhibition network processing is subjected to time sliding mean filtering to fill the internal texture of the foreground target. Specifically, each pixel of the result after the processing of step S2 is arranged in time sequence and the corresponding time window width is selected, so that the time window slides on the time series of a pixel, and the value in the time window is averaged as the output each time it slides.
7. The image processing method for detecting target motion based on a multi-layer inhibition network according to claim 1, It is characterized in that The standard deviation of the Gaussian filter is one sixth of the side length of the operator.
8. The image processing method for detecting target motion based on a multi-layer inhibition network according to claim 1, It is characterized in that In the step S1, the preprocessing specifically includes: using Gaussian filtering to preprocess the grayscale image.
9. The image processing method for detecting target motion based on a multi-layer inhibition network according to claim 1, It is characterized in that In the step S1, the differential image data is obtained by performing a grayscale value difference on two adjacent frames of images to obtain the differential image data.
10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory. It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Optical flow-based target detection method based on compound eye vision enlightenment
CN114648558A
Bionic target contour extraction algorithm based on deep learning
CN114972787A
Rapid shake detection using a cascade of quad-tree motion detectors
US20150146022A1
Detection method and device for video monitoring fire
WO2023000949A1
