Image detection method and apparatus, and device

By performing sparsification processing and difference calculation on the images captured by network cameras, the problem of insufficient real-time performance and accuracy of network cameras when monitoring moving objects is solved, and more efficient and accurate moving object detection is achieved.

WO2026152649A1PCT designated stage Publication Date: 2026-07-23SHANGHAI IMILAB TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHANGHAI IMILAB TECHNOLOGY CO LTD
Filing Date
2025-06-30
Publication Date
2026-07-23

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient real-time performance and accuracy when monitoring indoor or outdoor spaces using network cameras.

Method used

The current image is sparsified to generate multiple downsampled sparse images. The difference between these images and the downsampled sparse images of historical images is calculated to determine whether there are moving objects in the target space.

Benefits of technology

While reducing computational load through sparsification, it improves the efficiency and accuracy of determining whether there are moving objects in the target space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025105392_23072026_PF_FP_ABST
    Figure CN2025105392_23072026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computers, and in particular to the technical fields of image processing, image detection, etc. Provided are an image detection method and apparatus, and a device. A specific implementation involves: performing sparsification processing on each of a plurality of down-sampled images corresponding to a current image, so as to obtain a plurality of down-sampled sparse images corresponding to the current image, wherein the current image is a currently collected image of a target space; on the basis of the plurality of down-sampled sparse images corresponding to the current image and a plurality of down-sampled sparse images corresponding to a historical image, determining a plurality of difference images; and on the basis of the plurality of difference images, determining a detection result of the current image, wherein the detection result of the current image indicates whether there is a target object in a moving state in the target space.
Need to check novelty before this filing date? Find Prior Art

Description

Image detection methods, devices and equipment Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to the fields of image processing and image detection. Background Technology

[0002] With the development of network cameras, they can be used to monitor indoor or outdoor spaces to determine the presence of moving objects (such as people, animals, vehicles, etc.) and to promptly issue an alarm if such objects are detected. In this scenario, the real-time performance and accuracy of monitoring moving objects in indoor or outdoor spaces are crucial. Therefore, how to accurately and efficiently determine the presence of moving objects in indoor or outdoor spaces using images captured by network cameras becomes a key technical problem to be solved. Summary of the Invention

[0003] This disclosure provides an image detection method, apparatus, device, and storage medium.

[0004] According to one aspect of this disclosure, an image detection method is provided, comprising:

[0005] Sparsification is performed on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image, wherein the current image is the image of the target space currently acquired;

[0006] Based on the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to the historical images, multiple difference images are determined, wherein the multiple difference images are used to represent the differences between the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to the historical images.

[0007] Based on the multiple difference images, the detection result of the current image is determined, wherein the detection result of the current image indicates whether there is a moving target object in the target space.

[0008] According to one aspect of this disclosure, an image detection apparatus is provided, comprising:

[0009] The sparsification module is used to perform sparsification processing on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image, wherein the current image is the image of the target space currently acquired;

[0010] The difference image determination module is used to determine multiple difference images based on multiple downsampled sparse images corresponding to the current image and multiple downsampled sparse images corresponding to historical images, wherein the multiple difference images are used to represent the differences between the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to historical images.

[0011] The detection module is used to determine the detection result of the current image based on the plurality of difference images, wherein the detection result of the current image indicates whether there is a moving target object in the target space.

[0012] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0013] At least one processor; and

[0014] The memory is communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.

[0016] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.

[0017] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.

[0018] By employing the above implementation method, firstly, multiple downsampled images corresponding to the currently acquired target space image are subjected to sparsification processing to obtain multiple downsampled sparse images corresponding to the current image; then, based on multiple difference images determined from the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to historical images, the detection result of the current image is obtained. In this way, while reducing computational load through sparsification processing, the presence of moving target objects in the target space can be more accurately determined through multi-size downsampled images of the current image, thereby improving the efficiency and accuracy of determining whether moving objects exist in the target space.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0020] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0021] Figure 1 is a flowchart illustrating a moving object detection method according to an embodiment of the present disclosure;

[0022] Figure 2 is a flowchart illustrating a moving object detection method according to another embodiment of the present disclosure;

[0023] Figure 3 is a schematic block diagram of a moving object detection device according to an embodiment of the present disclosure;

[0024] Figure 4 is a schematic block diagram of a moving object detection device according to another embodiment of the present disclosure;

[0025] Figure 5 is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation

[0026] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0027] Figure 1 is a schematic flowchart of the image detection method proposed in an embodiment of this disclosure, including:

[0028] S110, perform sparsification processing on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image, wherein the current image is the image of the target space currently acquired;

[0029] S120, based on the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to the historical image, multiple difference images are determined, wherein the multiple difference images are used to represent the differences between the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to the historical image.

[0030] S130, based on the plurality of difference images, determine the detection result of the current image, wherein the detection result of the current image indicates whether there is a moving target object in the target space.

[0031] The image detection method of this disclosure can be executed by an electronic device. The electronic device can be a network camera (IPC), or other terminal device or server with computing capabilities and capable of communicating with the network camera. It should be understood that the above is merely an exemplary description of the electronic device, and in actual processing, it may not be limited to the devices mentioned in the above examples. Any electronic device capable of executing the image detection method provided in this embodiment is within the protection scope of this embodiment.

[0032] By employing the above implementation method, firstly, multiple downsampled images corresponding to the currently acquired target space image are subjected to sparsification processing to obtain multiple downsampled sparse images corresponding to the current image; then, based on multiple difference images determined from the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to historical images, the detection result of the current image is obtained. In this way, while reducing computational load through sparsification processing, the presence of moving target objects in the target space can be more accurately determined through multi-size downsampled images of the current image, thereby improving the efficiency and accuracy of determining whether moving objects exist in the target space.

[0033] In one embodiment, the method further includes: inputting the current image to be processed into a two-dimensional Gaussian filter model to obtain a first image to be processed output by the two-dimensional Gaussian filter model; obtaining a second image to be processed based on the current image to be processed and one or more historical images to be processed; and inputting the first image to be processed and the second image to be processed into a three-dimensional Gaussian filter model to obtain the current image output by the three-dimensional Gaussian filter model.

