Motion detection system and method
Patent Information
- Application Number
- CN202210283857.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-03-22
- Filing Date
- 2022-03-22
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-03-22
AI Technical Summary
该问题对它们在运动检测中的使用提出了挑战
Smart Images

Figure CN115115673B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a motion detection method and a motion detection system.
[0002] Cross-reference to related applications
[0003] This application claims the benefit of U.S. Provisional Application No. 63 / 164,111, filed March 22, 2021, the entire contents of which are incorporated herein by reference. Background Technology
[0004] Motion detection is a critical step in security / surveillance systems and must detect events of interest / importance without triggering false positives. Surveillance systems detect motion by computing "feature descriptors" of video frames. Feature descriptors detect changes in the signal over time during a sequence of video frames. Among the most widely used feature descriptors are Scale Invariant Feature Transform (SIFT), Speed-Up Robust Feature Transform (SURF), and Histogram of Oriented Gradients (HOG).
[0005] These descriptors use sample gradients, as is the case with other computer vision analysis methods, such as AI-based methods. A gradient represents the direction and magnitude of the change in sample value at each sample location on each video frame. The direction of the sample gradient indicates the direction of the sample change. The length of the sample gradient indicates the magnitude of the sample change. Gradients increase along object edges and decrease in flat regions. They can provide unique visual features for each frame.
[0006] Conventional gradient-based feature descriptors (including SIFT, SURF, and HOG) sometimes suffer from poor SNR in smooth regions, leading to increased false detections. This problem typically arises when objects perform translational motion in dark or dimly lit scenes. This issue challenges their use in motion detection. Summary of the Invention
[0007] An image or frame is an array of pixel values, where each pixel value is generated or derived from a corresponding pixel in the pixel array. The pixel array is part of an image sensor located at the camera's focal plane. The array of pixel values can be divided into subarrays of motion detection regions or pixel coordinates. Each pixel coordinate is associated with a corresponding pixel value. A feature descriptor can be defined for each motion detection region of the image. For each motion detection region, the feature descriptor value can be a function of the gradient of the pixel values of each pixel in that motion detection region. For a motion detection region with N pixel coordinates, the general form of the function is... in It is the pixel value gradient at the pixel coordinates indexed by k. The embodiments disclosed herein solve the problems of conventional gradient-based feature descriptors by incorporating location information and gradient values into the feature descriptor.
[0008] This invention provides a motion detection method and a motion detection system.
[0009] In a first aspect, a motion detection method includes: for a motion detection region in a first image of a scene, (i) determining a corresponding first pixel value gradient at each of a plurality of pixel coordinates within the motion detection region, and (ii) determining a first feature descriptor value based on the first pixel value gradient and a position vector defined by the plurality of pixel coordinates. The method further includes, for a motion detection region in a second image of the scene, (i) determining a corresponding second pixel value gradient at each of the plurality of pixel coordinates, and (ii) determining a second feature descriptor value based on the second pixel value gradient and the position vector. The method further includes determining a difference parameter that varies in a direct relationship with the difference between the first and second feature descriptor values.
[0010] In some embodiments, the method further includes outputting a motion detection signal when the difference parameter exceeds a threshold.
[0011] In some embodiments, the method includes: for the first image, determining a first weighted sum position vector by the following steps: (a) for each of the plurality of pixel coordinates, determining a corresponding first weighted position vector, the first weighted position vector being equal to (i) a position vector defined by the coordinates and (ii) a first function of the magnitude of the gradient of the first pixel value at the coordinates; and (b) when the first feature descriptor value is determined, summing the first weighted position vectors to produce the first weighted sum position vector; for the second image, determining a second weighted sum position vector by the following steps: (a) for each of the plurality of pixel coordinates, determining a corresponding second weighted position vector, the second weighted position vector being equal to (i) a position vector defined by the coordinates and (ii) a first function of the magnitude of the gradient of the second pixel value at the coordinates; and (b) when the second feature descriptor value is determined, summing the second weighted position vectors to produce the second weighted sum position vector; and determining a difference parameter from the first weighted sum position vector and the second weighted sum position vector such that the difference parameter varies in a direct relationship with the difference between the first weighted sum position vector and the second weighted sum position vector.
[0012] In some embodiments, when the first weighted sum position vector is determined, the first function is a monotonically increasing function of the product of the position vector and the magnitude of the gradient of the first pixel value; when the second weighted sum position vector is determined, the first function is a monotonically increasing function of the product of the position vector and the magnitude of the gradient of the second pixel value.
[0013] In some embodiments, the monotonically increasing function is the product of (i) a first monotonically increasing function of one of the gradients of the first pixel value and the second pixel value, and (ii) a second monotonically increasing function of the position vector.
[0014] In some embodiments, the difference parameter is a monotonically increasing function of the difference.
[0015] In some embodiments, the difference parameter is a monotonically increasing function of the square of the difference.
[0016] In some embodiments, the method further includes capturing each of the first image and the second image separately.
[0017] In some embodiments, non-simultaneous capture includes: capturing the first image and the second image non-simultaneously from the same advantageous location.
[0018] In some embodiments, the method further includes: for a motion detection region in a third image of the scene, (i) determining a corresponding third pixel value gradient at each of a plurality of pixel coordinates, and (ii) determining a third feature descriptor value based on the third pixel value gradient and the position vector; determining an additional difference parameter, the additional difference parameter varying in a direct relationship with the difference between one of the first feature descriptor value and the second feature descriptor value and the third feature descriptor value; and outputting a motion detection signal when at least one of the following is satisfied: (i) the difference parameter exceeds a threshold, (ii) the additional difference parameter exceeds a first additional threshold, and (iii) the quotient of the difference parameter and the additional difference parameter exceeds a second additional threshold.
[0019] In some embodiments, the method further includes: for each of a plurality of additional images of the scene, determining a corresponding additional difference parameter by the following steps: (i) determining an additional pixel value gradient at each of a plurality of pixel coordinates of a motion detection region in the additional image, and (ii) determining an additional feature descriptor value based on the additional pixel value gradient and the position vector; determining an additional difference parameter that varies in a direct relationship with the difference between (i) the first feature descriptor value and (ii) the additional feature descriptor value; and outputting a motion detection signal when at least one of the following is satisfied: (a) the difference parameter and a function of each of the additional difference parameters exceed a threshold, and (b) the difference parameter exceeds a threshold and each of the additional difference parameters exceeds a corresponding additional threshold.
[0020] In some embodiments, the function is one of the mean, the reciprocal of the variance, the maximum value, the minimum value, and the quotient of the minimum value and the maximum value.
[0021] In some embodiments, the method further includes: repeating the above steps for additional motion detection regions in the first image and the second image to generate additional first feature descriptor values, additional second feature descriptor values, and additional difference parameters between the additional first feature descriptor values and the additional second feature descriptor values; and outputting a motion detection signal when (i) the difference parameter exceeds a threshold and (ii) the additional difference parameter exceeds an additional threshold.
[0022] In some embodiments, for each pixel coordinate in the first image, each first pixel value gradient is a function of the pixel value at the coordinate and the pixel values at the adjacent pixel coordinates; for each pixel coordinate in the second image, each second pixel value gradient is a function of the pixel value at the coordinate and the pixel values at the adjacent pixel coordinates.
[0023] In a second aspect, a motion detection system includes circuitry that performs the method of the first aspect.
[0024] In some embodiments, the circuit includes one of an application-specific integrated circuit (ASIC) and a field-programmable gate array (FPGA).
[0025] In some embodiments, the circuit includes: a processor; and a memory storing a first image and a second image of the scene, and machine-readable instructions that, when executed by the processor, control the processor to perform the method of the first aspect.
[0026] In some embodiments, the motion detection system further includes an image sensor communicatively coupled to the circuitry to record the first image and the second image.
[0027] In some embodiments, the motion detection system further includes a camera, which includes the image sensor and captures the first image and the second image.
[0028] In a third aspect, a non-transitory computer-readable medium stores instructions that, when executed by a processor, cause the processor to perform the method of the first aspect. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of a camera that images a scene.
[0030] Figure 2 yes Figure 1 A diagram showing images captured by the camera at different times.
[0031] Figure 3 It is configured to detect in the embodiment. Figure 2 A schematic diagram of a motion detection system for motion in an image.
[0032] Figure 4 This is a flowchart illustrating the motion detection method in the embodiment.
[0033] Figure 5 Includes annotated images illustrating the benefits of motion detection systems and methods compared to conventional motion detection methods. Detailed Implementation
[0034] Figure 1 This is a schematic diagram of a camera 102 imaging scene 180. Camera 102 may be a security camera and includes an image sensor 110. Image sensor 110 is communicatively coupled to a motion detection system 100, which in an embodiment includes at least one of the image sensor 110 and the camera 102. In an embodiment, motion detection system 100 is part of image sensor 110.
[0035] Figure 2 It is a schematic diagram of images 280(1) and 280(2) of scene 180 captured by camera 102 at corresponding times T and (T–δT), such that image 280(2) is captured before image 280(1). Figure 3 This is a schematic diagram of a motion detection system 300, which is an example of a motion detection system 100 and can be communicatively coupled to an image sensor 110. It is best to view this together in the following description. Figure 2 and Figure 3 .
[0036] The motion detection system 300 includes circuitry 302 that implements the functions of the motion detection system 300. In one embodiment, circuitry 302 includes a processor 306 and a memory 308. The memory 308 stores an image 280 and software 330. The software 330 includes machine-readable instructions that are executed by the processor 306 to implement the functions of the motion detection system 300. The software 330 includes a gradient calculator 332, a feature descriptor calculator 334, a subtractor 336, and a comparator 338.
[0037] In embodiments, circuit 302 is or includes (e.g., as processor 306) an integrated circuit, such as an application-specific integrated circuit (ASIC) and a field-programmable gate array (FPGA). In such embodiments, circuit 302 may include memory 308, wherein memory 308 does not include software 330. More precisely, the integrated circuit performs the functions of software 330, such as the functions of gradient calculator 332, feature descriptor calculator 334, subtractor 336, and comparator 338 described herein.
[0038] The memory 308 may be temporary and / or non-temporary, and may include one or both of volatile memory (e.g., SRAM, DRAM, computational RAM, other volatile memory or any combination thereof) and non-volatile memory (e.g., FLASH, ROM, magnetic media, optical media, other non-volatile memory or any combination thereof). Some or all of the memory 308 may be integrated into the processor 306.
[0039] Image sensor 110 includes pixel array 112 and circuitry 114, which may include circuitry 302. In an example operating mode, pixel array 112 generates signals from an image formed by the optics of camera 102. Circuitry 114 is communicatively coupled to pixel array 112 and outputs a plurality of pixel values representing the signals, which are stored in memory 308 as images 280(1) and 280(2). Images 280(1) and 280(2) may be continuous or non-continuous images captured by camera 102.
[0040] Each of the images 280 includes a motion detection region 289, which comprises N pixel coordinates 281(1,2,...,N), also referred to below as pixel coordinates 281(1-N) and pixel coordinates 281. Two of these coordinates are pixel coordinates 281(1) and 281(2). The shape formed by the multiple pixel coordinates determines the shape of the motion detection region 289. This shape can be polygonal, such as triangular, hexagonal, or similar. Figure 2 The example is a rectangle. Memory 308 can store pixel coordinates 281, which can be stored as metadata for one or more images 280.
[0041] Pixel coordinates 281(1) and 281(2) define the corresponding position vectors. and At pixel coordinate 281(1), images 280(1) and 280(2) have corresponding pixel gradients 284(1,1) and 284(2,1), where the first number in parentheses represents the index of image 280, and the second number represents the index of pixel coordinate 281. Similarly, at pixel coordinate 281(2), images 280(1) and 280(2) have corresponding pixel gradients 284(1,2) and 284(2,2).
[0042] In image 280, the pixel value gradient 284 at (x1, y1) is a function of the pixel value at (x1, y1) and the pixel values at adjacent pixel coordinates. Similarly, the pixel value gradient 284 at (x2, y2) is a function of the pixel value at (x2, y2) and the pixel values at adjacent pixel coordinates.
[0043] For each pixel coordinate 281(k) in the motion detection region 289 of image 280(1), gradient calculator 332 determines the corresponding pixel value gradient 284(1,k) of image 280(1). Similarly, for each pixel coordinate 281(k) in the motion detection region 289 of image 280(2), gradient calculator 332 determines the corresponding pixel value gradient 284(2,k) of image 280(2). When memory 308 stores additional images 280 (m≥3), gradient calculator 332 can determine the corresponding set of pixel value gradients 284(m,1–N).
[0044] Each image 280 includes an image of an object 286 in scene 180. The image of object 286 has an edge 287. In image 280(1), the edge 287 is located at pixel coordinate 281(1), while at pixel coordinate 281(2), there is no image of the object edge, or an image of any other feature associated with a large pixel value gradient. Therefore, the magnitude of pixel gradient 284(1,1) The magnitude of the pixel gradient 284(1,2) is greater than Between time (T–δT) and T, object 286 moves such that in image 280(2), object edge 287 is located at pixel coordinate 281(2), while at pixel coordinate 281(1), there is no image of object edge, or image of other features associated with large pixel value gradient.
[0045] Assuming the background in scene 180 is uniform, gradient 284(2,2) equals gradient 284(1,1). Therefore, a feature descriptor that only considers the pixel value gradient within the motion detection region 289 will have the same value in both images 280(1) and 280(2), even though motion has occurred in scene 180 between the capture of these images. A motion detection system relying on such a feature descriptor will not detect this motion. Mathematically, the feature descriptor of the motion detection region 289 can be expressed as... Equation (1) is given below, where It is the pixel value gradient. The function is defined such that each pixel coordinate is indexed by the corresponding integer value of index k.
[0046] In the motion detection system 300, the feature descriptor calculator 334 generates feature descriptor values 344 from pixel value coordinates 281 and pixel value gradients 284. Since the feature descriptor calculator 334 takes into account both the pixel value gradient and its associated pixel coordinates, the motion detection system 300 detects motion of object 286 occurring between captured images 280(1) and 280(2).
[0047] The feature descriptor value 344 can be represented as a vector. In an embodiment, Equation (2) is given below. Without departing from the scope of the embodiments presented herein, the feature descriptor value 344 may be a scalar. In the embodiments, function f1 is a multiplicatively separable function: in and Each of them can be a monotonically increasing function of their corresponding variable (argument, or parameter).
[0048] More generally, the function f1 includes two separate variables, the gradient and the gradient. and position vector In the embodiment, function f1 has a position vector therein. Multiply by (weighted) pixel value gradient amplitude g k The form of this makes the pixel value gradient and pixel coordinates form a single variable function f1: The function f1 may be a monotonically increasing function of its variables. In such an embodiment, the feature descriptor value 344 can be expressed as a weighted sum of position vectors: Equation (3) is used in the following text.
[0049] In this embodiment, function f1 is an identity function such that the feature descriptor is a weighted sum of position vectors: Equation (4) is given below. In this example, the vector component (D) x Dy ) is the weighted sum of the corresponding pixel coordinates: D x =(g1x1+g2x2+...+g N x N ) and D y =(g1y1+g2y2+...+g N y N In an embodiment, the feature descriptor calculator 334 generates the feature descriptor value 344 at least in part by implementing one of equations (2), (3) and (4).
[0050] Subtractor 336 outputs a difference parameter 346(1) based on descriptor values 344(1) and 344(2). The difference parameter 346(1) changes in a direct relationship with the difference between the feature descriptor values 344(1) and 344(2). That is, difference parameter 346(1) (a) increases as the difference increases, and (b) decreases as the difference decreases. Subtractor 336 may also output an additional difference parameter 346 (m≥2) based on a pair of descriptor values 344, wherein the additional difference parameter 346 changes in a direct relationship with the difference between the pair of feature descriptor values 344 used to generate it.
[0051] Since images 280(1) and 280(2) are captured at corresponding times T and (T–δT), the corresponding feature descriptor values 344(1) and 344(2) can be expressed as and The difference parameter 346(1) can be expressed as and Functions of both: Equation (5) is given below. More generally, the difference parameter 346 can be proportional to the power of the function f2, for example...
[0052] The function f2 can be a monotonically increasing function of its variables, such as the feature descriptor values. and The difference between them is a monotonically increasing function. For example, the function f2 can be expressed by equation (6).
[0053]
[0054] The memory 308 stores a threshold 321 that determines the sensitivity of the motion detection system 300. When the difference parameter 346 exceeds the threshold 321, the comparator 338 outputs a motion detection signal 348.
[0055] In an embodiment, motion detection system 300 determines the presence of motion in scene 180 based on additional difference parameters 346 determined from additional image 280. In a first example, motion detection system 300 determines one additional difference parameter 346 (2) from image 280 (3). In a second example, motion detection system 300 determines multiple additional difference parameters 346 (m≥3) from image 280 (m≥3).
[0056] In the first example, memory 308 stores the image 280(3) captured at (T–δT′), and gradient calculator 332 outputs pixel value gradient 284(3, 1–N). The time interval δT′ can exceed the time interval δT, making the image 280(1–3) temporally continuous. Feature descriptor calculator 334 outputs feature descriptor value 344(3) from pixel value gradient 284(3, 1–N) and pixel value coordinate 281(1–N). Feature descriptor value 344(3) can be expressed as
[0057] Subtractor 336 determines the difference parameter 346(2) from feature descriptor values 344(1) and 344(3). For example, the difference parameter Equation (7) is given below. In equation (7), the function f2 can have the form of equation (6), where δT′ replaces δT, as shown in equation (8).
[0058]
[0059] The motion detection system 300 can determine the presence of motion by evaluating both difference parameters 346(1) and 346(2). Without departing from the scope of the invention, the subtractor 336 can determine the difference parameter 346(2) from the feature descriptor values 344(2) and 344(3) instead of from the descriptor values 344(1) and 344(3).
[0060] In this first example, comparator 338 may output motion detection signal 348 when at least one of the following three conditions is met, at least two of the following three conditions are met, or all three of the following three conditions are met: The first condition is that the difference parameter 346(1) exceeds threshold 321. The second condition is that the difference parameter 346(2) exceeds threshold 322 stored in memory 308. The third condition is that a function of the difference parameters 346(1) and 346(2) (e.g., the ratio of the difference parameters) exceeds threshold 323 stored in memory 308.
[0061] In the second example, memory 308 stores images 280(1,2) and images 280(3-M), which were captured at corresponding times before (T–δT), where M≥3. Images 280(3-M) can be sequential in time or sequential in time. The number of images 280(3-M) is (M-2), for example, when M=5, images 280(3-M) represent images 280(3), 280(4), and 280(5).
[0062] The gradient calculator 332 outputs M groups of N pixel value gradients 284(1, 1–N), 284(2, 1–N), ..., 284(M, 1–N). For each of the M images 280, the feature descriptor calculator 334 outputs the corresponding feature descriptor value 344(m) from the pixel value gradient 284(m, 1–N) and the pixel value coordinates 281(1–N).
[0063] For each pair of temporally consecutive feature descriptor values 344 (corresponding to a pair of temporally consecutive images 280), the subtractor 336 determines the corresponding difference parameter 346. Therefore, for M feature descriptor values 344, the subtractor 336 determines (M-1) difference parameters 346 (1,2,...,M-1).
[0064] The comparator 338 may output a motion detection signal 348 when one or both of the following two conditions are met: (a) a function of the difference parameters 346(1,2,...,M-1) exceeds a threshold 321; and (b) each of the difference parameters 346(1,2,...,M-1) exceeds a corresponding one of a plurality of thresholds 324(1,2,...,M-1) stored in memory 308. The function may be one of the following, where the variables of the function are the difference parameters 346(1,2,...,M-1): mean, reciprocal of variance, maximum value, minimum value, and the quotient of the minimum and maximum values. The thresholds 324 may include at least one of thresholds 321, 322, and 323.
[0065] Figure 4 This is a flowchart illustrating a motion detection method 400. In an embodiment, processor 306 implements motion detection method 400 by executing computer-readable instructions of software 330. Method 400 includes steps 410, 420, and 460. Method 400 may also include at least one of steps 402, 430, 440, 472, 473, and 474. The following description of method 400 relates to a motion detection region of the scene. Method 400 may be performed on additional motion detection regions of the scene.
[0066] Step 402 includes capturing a first and a second image of the scene non-simultaneously. In the example of step 402, camera 102 captures images 280(1) and 280(2). Camera 102 can capture any number of images 280 from the same vantage point, such that the difference between any two images 280 is caused by changes in the scene 180, rather than by camera motion.
[0067] Step 410 includes, for a motion detection region in a first image of the scene, (i) determining a corresponding first pixel value gradient at each of a plurality of pixel coordinates within the motion detection region, and (ii) determining a first feature descriptor value based on the first pixel value gradient and a position vector defined by the plurality of pixel coordinates. In an example of step 410, gradient calculator 332 determines pixel value gradient 284(1, 1–N) from motion detection region 289 of image 280(1). Also in this example, feature descriptor calculator 334 determines feature descriptor value 344(1) based on pixel value gradient 284(1, 1–N) and pixel coordinate 281.
[0068] Step 410 may include step 412. Step 412 includes, for the first image, determining a first weighted sum position vector by the following steps: for each of a plurality of pixel coordinates, determining a corresponding first weighted position vector, the first weighted position vector being equal to (i) a position vector defined by that coordinate and (ii) a first function of the magnitude of the gradient of a first pixel value at that coordinate. Step 412 also includes, when determining the first feature descriptor value, summing the first weighted position vector to produce the first weighted sum position vector. In the example of step 412, the feature descriptor calculator 334 determines the feature descriptor value 344 (1) at least in part by implementing one of equations (3) and (4) to produce the weighted sum position vector. In function f1, each gradient vector It is the corresponding pixel value gradient 284(1, 1–N), and each vector It is the corresponding vector defined by pixel coordinate 281.
[0069] Step 420 includes, for a motion detection region in a second image of the scene, (i) determining a corresponding second pixel value gradient at each of a plurality of pixel coordinates, and (ii) determining a second feature descriptor value based on the second pixel value gradient and the position vector. In an example of step 420, gradient calculator 332 determines pixel value gradient 284(2, 1–N) from motion detection region 289 of image 280(2). Also in this example, feature descriptor calculator 334 determines feature descriptor value 344(2) based on pixel value gradient 284(2, 1–N) and pixel coordinate 281.
[0070] Step 420 may include step 422. Step 422 includes, for the second image, determining a second weighted sum position vector by the following steps: (a) for each of a plurality of pixel coordinates, determining a corresponding second weighted position vector, the second weighted position vector being equal to a first function of (i) a position vector defined by that coordinate and (ii) the magnitude of the gradient of the second pixel value at that coordinate; and (b) when determining the second feature descriptor value, summing the second weighted position vector to produce the second weighted sum position vector. In the example of step 422, the feature descriptor calculator 334 determines the feature descriptor value 344 (2) at least in part by implementing one of equations (3) and (4) to produce the weighted sum position vector. In function f1, each gradient vector It is the corresponding pixel value gradient 284(2,1–N), and each vector It is the corresponding vector defined by pixel coordinate 281.
[0071] Step 430 includes, for a motion detection region in a third image of the scene, (i) determining the corresponding third pixel value gradient at each of a plurality of pixel coordinates, and (ii) determining a third feature descriptor value based on the third pixel value gradient and the position vector. In an example of step 430, gradient calculator 332 determines pixel value gradient 284(3,1–N) from motion detection region 289 of image 280(3). Also in this example, feature descriptor calculator 334 determines feature descriptor value 344(3) based on pixel value gradient 284(3,1–N) and pixel coordinate 281.
[0072] Step 430 may include step 432, which is equivalent to step 422 applied to the third image instead of the second image. In the example of step 432, the feature descriptor calculator 334 determines the feature descriptor value 344(3) at least in part by implementing one of equations (3) and (4), where in the function f1, each gradient vector It is the corresponding pixel value gradient 284(3,1–N), and each vector It is the corresponding vector defined by pixel coordinate 281.
[0073] Step 440 includes, for each of a plurality of additional images of the scene, (i) determining an additional pixel value gradient at each of a plurality of pixel coordinates of a motion detection region in the additional image, and (ii) determining an additional feature descriptor value based on the additional pixel value gradient and the position vector. In an example of step 440, for each of images 280(m), where m = {2, 3, ..., M}, (i) gradient calculator 332 determines pixel value gradient 284(m, 1–N) from motion detection region 289 of image 280(m). Also in this example, feature descriptor calculator 334 determines feature descriptor value 344(m) based on pixel value gradient 284(m, 1–N) and pixel coordinate 281.
[0074] Step 440 may include step 442, which is equivalent to step 422 applied to the m-th image instead of the second image. In the example of step 442, for each image 280 (m = 3, 4, ..., M), the feature descriptor calculator 334 determines the corresponding feature descriptor value 344(m) at least in part by implementing one of equations (3) and (4), where in the function f1, each gradient vector It is the corresponding pixel value gradient 284(m, 1–N), and each vector It is the corresponding vector defined by pixel coordinate 281.
[0075] Step 460 includes determining a difference parameter that varies in a direct relationship to the difference between the first feature descriptor value and the second feature descriptor value. In a first example of step 460, subtractor 336 determines difference parameter 346(1). Step 460 may include step 463, for example, when method 400 includes step 430. In an example of step 463, subtractor 336 determines difference parameters 346(1) and 346(2). Step 460 may include step 464, for example, when method 400 includes step 440. In an example of step 464, when method 400 includes step 430, subtractor 336 determines difference parameters 346(1), 346(2), and difference parameter 346(3,4,...,M-1).
[0076] When method 400 includes steps 412 and 422, step 460 may include step 462. Step 462 includes determining a difference parameter from a first weighted sum position vector and a second weighted sum position vector, such that the difference parameter varies in a direct relationship with the difference between the first weighted sum position vector and the second weighted sum position vector. In an example of step 462, subtractor 336 determines difference parameter 346(1) from the first weighted sum position vector and the second weighted sum position vector determined by equation (3) or (4) (as described in the example above in step 412).
[0077] When method 400 includes both steps 412 and 432, step 460 may include, as part of step 463, determining additional difference parameters from the first weighted sum position vector and the third weighted sum position vector. When step 440 includes step 442, step 460 may include (as part of step 464) determining each additional difference parameter 346 (m = 2, 3, ..., M-1) from the first weighted sum position vector and the corresponding additional weighted sum position vector determined in step 442 from the pixel value gradient 284(m).
[0078] Each of steps 472, 473, and 474 includes outputting a motion detection signal. In an embodiment, method 400 does not include steps 430 and 440, and includes step 472. In an embodiment, method 400 includes each of steps 430, 463, and 473. In an embodiment, method 400 includes each of steps 440, 464, and 474.
[0079] Step 472 includes outputting a motion detection signal when the difference parameter exceeds a threshold. In an example of step 472, when the difference parameter 346(1) exceeds the threshold 321, the comparator 338 outputs a motion detection signal 348.
[0080] Step 473 includes outputting a motion detection signal when at least one of the following conditions is met: (i) the difference parameter exceeds a threshold, (ii) the additional difference parameter exceeds a first additional threshold, and (iii) the quotient of the difference parameter and the additional difference parameter exceeds a second additional threshold. In an example of step 473, comparator 338 outputs motion detection signal 348 when at least one of the following conditions is met: (i) the difference parameter 346(1) exceeds threshold 321, (ii) the difference parameter 346(2) exceeds threshold 322, and (iii) the quotient of the difference parameter 346(1) and the difference parameter 346(2) exceeds threshold 323.
[0081] Step 474 includes outputting a motion detection signal when at least one of the following conditions is met: (a) the function of the difference parameter and each additional difference parameter exceeds a threshold, and (b) the difference parameter exceeds a threshold and each additional difference parameter exceeds a corresponding additional threshold. In the example of step 473, comparator 338 outputs motion detection signal 348 when at least one of the following conditions is met: (a) the function of the difference parameter 346(1,2,...,M-1) exceeds one of thresholds 321–323, and (b) for each of m = 1,2,...,(M-1), the difference parameter 346(m) exceeds threshold 324(m).
[0082] Figure 5Images 510 and 520, including annotations, illustrate the benefits of motion detection system 300 and method 400 compared to conventional motion detection methods. Annotated images 510 and 520 include corresponding annotations for the same image of a poorly lit scene of a person walking in scene region 502. The annotation for image 510 was generated using a HOG feature descriptor. The annotation for image 520 was generated using a feature descriptor used by motion detection system 300 and method 400 that depends on both pixel value gradients and pixel value coordinates.
[0083] The motion indicators in the annotated images 510 and 520 are represented by white diamonds. In scene area 502, the annotated images 510 and 520 include true positive motion indicators 512 and 522, respectively. The true positive motion indicators 522 are more numerous than the motion indicators 512 and more clearly reveal human movement. Indicators 522 correspond to the human head, torso, and feet, while indicators 512 are relatively few and not included at the torso or legs.
[0084] The annotated image 510 includes false positives 514 that are not present in the annotated image 520. Although both annotated images 510 and 520 include corresponding false positive indicators 516 and 526 in the same image region, the number of false positive indicators 526 is significantly lower than the number of false positive indicators 516.
[0085] Feature combination
[0086] The features described above and those in the following claims can be combined in various ways without departing from the scope of the invention. The following examples illustrate some possible, non-limiting combinations:
[0087] (A1) A motion detection method, comprising, for a motion detection region in a first image of a scene, (i) determining a corresponding first pixel value gradient at each of a plurality of pixel coordinates within the motion detection region, and (ii) determining a first feature descriptor value based on the first pixel value gradient and a position vector defined by the plurality of pixel coordinates. The method further comprises, for a motion detection region in a second image of the scene, (i) determining a corresponding second pixel value gradient at each of the plurality of pixel coordinates, and (ii) determining a second feature descriptor value based on the second pixel value gradient and the position vector. The method further comprises determining a difference parameter that varies in a direct relationship with the difference between the first feature descriptor value and the second feature descriptor value.
[0088] An embodiment of method (A1) (A2) further includes the method comprising outputting a motion detection signal when the difference parameter exceeds a threshold.
[0089] (A3) In an embodiment of either method (A1) or (A2), the method includes, for a first image, determining a first weighted sum position vector by the following steps: (a) for each of a plurality of pixel coordinates, determining a corresponding first weighted position vector, the first weighted position vector being equal to (i) a position vector defined by that coordinate and (ii) a first function of the magnitude of the gradient of a first pixel value at that coordinate; and (b) when a first feature descriptor value is determined, summing the first weighted position vectors to produce a first weighted sum position vector; for a second image, determining a first weighted sum position vector by the following steps: Two weighted sum position vectors: (a) for each of a plurality of pixel coordinates, determine a corresponding second weighted position vector, the second weighted position vector being equal to (i) a position vector defined by that coordinate and (ii) a first function of the magnitude of the gradient of the second pixel value at that coordinate; and (b) when determining the second feature descriptor value, sum the second weighted position vectors to produce a second weighted sum position vector; and determine a difference parameter from the first weighted sum position vector and the second weighted sum position vector such that the difference parameter varies in a direct relationship with the difference between the first weighted sum position vector and the second weighted sum position vector.
[0090] (A4) In any of the embodiments of methods (A1)–(A3), when the first weighted sum position vector is determined, the first function is a monotonically increasing function of the product of the position vector and the magnitude of the gradient of the first pixel value; when the second weighted sum position vector is determined, the first function is a monotonically increasing function of the product of the position vector and the magnitude of the gradient of the second pixel value.
[0091] (A5) In an embodiment of method (A4), the monotonically increasing function is the product of (i) a first monotonically increasing function of one of the gradients of the first and second pixel values and (ii) a second monotonically increasing function of the position vector.
[0092] (A6) In any of the embodiments of methods (A3)–(A5), the difference parameter is a monotonically increasing function of the difference.
[0093] (A7) In any of the embodiments of methods (A3)–(A6), the difference parameter is a monotonically increasing function of the square of the difference.
[0094] (A8) An embodiment of any of the methods (A1)–(A7) further includes the method comprising capturing the first image and the second image not simultaneously.
[0095] (A9) In an embodiment of method (A8), non-simultaneous capture includes capturing a first image and a second image non-simultaneously from the same advantageous position.
[0096] An embodiment of any of methods (A1)–(A9) (A10) further includes, for a motion detection region in a third image of the scene, (i) determining a corresponding third pixel value gradient at each of a plurality of pixel coordinates, and (ii) determining a third feature descriptor value based on the third pixel value gradient and the position vector. Such embodiments further include determining an additional difference parameter that varies directly with respect to the difference between a first feature descriptor value and a third feature descriptor value, one of the first and second feature descriptor values. Such embodiments further include outputting a motion detection signal when at least one of the following is satisfied: (i) the difference parameter exceeds a threshold, (ii) the additional difference parameter exceeds a first additional threshold, and (iii) the quotient of the difference parameter and the additional difference parameter exceeds a second additional threshold.
[0097] An embodiment of any of the methods (A1)–(A10) further includes, for each of the plurality of additional images of the scene, determining a corresponding additional difference parameter by the following steps: outputting a motion detection signal when at least one of the following conditions is met: (a) the difference parameter and the function of each additional difference parameter exceed a threshold, and (b) the difference parameter exceeds a threshold and each additional difference parameter exceeds a corresponding additional threshold.
[0098] (A12) In an embodiment of method (A11), the function is one of the mean, the reciprocal of the variance, the maximum value, the minimum value, and the quotient of the minimum and the maximum value.
[0099] (A13) An embodiment of any one of methods (A1)–(A12) further includes the method comprising repeating the steps of method (A1) for additional motion detection regions in the first image and the second image to generate additional first feature descriptor values, additional second feature descriptor values, and additional difference parameters between the additional first feature descriptor values and the additional second feature descriptor values; and outputting a motion detection signal when both of the following conditions are met: (i) the difference parameter exceeds a threshold and (ii) the additional difference parameter exceeds an additional threshold.
[0100] (A14) In any of the embodiments of methods (A1)–(A13), for each pixel coordinate in the first image, each first pixel value gradient is a function of the pixel value at that coordinate and the pixel value at the adjacent pixel coordinate; for each pixel coordinate in the second image, each second pixel value gradient is a function of the pixel value at that coordinate and the pixel value at the adjacent pixel coordinate.
[0101] (A15) In any of the embodiments of methods (A1)–(A14), the motion detection region includes a plurality of pixel coordinates.
[0102] (B1) A motion detection system comprising circuitry for performing any one of methods (A1)–(A15).
[0103] (B2) In an embodiment of the motion detection system (B1), the circuitry includes one of an application-specific integrated circuit (ASIC) and a field-programmable gate array (FPGA).
[0104] (B3) In any embodiment of the motion detection system (B1) and (B2), the circuitry includes a processor and a memory, the memory storing a first image and a second image of the scene, as well as machine-readable instructions. When executed by the processor, the machine-readable instructions cause the processor to perform the method of any of embodiments (A1)–(A15).
[0105] (B4) Embodiments of any of the motion detection systems (B1)–(B3) further include an image sensor communicatively coupled to the circuitry to record a first image and a second image.
[0106] Any of the embodiments in (B5)(B1)–(B4) further includes a camera, which includes an image sensor and captures a first image and a second image.
[0107] (C1) A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform the method of embodiment (A1).
[0108] Modifications to the above methods and systems may be made without departing from the scope of the embodiments of the present invention. Therefore, it should be noted that the content contained in the above specification or shown in the accompanying drawings should be understood as illustrative rather than restrictive. In this document, unless otherwise stated, the phrase "in embodiments" is equivalent to the phrase "in some embodiments" and does not refer to all embodiments. The following claims are intended to cover all general and specific features described herein, as well as all statements regarding the scope of the methods and systems of the present invention, and linguistically, can be said to be somewhere in between.
Claims
1. A motion detection method, comprising: The first weighted sum position vector is determined through the following steps: (a) Determine the gradient of the first pixel value at each of the multiple pixel coordinates within the motion detection region of the first image of the scene; (b) For each of the plurality of pixel coordinates, determine a corresponding first weighted position vector, the first weighted position vector being equal to (i) a position vector defined by the pixel coordinates and (ii) a first function of the magnitude of the gradient of the first pixel value at the pixel coordinates; and (c) Summing the first weighted position vector to produce the first weighted sum position vector; The second weighted sum position vector is determined through the following steps: (a) Determine the gradient of the corresponding second pixel value at each of the multiple pixel coordinates within the motion detection region of the second image of the scene; (b) For each of the plurality of pixel coordinates, determine a corresponding second weighted position vector, the second weighted position vector being equal to (i) a position vector defined by the pixel coordinates and (ii) a first function of the magnitude of the gradient of the second pixel value at the pixel coordinates; and (c) Summing the second weighted position vectors to produce the second weighted sum position vector; and Determine the difference parameter, which changes in a direct relationship with the difference between the first weighted sum position vector and the second weighted sum position vector.
2. The method according to claim 1 further includes outputting a motion detection signal when the difference parameter exceeds a threshold.
3. The method according to claim 1, When the first weighted sum position vector is determined, the first function is a monotonically increasing function of the product of the position vector and the magnitude of the gradient of the first pixel value; When the second weighted sum position vector is determined, the first function is a monotonically increasing function of the product of the position vector and the magnitude of the gradient of the second pixel value.
4. The method according to claim 3, wherein the monotonically increasing function is the product of (i) a first monotonically increasing function of one of the gradients of the first pixel value and the second pixel value, and (ii) a second monotonically increasing function of the position vector.
5. The method according to claim 1, wherein the difference parameter is a monotonically increasing function of the difference.
6. The method according to claim 1, wherein the difference parameter is a monotonically increasing function of the square of the difference.
7. The method of claim 1, further comprising capturing each of the first image and the second image separately.
8. The method of claim 7, wherein non-simultaneous capture comprises: The first image and the second image were captured separately from the same advantageous position.
9. The method according to claim 1, further comprising: For the motion detection region in the third image of the scene, (i) the corresponding third pixel value gradient at each of the multiple pixel coordinates is determined, and (ii) the third feature descriptor value is determined based on the third pixel value gradient and the position vector; Determine an additional difference parameter that varies directly with the difference between one of the weighted sum position vectors (first and second weighted sum position vectors) and the value of the third feature descriptor; and A motion detection signal is output when at least one of the following conditions is met: (i) the difference parameter exceeds a threshold, (ii) the additional difference parameter exceeds a first additional threshold, and (iii) the quotient of the difference parameter and the additional difference parameter exceeds a second additional threshold.
10. The method according to claim 1, further comprising: For each of the multiple additional images of the scene, the corresponding additional difference parameter is determined through the following steps: (i) Determine the additional pixel value gradient at each of the plurality of pixel coordinates of the motion detection region in the additional image, and (ii) determine the additional feature descriptor value based on the additional pixel value gradient and the position vector; Determine an additional difference parameter that varies directly with (i) the difference between the first weighted sum position vector and (ii) the value of the additional feature descriptor; and A motion detection signal is output when at least one of the following conditions is met: (a) the function of the difference parameter and each of the additional difference parameters exceeds a threshold, and (b) the difference parameter exceeds a threshold and each of the additional difference parameters exceeds a corresponding additional threshold.
11. The method of claim 10, wherein the function is one of the mean, the reciprocal of the variance, the maximum value, the minimum value, and the quotient of the minimum value and the maximum value.
12. The method according to claim 1, further comprising: Repeat the steps of claim 1 for additional motion detection regions in the first image and the second image to generate additional first feature descriptor values, additional second feature descriptor values, and additional difference parameters between the additional first feature descriptor values and the additional second feature descriptor values; When the difference parameter (i) exceeds the threshold and the additional difference parameter (ii) exceeds the additional threshold, a motion detection signal is output.
13. The method according to claim 1, For each pixel coordinate in the first image, the gradient of each first pixel value is a function of the pixel value at that pixel coordinate and the pixel values at the adjacent pixel coordinates; For each pixel coordinate in the second image, the gradient of each second pixel value is a function of the pixel value at that pixel coordinate and the pixel values at the adjacent pixel coordinates.
14. A motion detection system comprising circuitry for performing the method of claim 1.
15. The motion detection system of claim 14, wherein the circuit comprises one of an application-specific integrated circuit (ASIC) and a field-programmable gate array (FPGA).
16. The motion detection system according to claim 14, wherein the circuit comprises: processor; as well as A memory that stores a first image and a second image of a scene, as well as machine-readable instructions that, when executed by the processor, control the processor to perform the method of claim 1.
17. The motion detection system of claim 14 further includes an image sensor, the image sensor being communicatively coupled to the circuit to record the first image and the second image.
18. The motion detection system of claim 17, further comprising a camera, the camera including the image sensor, for capturing the first image and the second image.
19. A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform the method of claim 1.
Citation Information
Patent Citations
System and method for object and event identification using multiple cameras
CN105531995A