[0034] The method of acquiring the current image to be processed may include: acquiring the currently acquired image captured by the image acquisition unit at the current moment; and obtaining the current image to be processed based on the currently acquired image. The image acquisition unit may also be called an image sensor, which can be a camera or a webcam. It should be noted that the image acquisition unit performing image acquisition can have a preset acquisition interval between acquisition moments. The specific duration of this acquisition interval can be configured according to actual conditions, for example, it can be 0.1 seconds, 1 second, longer, or shorter; it is not limited here.

[0035] The step of obtaining the current image to be processed based on the currently acquired image includes: converting the format of the currently acquired image to obtain a current acquired image of a target format; performing image quality correction processing on the current acquired image of the target format to obtain a quality-corrected current acquired image; performing resolution conversion on the quality-corrected current acquired image to obtain a current acquired image of a target resolution; and using the current acquired image of the target resolution as the current image to be processed.

[0036] The process of converting the format of the currently acquired image to obtain the target format image can be performed by the Video Input Format Module (VIF). The target format can be set according to the actual situation, and this application does not limit it.

[0037] The image quality correction processing of the currently acquired image in the target format to obtain the quality-corrected currently acquired image can be performed by an Image Signal Processing Unit (ISPU). The image quality correction processing may include at least one of the following: noise reduction processing, color correction processing, etc. The specific process of the image quality correction processing is not limited in this application.

[0038] The resolution conversion of the current acquired image after quality correction to obtain the current acquired image at the target resolution can be performed by the Sensor Control Logic (SCL) unit. The target resolution can be set according to actual conditions and is not limited in this application. For example, the target resolution could be 320*192. The SCL can also dynamically adjust the image sensor parameters according to environmental conditions to ensure image quality; the specific adjustment method is not limited in this application. Environmental conditions may include light intensity, light direction, temperature, etc.

[0039] The two-dimensional Gaussian filtering model can also be called a two-dimensional Gaussian filter or a 2D Gaussian filter. The two-dimensional Gaussian filtering model can perform spatial filtering on images.

[0040] Based on the formula, an example is given of how to input the current image to be processed into a two-dimensional Gaussian filter model to obtain the first image to be processed output by the two-dimensional Gaussian filter model:

[0041] I spatial_filtered =G 2D (I t ), where G 2D For a two-dimensional Gaussian filter function (i.e., a two-dimensional Gaussian filter), I t For the current image to be processed (t is the index of the current image), I spatial_filtered This is the spatially filtered current image to be processed (i.e., the first image to be processed).

[0042] The step of obtaining a second image to be processed based on the current image to be processed and one or more historical images to be processed can be: taking the average value of the current image to be processed and one or more historical images to be processed as the second image to be processed.

[0043] Using the formula, an example is given of using the average of the current image to be processed and one or more historical images to be processed as the second image to be processed:

[0044] Where t is the index of the current image, c ranges from 0 to N, and I t-c For the current image to be processed and one or more historical images to be processed (i.e., when c equals 0, I...), ... t-c For the current image to be processed, when c is greater than 0, I t-c (For historical images to be processed), I temporal_filtered This is the second image to be processed.

[0045] The one or more historical images to be processed can be historical images at a target resolution corresponding to one or more consecutive acquisition intervals prior to obtaining the current image to be processed. The last acquisition interval in the one or more consecutive acquisition intervals is adjacent to the current time corresponding to the current image to be processed. The acquisition method for the historical images at the target resolution corresponding to the one or more consecutive acquisition intervals is the same as that for the current image to be processed, and will not be repeated here. The number of the one or more historical images to be processed can be set according to actual conditions, and is not limited in this application. For example, it can be N-1 historical images to be processed, where N is a positive integer greater than or equal to 2.

[0046] Taking the m-th pixel (where m is a positive integer) among multiple pixels in the current image to be processed as an example: The second image to be processed is obtained by averaging the features of the current image to be processed and one or more historical images to be processed. This includes: averaging the features of the m-th pixel of the current image to be processed and the features of the m-th pixel of each of the one or more historical images to be processed, as the features of the m-th pixel of the second image to be processed. The pixel features include at least one of the following: texture features, shape features, color features, gradient, brightness, etc.

[0047] The three-dimensional Gaussian filtering model can also be called a three-dimensional Gaussian filter or a 3D Gaussian filter. The three-dimensional Gaussian filtering model can perform comprehensive filtering on images.

[0048] The following example illustrates how inputting the first image to be processed and the second image to be processed into a three-dimensional Gaussian filter model yields the current image output by the three-dimensional Gaussian filter model, based on the formula:

[0049] I filtered =G 3D (I spatial_filtered ,I temporal_filtered ), where G 3D For a three-dimensional Gaussian filter function (i.e., a three-dimensional Gaussian filter), Ispatial_filtered For the first image to be processed, I temporal_filtered For the second image to be processed, I filtered This refers to the current image (or the filtered current image to be processed).

[0050] By employing the above implementation method, a two-dimensional Gaussian filtering model is used to process the current image to be processed, resulting in a first image to be processed. A second image to be processed is obtained by combining the current image to be processed with historical images to be processed. Then, a three-dimensional Gaussian filtering model is used to process both the first and second images to be processed, resulting in the current image. Thus, denoising or filtering the current image to be processed in both spatial and temporal dimensions can improve image clarity, thereby enhancing the accuracy of image detection results.

[0051] In one example, obtaining multiple downsampled images corresponding to the current image includes: performing multi-size downsampling on the current image based on a downsampling function and multiple size factors to obtain multiple downsampled images corresponding to the current image. The multiple size factors include the ratio of the size of the current image to the size of each downsampled image in the multiple downsampled images. For example, any size factor can be a power of 2, such as: one-tenth (i.e., 1 / 0 of 2), one-half (i.e., 1 / 1 of 2), one-quarter (i.e., 1 / 2 of 2), one-eighth (i.e., 1 / 3 of 2), etc.

[0052] Taking the s-th size factor among multiple size factors as an example (s is a positive integer), and combining the formula, we will exemplarily illustrate how to perform multi-size downsampling on the current image based on a downsampling function and multiple size factors to obtain multiple downsampled images corresponding to the current image:

[0053] Where downsample is the downsampling function, I filtered For the current image, s is the s-th size factor. Let be the s-th downsampled image among multiple downsampled images.

[0054] In one embodiment, the step of sparsifying each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparse images corresponding to the current image includes: determining sparsification parameters for each region in one or more regions of the s-th downsampled image corresponding to the current image based on the features of multiple second pixels in each region of one or more regions of the s-th downsampled image corresponding to the current image, wherein the s-th downsampled image is one of the multiple downsampled images corresponding to the current image, and s is a positive integer; obtaining the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image based on the sparsification parameters of each region in one or more regions of the s-th downsampled image; and performing sparsification processing on the s-th downsampled image based on the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image to obtain the s-th downsampled sparse image corresponding to the current image.

[0055] Wherein, one or more regions of the s-th downsampled image corresponding to the current image include all pixels in the s-th downsampled image, and different regions of the one or more regions include different pixels. The method for determining one or more regions of each downsampled image corresponding to the current image is the same as the method for determining one or more regions of the s-th downsampled image corresponding to the current image, and will not be repeated here.

[0056] Taking the p-th region (where p is a positive integer) in one or more regions of the s-th downsampled image corresponding to the current image as an example, the step of determining the sparsification parameter of each region in one or more regions of the s-th downsampled image corresponding to the current image based on the features of multiple second pixels in each region can include: using the average of the absolute values ​​of the features of each second pixel in the p-th region of one or more regions of the s-th downsampled image corresponding to the current image as the sparsification parameter of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image. The pixel features include at least one of the following: texture features, shape features, color features, gradient, brightness, etc.

[0057] In a preferred example, the average of the absolute values ​​of the features of each second pixel in the p-th region of one or more regions of the s-th downsampled image corresponding to the current image is used as the sparsification parameter of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image. This can be achieved by using the average of the absolute values ​​of the gradients of each second pixel in the p-th region of one or more regions of the s-th downsampled image corresponding to the current image as the sparsification parameter of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image.

[0058] Based on the formula, the average of the absolute values ​​of the gradients of each second pixel in the p-th region of one or more regions of the s-th downsampled image corresponding to the current image is used as the sparsification parameter for the p-th region of one or more regions of the s-th downsampled image corresponding to the current image, as illustrated by the following example:

[0059] Where N(x,y) represents each second pixel in the p-th region (N represents the number of pixels included in the p-th region), Let (i,j) represent the absolute value of the gradient of each second pixel within the p-th region (where (i,j) takes values ​​in the range N(x,y)). Let represent the average absolute value of the gradient of each second pixel within the p-th region, and let complexity(x,y) represent the sparsity parameter of the p-th region. This calculation method can reflect the complexity of the pixels within the p-th region; therefore, the sparsity parameter can also be called the complexity parameter.

[0060] Taking the p-th region in one or more regions of the s-th downsampled image corresponding to the current image as an example, the step of obtaining the sparsity ratio of each region in one or more regions of the s-th downsampled image based on the sparsity parameters of each region in one or more regions of the s-th downsampled image corresponding to the current image includes: obtaining the sparsity ratio of the p-th region in one or more regions of the s-th downsampled image based on the sparsity parameters of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image, the control inflection point parameter, and the control slope parameter. The control inflection point parameter and the control slope parameter can be set according to actual conditions and are not limited in this application.

[0061] The method of obtaining the sparsity ratio of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image, based on the sparsity parameters, control inflection point parameters, and control slope parameters of the p-th region in one or more regions of the s-th downsampled image, includes: subtracting the control inflection point parameters from the sparsity parameters of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image, and then multiplying by the control slope parameters to obtain a first value; and taking one-half of the sum of the base of the natural logarithm raised to the negative first value and a second value as the sparsity ratio of the p-th region in one or more regions of the s-th downsampled image. The second value can be set according to actual conditions and is not limited in this application; for example, the second value can be 1.

[0062] The sparsity ratio of the p-th region in one or more regions of the s-th downsampled image is illustrated by the following example using the formula:

[0063] Where complexity(x,y) is the sparsity parameter for the p-th region, b controls the inflection point, k controls the slope, e is the base of the natural logarithm, k(complexity(x,y)-b) is the first value, and ek(complexity(x,y)-b) is the base of the natural logarithm raised to the negative first power. It is one-tenth of the sum of the negative first power and the second power (i.e., 1) of the base of the natural logarithm, and sparsity_ratio(x,y) is the sparsity ratio of the p-th region.

[0064] Taking the p-th region in one or more regions of the s-th downsampled image corresponding to the current image as an example, the step of obtaining the sparsification range of each region in one or more regions of the s-th downsampled image based on the sparsification parameters of each region in one or more regions of the current image includes: obtaining the sparsification range of the p-th region in one or more regions of the s-th downsampled image based on the sparsification parameters of the p-th region in one or more regions of the current image, the control inflection point parameter, and the control slope parameter.

[0065] The method of obtaining the sparsification range of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image, based on the sparsification parameters, control inflection point parameters, and control slope parameters of the p-th region in one or more regions of the s-th downsampled image, includes: subtracting the control inflection point parameters from the sparsification parameters of the p-th region in one or more regions of the s-th downsampled image corresponding to the current image, and then multiplying by the control slope parameters to obtain a first value; taking the sum of the negative first power of the base of the natural logarithm and the second value as a third value; taking the ratio of the fourth value and the third value as a fifth value; and taking the maximum value among the floor value of the fifth value and the sixth value as the sparsification range of the p-th region in one or more regions of the s-th downsampled image. The second, fourth, and sixth values ​​can be set according to actual conditions and are not limited in this application. For example, the second value can be 1, the fourth value can be 100, and the sixth value can be 1.

[0066] Based on the formula, the sparsification range of the p-th region in one or more regions of the s-th downsampled image is illustrated by the following example:

[0067] Where complexity(x,y) is the sparsification parameter of the p-th region, b is the control inflection point, k is the control slope, e is the base of the natural logarithm, k(complexity(x,y)-b) is the first value; 1+ek(complexity(x,y)-b) is the third value (i.e., the sum of the negative first power of the base of the natural logarithm and the second value (1)). The fifth value (i.e., the ratio of the fourth value (100) to the third value), This represents the floor value of the fifth value. The value represents the maximum of the fifth value (rounded down) and the sixth value (i.e., 1), and window_size(x,y) is the sparsification range of the p-th region. window_size(x,y) can also be called the sparsification window for the p-th region.

[0068] Taking the p-th region in one or more regions of the s-th downsampled image corresponding to the current image as an example, the sparsification process of the s-th downsampled image based on the sparsification range and sparsification ratio of each region in one or more regions of the s-th downsampled image to obtain the s-th downsampled sparsed image corresponding to the current image may include: performing sparsification processing on the s-th downsampled image through a sparsification process function, the sparsification range of the p-th region in one or more regions of the s-th downsampled image, and the sparsification ratio of the p-th region in one or more regions of the s-th downsampled image to obtain the p-th sparsified region in the s-th downsampled sparsed image corresponding to the current image.

[0069] The above sparsification process can be explained using the formula:

[0070] Where sparsity_ratio(x,y) is the sparsification ratio of the p-th region, window_size(x,y) is the sparsification range (or sparsification window) of the p-th region, and sparse_transform is the sparsification process function. For the s-th downsampled image, Let p be the sparse region in the s-th downsampled sparse image.

[0071] By employing the above implementation method, based on the features of multiple second pixels in each region of one or more regions of the s-th downsampled image corresponding to the current image, sparsification parameters for each region of the one or more regions of the s-th downsampled image corresponding to the current image are determined. Then, based on the sparsification range and sparsification ratio of each region in one or more regions of the s-th downsampled image obtained from the sparsification parameters of each region, sparsification processing is performed on the s-th downsampled image to obtain the s-th downsampled sparsed image corresponding to the current image. In this way, sparsification processing of the downsampled image can be performed with finer granularity, improving the accuracy of the sparsification processing.

[0072] In one example, where the s-th downsampled image corresponding to the current image comprises only one region (i.e., the one region includes all pixels of the s-th downsampled image), the sparsification process performed on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparse images corresponding to the current image may include: determining the sparsification parameters of the s-th downsampled image corresponding to the current image based on the features of multiple second pixels within one region of the s-th downsampled image corresponding to the current image; obtaining the sparsification ratio of the s-th downsampled image corresponding to the current image based on the sparsification parameters and the sparsity threshold of the s-th downsampled image corresponding to the current image; and performing sparsification processing on the s-th downsampled image corresponding to the current image based on the sparsification ratio and the sparsification process function of the s-th downsampled image corresponding to the current image to obtain the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image.

[0073] The method of determining the sparsification parameters of the s-th downsampled image corresponding to the current image based on the features of multiple second pixels in a region of the s-th downsampled image corresponding to the current image is the same as the above implementation method, and will not be repeated here.

[0074] The method of obtaining the sparsification ratio of the s-th downsampled image corresponding to the current image based on the sparsification parameters and sparsity threshold of the s-th downsampled image corresponding to the current image includes one of the following: when the sparsification parameters of the s-th downsampled image corresponding to the current image are greater than the sparsity threshold, a first sparsification ratio is used as the sparsification ratio of the s-th downsampled image corresponding to the current image; when the sparsification parameters of the s-th downsampled image corresponding to the current image are not greater than the sparsity threshold, a second sparsification ratio is used as the sparsification ratio of the s-th downsampled image corresponding to the current image. The sparsity threshold, the first sparsification ratio, and the second sparsification ratio can be set according to actual conditions, and are not limited in this application.

[0075] Based on the formula, and using the sparsification ratio and sparsification process function of the s-th downsampled image corresponding to the current image, sparsification processing is performed on the s-th downsampled image corresponding to the current image to obtain the s-th downsampled sparsified image among multiple downsampled sparsified images corresponding to the current image. An example is provided below:

[0076] Wherein, sparse_transform is the sparsification process function. For the s-th downsampled image, sparsity_ratio represents the sparsity ratio of the s-th downsampled image. This is the s-th downsampled sparse image corresponding to the current image.

[0077] In one implementation, determining multiple difference images based on multiple downsampled sparse images corresponding to the current image and multiple downsampled sparse images corresponding to historical images includes: determining multiple average value images based on multiple downsampled sparse images corresponding to historical images; and determining the multiple difference images based on multiple downsampled sparse images corresponding to the current image and the multiple average value images.

[0078] The step of determining multiple average images based on multiple downsampled sparse images corresponding to the historical image includes: taking the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the historical image as multiple average images to be processed, where s is a positive integer; and obtaining the s-th average image among the multiple average images based on the multiple average images to be processed and the weight corresponding to each of the multiple average images to be processed.

[0079] The step of using the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to historical images as multiple average images to be processed may include: using the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to each of one or more historical images as multiple average images to be processed.

[0080] The one or more historical images may be historical images corresponding to one or more consecutive acquisition intervals prior to the current time corresponding to the current image, wherein the last acquisition interval in the one or more consecutive acquisition intervals is adjacent to the current time corresponding to the current image.

[0081] The method for obtaining the multiple downsampled sparse images corresponding to each historical image in the one or more historical images is the same as the method for obtaining the multiple downsampled sparse images corresponding to the current image, and will not be repeated here. The number of the one or more historical images can be set according to the actual situation, and is not limited in this application. For example, it can be N-1 historical images to be processed, where N is a positive integer greater than or equal to 2.

[0082] The step of obtaining the s-th average image among the plurality of average images based on the plurality of average images to be processed and the weight corresponding to each average image to be processed in the plurality of average images to be processed includes: obtaining a plurality of first images based on each average image to be processed in the plurality of average images to be processed and the plurality of attenuation weights; taking the sum of the plurality of attenuation weights as a seventh value; and obtaining the s-th average image among the plurality of average images based on the plurality of first images and the seventh value.

[0083] Taking the tc-th average image among multiple average images to be processed as an example (where t is the index of the current image, c is the number of multiple average images to be processed, and c and t are positive integers), multiple first images are obtained based on each average image to be processed and the multiple decay weights. This can include obtaining the c-th first image among multiple first images based on the product of the tc-th average image to be processed and the c-th decay weight.

[0084] Using the formula, the above s-th average value image is illustrated as follows:

[0085] Where t is the index of the s-th downsampled sparse image corresponding to the current image among multiple images to be processed by averaging. Let tc be the image to be processed with the average value (c ranges from 0 to N). For the c-th decay weight, This is the c-th first image (i.e., the image obtained by multiplying the tc-th image to be processed by the average value and the c-th decay weight); The sum of multiple first images; This is the seventh value (i.e., the sum of multiple decay weights). Let w be the s-th average value image. c =e -λc λ is the attenuation factor, -λc is the attenuation factor multiplied by the negative number of the c-th image to be processed, and e is the base of the natural logarithm.

[0086] Taking the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image as an example, the step of determining the multiple difference images based on the multiple downsampled sparse images corresponding to the current image and the multiple average images includes: taking the image of the absolute value of the difference between the s-th downsampled sparse image corresponding to the current image and the s-th average image among the multiple average images as the s-th difference image of the multiple difference images.

[0087] Based on the formula, the s-th difference image of the plurality of difference images is illustrated by example:

[0088] in, This is the s-th downsampled sparse image corresponding to the current image. For the s-th average value image, This is the s-th difference image.

[0089] The method for obtaining each of the plurality of difference images is the same as the method for obtaining the s-th difference image among the plurality of difference images, and will not be repeated here.

[0090] Taking the g-th pixel of the s-th sparse image corresponding to the current image as an example, the step of using the absolute value image of the difference between the s-th downsampled sparse image corresponding to the current image and the s-th average image among the multiple average images as the s-th difference image among the multiple difference images can include: using the absolute value of the difference between the feature of the g-th pixel of the s-th sparse image corresponding to the current image and the feature of the g-th pixel among the multiple pixels of the s-th average image as the g-th pixel of the multiple difference images among the multiple difference images. The method for obtaining each pixel of the s-th difference image among the multiple difference images is the same as the method for obtaining the g-th pixel of the s-th difference image among the multiple difference images described above, and will not be repeated here.

[0091] By employing the above implementation method, the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to historical images are used as multiple average images to be processed. Based on the multiple average images to be processed and the weight corresponding to each of the multiple average images to be processed, the s-th average image among the multiple average images is obtained. In this way, the average image can be obtained more accurately. Furthermore, based on the multiple downsampled sparse images corresponding to the current image and the multiple average images, multiple difference images are determined. In this way, difference images at multiple sizes can be obtained, and the detection result of the current image can be obtained more accurately through the difference images at multiple sizes.

[0092] In one embodiment, determining the detection result of the current image based on the plurality of difference images includes: if there are one or more first difference images among the plurality of difference images that contain one or more first pixels with a difference degree greater than a difference threshold, determining the detection result of the current image based on the number of one or more first pixels in each of the one or more first difference images.

[0093] In the case where there are one or more first difference images among the plurality of difference images that contain one or more first pixels with a difference degree greater than a difference threshold, determining the detection result of the current image based on the number of one or more first pixels in each of the one or more first difference images includes: determining whether there are one or more first difference images among the plurality of difference images that contain one or more first pixels with a difference degree greater than a difference threshold; and in the case where there are one or more first difference images among the plurality of difference images that contain one or more first pixels with a difference degree greater than a difference threshold, determining the detection result of the current image based on the number of one or more first pixels in each of the one or more first difference images.

[0094] Furthermore, if there is no first difference image among the plurality of difference images that contains one or more first pixels with a difference degree greater than the difference threshold, the detection result of the current image is determined to be a target object that does not have a moving state in the target space.

[0095] In this way, the detection result of the current image is determined solely by the number of one or more first pixels in each of the one or more first difference images. This allows for efficient determination of whether a moving target object exists in the target space.

[0096] Determining that one or more first difference images among the plurality of difference images contain one or more first pixels with a difference degree greater than a difference threshold may include one of the following: When one or more first pixels are obtained by sequentially filtering multiple pixels of the s-th difference image based on multiple first difference thresholds, the s-th difference image is taken as one of the one or more first difference images, wherein a later first difference threshold among the plurality of first difference thresholds is less than an earlier first difference threshold, the filtering target of the later first difference threshold is pixels in the plurality of pixels of the s-th difference image that are less than or equal to the earlier first difference threshold, and the s-th difference image is one of the plurality of difference images, where s is a positive integer; When one or more first pixels are obtained by filtering in any block among multiple blocks of the s-th difference image based on multiple second difference thresholds, the s-th difference image is taken as one of the one or more first difference images, wherein different second difference thresholds among the plurality of second difference thresholds correspond to different blocks in the s-th difference image.

[0097] For example, when there are three first difference thresholds, and the first first difference threshold is greater than the second first difference threshold, and the second first difference threshold is greater than the third first difference threshold, the step of filtering multiple pixels of the s-th difference image in sequence based on the multiple first difference thresholds to obtain one or more first pixels may be: determining whether there are pixels in the features of the multiple pixels of the s-th difference image that are greater than the first first difference threshold; if there are pixels in the features of the multiple pixels of the s-th difference image that are greater than the first first difference threshold, taking the pixels greater than the first first difference threshold as at least a part of one or more first pixels; determining whether there are pixels in the features of pixels in the s-th difference image that are less than or equal to the first first difference threshold. Does a pixel exist that is greater than a second first difference threshold? If, among the features of pixels less than or equal to the first first difference threshold, there exists a pixel greater than the second first difference threshold, then the pixel greater than the second first difference threshold among the features of pixels less than or equal to the first first difference threshold is taken as at least a portion of one or more first pixels. Determine whether, among the features of pixels less than or equal to the second first difference threshold in the s-th difference image, there exists a pixel greater than a third first difference threshold. If, among the features of pixels less than or equal to the second first difference threshold, there exists a pixel greater than the third first difference threshold, then the number of pixels greater than the third first difference threshold among the features of pixels less than or equal to the second first difference threshold is taken as at least a portion of one or more first pixels.

[0098] It is understood that the number of one or more first pixels included in the s-th difference image can be: the sum of the number of pixels greater than the first first difference threshold, the number of pixels greater than the second first difference threshold among the features of pixels less than or equal to the first first difference threshold, and the number of pixels greater than the third first difference threshold among the features of pixels less than or equal to the second first difference threshold.

[0099] Based on the formula, the number of pixels exceeding the first difference threshold is illustrated by the following example:

[0100] Where threshold is the first difference threshold. Let (x, y) be the feature corresponding to multiple pixel positions in the s-th difference image (i.e., the feature of multiple pixels in the s-th difference image), where (x, y) is the pixel position (x ranges from 0 to W-1, y ranges from 0 to H-1), W is the width of the s-th difference image, H is the height of the s-th difference image, and 1{.} indicates that... The count is the number of features greater than the threshold in the s-th difference image.

[0101] Taking the q-th block of the s-th difference image as an example, the step of filtering one or more first pixels in any block of the multiple blocks of the s-th difference image based on multiple second difference thresholds may include: if one or more third pixels in the one or more pixels of the q-th block of the s-th difference image have features greater than the second difference threshold corresponding to the q-th block, then one or more third pixels are used as one or more first pixels. Wherein, the second difference threshold corresponding to the q-th block is one of the multiple second difference thresholds, that is, the multiple second difference thresholds include the difference threshold corresponding to each block in the multiple blocks of the s-th difference image. The difference threshold corresponding to each block in the multiple blocks of the s-th difference image can be set according to actual conditions, and this application does not limit it.

[0102] It is understood that the number of one or more first pixels included in the s-th difference image can be the sum of the number of one or more first pixels included in each of the multiple blocks of the s-th difference image. Wherein, the multiple blocks of the s-th difference image include all pixels of the s-th difference image, and different blocks of the s-th difference image contain different numbers of pixels.

[0103] In this way, by using one of the two methods mentioned above, the number of first pixels can be accurately determined in each of the multiple downsampled images corresponding to the current image, thereby improving the accuracy of the detection results of the current image.

[0104] In one implementation, determining the detection result of the current image based on the number of one or more first pixels in each of the one or more first difference images includes one of the following: if the number of one or more first pixels in any of the one or more first difference images is greater than a quantity threshold, the detection result of the current image is determined to be a target object in the target space that is in a moving state; if the number of one or more first pixels in each of the one or more first difference images is less than or equal to a quantity threshold, the detection result of the current image is determined to be a target object in the target space that is not in a moving state.

[0105] The quantity threshold can be set according to the actual situation, and this application does not limit it.

[0106] The step of determining that the detection result of the current image is a target object in the target space that is moving when the number of one or more first pixels in any one or more first difference images is greater than a quantity threshold includes: determining whether there are any undetermined first difference images among the one or more first difference images; if there are undetermined first difference images, determining the current difference image among the undetermined first difference images; determining whether the number of one or more first pixels in the current difference image is greater than a quantity threshold; and determining that the detection result of the current image is a target object in the target space that is moving when the number of one or more first pixels in the current difference image is greater than the quantity threshold.

[0107] In addition, if the number of one or more first pixels in the current difference image is not greater than the number threshold, it is determined whether there is an undetermined first difference image in the one or more first difference images. If there is no undetermined first difference image, the detection result of the current image is determined to be that there is no moving target object in the target space.

[0108] Based on the formula, the method for determining whether a target object exists in a moving state within the target space is explained:

[0109] Where moving_threshold is the number threshold, and pixel_count is the number of the first pixel in any difference image;

[0110] "True if pixel_count>moving_threshold" indicates that if the number of one or more first pixels in any of the one or more first difference images is greater than the number threshold, the detection result of the current image is determined to be a target object in the target space that is moving; "False otherwise" indicates that if the number of one or more first pixels in each of the one or more first difference images is less than or equal to the number threshold, the detection result of the current image is determined to be a target object in the target space that is not moving; "is_moving" is the detection result of the current image.

[0111] By employing the above implementation method, and by determining the number and a threshold of one or more first pixels in each of the one or more first difference images, the detection result of the current image is determined to indicate whether a moving target object exists in the target space. This avoids missing detections of moving objects in the target space and improves the accuracy of determining whether a moving object exists in the target space.

[0112] The above embodiments are illustrated with reference to Figure 2, including:

[0113] S201, acquire the currently acquired image acquired by the image acquisition unit at the current moment, wherein the image acquisition unit may also be referred to as an image sensor.

[0114] S202, Convert the format of the currently acquired image to obtain the current acquired image in the target format. This process is performed by the video input format module.

[0115] S203, perform image quality correction processing on the currently acquired image in the target format to obtain the quality-corrected currently acquired image. This processing is performed by the image signal processing unit.

[0116] S204, the resolution of the current acquired image after quality correction is converted to obtain the current acquired image at the target resolution. This process is executed by the sensor control logic unit.

[0117] S205, the processor performs the following processing: S2051, inputting the current image to be processed into a two-dimensional Gaussian filter model to obtain a first image to be processed output by the two-dimensional Gaussian filter model; obtaining a second image to be processed based on the current image to be processed and one or more historical images to be processed; inputting the first image to be processed and the second image to be processed into a three-dimensional Gaussian filter model to obtain the current image output by the three-dimensional Gaussian filter model; S2052, performing sparsification processing on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image; S2053, determining multiple difference images based on the multiple downsampled sparsed images corresponding to the current image and the multiple downsampled sparsed images corresponding to the historical images, and determining the detection result (i.e., multi-size difference) of the current image based on the multiple difference images.

[0118] S206, the detection result of the current image is stored in the storage module.

[0119] S207, the detection result of the current image is sent to the server or the terminal of the network camera via the communication module.

[0120] In one implementation, after obtaining the current image, the method further includes: updating the current background image based on the current image to obtain the next background image.

[0121] The step of updating the current background image based on the current image to obtain the next background image includes: taking the sum of the product of the current background image and the first learning rate parameter, and the product of the current image and the second learning rate parameter, as the next background image. The first learning rate parameter can be set according to actual conditions and is not limited in this application. The second learning rate parameter is 1 minus the first learning rate parameter. In one embodiment, the first learning rate parameter can be dynamically adjusted according to the current environmental conditions; the specific adjustment method is not limited in this application.

[0122] The formula is used to explain how to update the current background image based on the current image to obtain the next background image:

[0123] B t+1 =αB t +(1-α)I filtered Where α is the first learning rate parameter (α can take values ​​between 0 and 1, including 0 and 1), (1-α) is the second learning rate parameter, and I filtered B is the current image, and B is the current background image. t+1 Use this as the next background image.

[0124] In one embodiment, after obtaining the current image, the method further includes: obtaining a difference image based on the current image and the current background image; and determining the detection result of the current image based on the difference image.

[0125] The step of determining the detection result of the current image based on the multiple difference images is similar to the above implementation method and will not be repeated here.

[0126] In one example, if the current background image is not the first background image, the current background image is obtained in the same way as the next background image is obtained, and will not be repeated here.

[0127] In one example, when the current background image is the first background image, the current background image may be obtained by: obtaining the current background image based on one or more historical images.

[0128] The step of obtaining the current background image based on one or more historical images includes: obtaining the current background image based on the average value of one or more historical images.

[0129] The following example illustrates how the formula is used to obtain the current background image based on the average of one or more historical images:

[0130] I c For one or more historical images (c ranges from 1 to M), M represents the average of one or more historical images (where M represents the number of historical images), and B0 is the first background image (i.e., the current background image, or the initial background image).

[0131] The step of obtaining the difference image based on the current image and the current background image can be: using the absolute value of the difference between the current image and the current background image as the difference image.

[0132] I diff =|I filtered -B t |, where I diff For the difference image, I filtered For the current image, B t This is the current background image.

[0133] Figure 3 shows a schematic block diagram of an image detection apparatus provided according to an embodiment of the present disclosure. As shown in Figure 3, it includes:

[0134] The sparsification module 301 is used to perform sparsification processing on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image, wherein the current image is the image of the target space currently acquired;

[0135] The difference image determination module 302 is used to determine multiple difference images based on multiple downsampled sparse images corresponding to the current image and multiple downsampled sparse images corresponding to historical images, wherein the multiple difference images are used to represent the differences between the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to historical images.

[0136] The detection module 303 is used to determine the detection result of the current image based on the plurality of difference images, wherein the detection result of the current image indicates whether there is a moving target object in the target space.

[0137] The detection module is configured to determine the detection result of the current image based on the number of one or more first pixels in each of the multiple difference images when there are one or more first difference images containing one or more first pixels with a difference degree greater than a difference threshold.

[0138] The detection module is configured to perform one of the following: if the number of one or more first pixels in any one of the one or more first difference images is greater than a quantity threshold, determine that the detection result of the current image is a target object in the target space that is in a moving state; if the number of one or more first pixels in each of the one or more first difference images is less than or equal to a quantity threshold, determine that the detection result of the current image is a target object in the target space that is not in a moving state.

[0139] The detection module is configured to perform one of the following: when one or more first pixels are obtained by sequentially filtering multiple pixels of the s-th difference image based on multiple first difference thresholds, the s-th difference image is used as one of the one or more first difference images, wherein a later first difference threshold among the multiple first difference thresholds is less than an earlier first difference threshold, the filtering target of the later first difference threshold is a pixel in the multiple pixels of the s-th difference image that is less than or equal to the earlier first difference threshold, and the s-th difference image is one of the multiple difference images, where s is a positive integer; when one or more first pixels are obtained by filtering in any block among multiple blocks of the s-th difference image based on multiple second difference thresholds, the s-th difference image is used as one of the one or more first difference images, wherein different second difference thresholds among the multiple second difference thresholds correspond to different blocks in the s-th difference image.

[0140] The sparsification module is configured to determine sparsification parameters for each region in one or more regions of the s-th downsampled image corresponding to the current image based on the features of multiple second pixels in each region of one or more regions of the s-th downsampled image corresponding to the current image, wherein the s-th downsampled image is one of the multiple downsampled images corresponding to the current image, and s is a positive integer; based on the sparsification parameters for each region in one or more regions of the s-th downsampled image corresponding to the current image, obtain the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image; and based on the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image, perform sparsification processing on the s-th downsampled image to obtain the s-th downsampled sparsed image corresponding to the current image.

[0141] The difference image determination module is used to determine multiple average images based on multiple downsampled sparse images corresponding to the historical image; and to determine multiple difference images based on multiple downsampled sparse images corresponding to the current image and the multiple average images.

[0142] The difference image determination module is used to take the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the historical image as multiple average images to be processed, where s is a positive integer; and to obtain the s-th average image among the multiple average images based on the multiple average images to be processed and the weight corresponding to each average image to be processed.

[0143] As shown in Figure 4, the device further includes:

[0144] The filtering module 401 is used to input the current image to be processed into a two-dimensional Gaussian filter model to obtain a first image to be processed output by the two-dimensional Gaussian filter model; to obtain a second image to be processed based on the current image to be processed and one or more historical images to be processed; and to input the first image to be processed and the second image to be processed into a three-dimensional Gaussian filter model to obtain the current image output by the three-dimensional Gaussian filter model.

[0145] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0146] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0147] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0148] Figure 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0149] As shown in Figure 5, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 can also store various programs and data required for the operation of the electronic device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0150] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0151] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the above methods can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, at least one step of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the above methods by any other suitable means (e.g., by means of firmware).

[0152] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0153] The program code used to implement the methods of this disclosure may be written in any combination of at least one programming language. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0154] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include, based on an electrical connection of at least one wire, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0155] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0156] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0157] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0158] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0159] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An image detection method, comprising: Sparsification is performed on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image, wherein the current image is the image of the target space currently acquired; Based on the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to the historical image, multiple difference images are determined, wherein the multiple difference images are used to represent the differences between the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to the historical image. Based on the multiple difference images, the detection result of the current image is determined, wherein the detection result of the current image indicates whether there is a moving target object in the target space.

2. The method according to claim 1, wherein, Determining the detection result of the current image based on the multiple difference images includes: If one or more first difference images exist among the plurality of difference images, containing one or more first pixels with a difference degree greater than a difference threshold, the detection result of the current image is determined based on the number of one or more first pixels in each of the plurality of first difference images.

3. The method according to claim 2, wherein, The determination of the detection result of the current image based on the number of one or more first pixels in each of the one or more first difference images includes one of the following: If the number of one or more first pixels in any one of the one or more first difference images is greater than a number threshold, the detection result of the current image is determined to be a target object in the target space that is in a moving state. If the number of one or more first pixels in each of the one or more first difference images is less than or equal to a number threshold, the detection result of the current image is determined to be a target object that does not move in the target space.

4. The method according to claim 2, further comprising one of the following: When one or more first pixels are obtained by sequentially filtering multiple pixels of the s-th difference image based on multiple first difference thresholds, the s-th difference image is taken as one of the one or more first difference images, wherein... In the plurality of first difference thresholds, the later first difference threshold is less than the earlier first difference threshold. The filtering target of the later first difference threshold is the pixels in the plurality of pixels of the s-th difference image that are less than or equal to the earlier first difference threshold. The s-th difference image is one of the plurality of difference images, and s is a positive integer. If one or more first pixels are found in any one of the multiple blocks of the s-th difference image based on multiple second difference thresholds, the s-th difference image is taken as one of the one or more first difference images, wherein different second difference thresholds among the multiple second difference thresholds correspond to different blocks in the s-th difference image.

5. The method according to claim 1, wherein, The step of performing sparsification processing on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image includes: Based on the features of multiple second pixels in each region of one or more regions of the s-th downsampled image corresponding to the current image, the sparsification parameters of each region in one or more regions of the s-th downsampled image corresponding to the current image are determined, wherein the s-th downsampled image is one of the multiple downsampled images corresponding to the current image, and s is a positive integer; Based on the sparsification parameters of each region in one or more regions of the s-th downsampled image corresponding to the current image, the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image are obtained. Based on the sparsification range of each region in one or more regions of the s-th downsampled image and the sparsification ratio of each region in one or more regions of the s-th downsampled image, the s-th downsampled image is sparsified to obtain the s-th downsampled sparsified image corresponding to the current image.

6. The method according to claim 1, wherein, The step of determining multiple difference images based on multiple downsampled sparse images corresponding to the current image and multiple downsampled sparse images corresponding to historical images includes: Based on the multiple downsampled sparse images corresponding to the historical images, multiple average value images are determined; Based on the multiple downsampled sparse images corresponding to the current image and the multiple average value images, the multiple difference images are determined.

7. The method according to claim 6, wherein, The step of determining multiple average value images based on multiple downsampled sparse images corresponding to the historical images includes: The s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the historical image are used as multiple average images to be processed, where s is a positive integer; Based on the plurality of average images to be processed and the weight corresponding to each average image to be processed in the plurality of average images to be processed, the s-th average image in the plurality of average images is obtained.

8. The method according to any one of claims 1-7, further comprising: The current image to be processed is input into a two-dimensional Gaussian filter model to obtain the first image to be processed output by the two-dimensional Gaussian filter model. Based on the current image to be processed and one or more historical images to be processed, a second image to be processed is obtained; The first image to be processed and the second image to be processed are input into a three-dimensional Gaussian filter model to obtain the current image output by the three-dimensional Gaussian filter model.

9. An image detection device, comprising: The sparsification module is used to perform sparsification processing on each of the multiple downsampled images corresponding to the current image to obtain multiple downsampled sparsed images corresponding to the current image, wherein the current image is the image of the target space currently acquired; The difference image determination module is used to determine multiple difference images based on multiple downsampled sparse images corresponding to the current image and multiple downsampled sparse images corresponding to historical images, wherein the multiple difference images are used to represent the differences between the multiple downsampled sparse images corresponding to the current image and the multiple downsampled sparse images corresponding to historical images. The detection module is used to determine the detection result of the current image based on the plurality of difference images, wherein the detection result of the current image indicates whether there is a moving target object in the target space.

10. The apparatus according to claim 9, wherein, The detection module is configured to determine the detection result of the current image based on the number of one or more first pixels in each of the multiple difference images when there are one or more first difference images containing one or more first pixels with a difference degree greater than a difference threshold.

11. The apparatus according to claim 10, wherein, The detection module is used to perform one of the following: If the number of one or more first pixels in any one of the one or more first difference images is greater than a number threshold, the detection result of the current image is determined to be a target object in the target space that is in a moving state. If the number of one or more first pixels in each of the one or more first difference images is less than or equal to a number threshold, the detection result of the current image is determined to be a target object that does not move in the target space.

12. The apparatus of claim 10, wherein the detection module is configured to perform one of the following: When one or more first pixels are obtained by sequentially filtering multiple pixels of the s-th difference image based on multiple first difference thresholds, the s-th difference image is taken as one of the one or more first difference images, wherein... In the plurality of first difference thresholds, the later first difference threshold is less than the earlier first difference threshold. The filtering target of the later first difference threshold is the pixels in the plurality of pixels of the s-th difference image that are less than or equal to the earlier first difference threshold. The s-th difference image is one of the plurality of difference images, and s is a positive integer. If one or more first pixels are found in any one of the multiple blocks of the s-th difference image based on multiple second difference thresholds, the s-th difference image is taken as one of the one or more first difference images, wherein different second difference thresholds among the multiple second difference thresholds correspond to different blocks in the s-th difference image.

13. The apparatus according to claim 9, wherein, The sparsification module is configured to determine sparsification parameters for each region in one or more regions of the s-th downsampled image corresponding to the current image based on the features of multiple second pixels in each region of one or more regions of the s-th downsampled image corresponding to the current image, wherein the s-th downsampled image is one of the multiple downsampled images corresponding to the current image, and s is a positive integer; based on the sparsification parameters for each region in one or more regions of the s-th downsampled image corresponding to the current image, obtain the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image; and based on the sparsification range and the sparsification ratio of each region in one or more regions of the s-th downsampled image, perform sparsification processing on the s-th downsampled image to obtain the s-th downsampled sparsed image corresponding to the current image.

14. The apparatus according to claim 9, wherein, The difference image determination module is used to determine multiple average images based on multiple downsampled sparse images corresponding to the historical image; and to determine multiple difference images based on multiple downsampled sparse images corresponding to the current image and the multiple average images.

15. The method according to claim 14, wherein, The difference image determination module is used to take the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the current image and the s-th downsampled sparse image among the multiple downsampled sparse images corresponding to the historical image as multiple average images to be processed, where s is a positive integer; and to obtain the s-th average image among the multiple average images based on the multiple average images to be processed and the weight corresponding to each average image to be processed.

16. The apparatus according to any one of claims 9-15, further comprising: The filtering module is used to input the current image to be processed into a two-dimensional Gaussian filter model to obtain the first image to be processed output by the two-dimensional Gaussian filter model; Based on the current image to be processed and one or more historical images to be processed, a second image to be processed is obtained; The first image to be processed and the second image to be processed are input into a three-dimensional Gaussian filter model to obtain the current image output by the three-dimensional Gaussian filter model.

17. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.

18. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.

19. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.