Moving target detection method and device, computer equipment and readable storage medium

By combining the inter-frame difference method and the background difference method, and using the mixed Gaussian distribution model to dynamically update the background image, the problem of insufficient accuracy of moving target detection in the existing technology is solved, and a more efficient moving target detection effect in the financial field is achieved.

CN118570450APending Publication Date: 2024-08-30PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410725208.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

When the existing inter-frame difference method and background difference method are used to detect moving targets in videos in the financial field, it is difficult to obtain accurate and complete moving target contours, and the background difference method is greatly affected by background changes and cannot meet the actual needs of the financial field. need.

Method used

A mixed Gaussian distribution model is used to describe and update the background image. Combined with the inter-frame difference method and the background difference method, the first and second difference images are obtained by dynamically updating the background image and subtracting them to determine the moving target and achieve motion. The accuracy of target detection is improved.

Benefits of technology

By updating the background image in real time, the accuracy and reliability of moving target detection are improved, and ghosting and hole phenomena are reduced. It is suitable for scenarios such as bank monitoring and insurance risk review, and improves business security and processing effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570450A
    Figure CN118570450A
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, is suitable for the field of digital finance, and provides a moving target detection method and device, computer equipment and a readable storage medium, and the method comprises the steps: obtaining a current background image based on a to-be-detected image sequence; updating a plurality of distributions of each pixel point describing the current background image based on each dynamic update of the to-be-detected image sequence; obtaining a first subtraction image and a second subtraction image based on a newly added dynamic update image after the current background image and the to-be-detected image sequence are dynamically updated each time, a previous adjacent image and a later adjacent image of the dynamic update image, and the dynamic update image; and determining a moving target in the dynamically updated image based on the first subtraction image and the second subtraction image. According to the technical scheme, the accuracy of moving target detection in many scenes involved in the financial fields such as bank monitoring and insurance accident checking is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to the field of image processing technology, and in particular to a moving target detection method and device, a computer device, and a readable storage medium. [Background technology]

[0002] With the continuous development of science and technology, detecting moving targets in videos has become an indispensable key technology in the financial field.

[0003] For example, in a banking scenario, the safety of people in the banking scenario can be determined by identifying and confirming the identities of moving targets in surveillance, and even identifying the movements of moving targets.

[0004] For another example, in an insurance claim review scenario involving a traffic accident, it is often necessary to review surveillance videos of the accident scene, including identifying the insured person in action or identifying the insured's vehicle in action, so as to review the necessity of an insurance claim based on the movement of the insured person or his vehicle.

[0005] In the related art, the purpose of moving target detection can generally be achieved by using methods such as inter-frame difference method and background difference method. Among them, the inter-frame difference method uses the subtraction of two or three adjacent frames to obtain a differential image, from which the moving target is obtained. Although this method is simple to calculate, it is difficult to obtain an accurate and complete outline of the moving target, and the identified moving target is prone to ghosting and holes. The background difference method is to obtain a differential image by subtracting the background frame from the current frame image, and obtain the moving target from it. Although this method is simple to calculate, it is greatly affected by background changes and is only suitable for situations where the background is known. In the case of background position, since it is impossible to obtain an accurate background frame, the accuracy of the moving target finally identified is insufficient.

[0006] In this regard, referring to the above-mentioned banking scenarios and insurance claim review scenarios, it can be seen that the accuracy requirements for moving target detection in videos in the financial field are very high, and both the inter-frame difference method and the background difference method cannot meet the actual moving target detection needs in the financial field.

[0007] Therefore, how to efficiently and accurately identify moving targets in videos has become a technical problem that needs to be solved urgently. [Summary of the invention]

[0008] The embodiments of the present application provide a method and apparatus for detecting a moving target, a computer device, and a readable storage medium, which aim to solve the technical problem that both the inter-frame difference method and the background difference method in the related art cannot meet the actual moving target detection needs in the financial field.

[0009] In a first aspect, an embodiment of the present application provides a moving target detection method, comprising:

[0010] Based on the image sequence to be detected, a current background image is acquired, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model;

[0011] Based on each dynamic update of the sequence of images to be detected, updating multiple distributions describing each pixel of the current background image;

[0012] Determine a first differential image based on the current background image and a dynamically updated image newly added after each dynamic update of the sequence of images to be detected, and obtain a second differential image based on a preceding adjacent image and a succeeding adjacent image of the dynamically updated image and the dynamically updated image;

[0013] subtracting the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image;

[0014] Based on the first subtracted image and the second subtracted image, a moving target within the dynamically updated image is determined.

[0015] In a second aspect, an embodiment of the present application provides a moving target detection device, comprising:

[0016] A background image acquisition unit, configured to acquire a current background image based on a sequence of images to be detected, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model;

[0017] A background image dynamic updating unit, configured to update multiple distributions of each pixel point describing the current background image based on each dynamic update of the image sequence to be detected;

[0018] A difference processing unit, configured to determine a first difference image based on the current background image and a dynamically updated image newly added after each dynamic update of the sequence of images to be detected, and to obtain a second difference image based on a preceding adjacent image and a succeeding adjacent image of the dynamically updated image and the dynamically updated image;

[0019] an image subtraction unit, configured to respectively subtract the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image;

[0020] A moving target identification unit is used to determine the moving target in the dynamically updated image based on the first subtracted image and the second subtracted image.

[0021] In a third aspect, an embodiment of the present application provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the first aspect above.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the method described in the first aspect above.

[0023] The above technical solution aims at the technical problem that both the inter-frame difference method and the background difference method in the related art cannot meet the actual moving target detection needs in the financial field. First, an initial background image, i.e., the current background image, is obtained based on the image sequence to be detected. The current background image is used to reflect the background of the moving target in the video of the moving target to be detected at the current moment.

[0024] Next, based on each dynamic update of the to-be-detected image sequence, multiple distributions describing each pixel point of the current background image are updated.

[0025] The single dynamic update of the image sequence to be detected refers to adding a new image to the end of the image sequence to be detected. Multiple distributions of the mixed Gaussian distribution model are used to describe each pixel in the current background image, and the current background image is updated by updating multiple distributions, so that the background image is dynamically updated based on the update of the video frame, and the reliability of the background image used for moving target detection is improved, thereby further improving the accuracy of moving target detection.

[0026] Then, on the one hand, background difference processing is performed on the current background image and the newly added dynamically updated image after each dynamic update of the sequence of images to be detected, so as to obtain a first difference image. On the other hand, inter-frame difference processing is performed based on the previous adjacent image of the dynamically updated image and the dynamically updated image to obtain a first difference result, and then inter-frame difference processing is performed based on the subsequent adjacent image of the dynamically updated image and the dynamically updated image to obtain a second difference result. Finally, the first difference result and the second difference result are taken as a union to obtain a second difference image. That is, inter-frame difference processing is performed on the dynamically updated image and two adjacent frames of the dynamically updated image.

[0027] Then, the first differential image is subtracted from the dynamically updated image to obtain a differential result of the background differential method of the dynamically updated background image, i.e., a first subtracted image. And, the second differential image is subtracted from the dynamically updated image to obtain a differential result of the inter-frame differential method, i.e., a second subtracted image.

[0028] The first subtracted image is the moving target obtained by the background difference method of the dynamically updated background image, and the second subtracted image is the moving target obtained by the frame difference method. Based on the first subtracted image and the second subtracted image, the moving target in the dynamically updated image is determined, that is, the final moving target is obtained by comprehensively considering the moving target obtained by the background difference method of the dynamically updated background image and the moving target obtained by the frame difference method.

[0029] The above technical solution, based on combining the background difference method with the frame difference method for motion target detection, realizes the update of the current background image by updating the multiple distributions used to describe the current background image, and realizes the real-time update of the background image when the background difference method is applied. In this way, in many scenarios involved in the financial field such as bank monitoring and insurance claim review, the accuracy of the motion targets detected by the background difference method can be improved to improve the security or processing effectiveness of related businesses. At the same time, this technical solution uses the background difference method and the frame difference method, which can dynamically update the background image, to detect motion targets, which can further improve the accuracy of motion target detection in many scenarios involved in the financial field such as bank monitoring and insurance claim review.

Brief Description of the Drawings

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A flow chart of a moving target detection method according to an embodiment of the present application is shown;

[0032] Figure 2 A flow chart of a moving target detection method according to another embodiment of the present application is shown;

[0033] Figure 3 A comparison diagram of a moving target detection method according to an embodiment of the present application and a moving target detection method in related art is shown;

[0034] Figure 4 A block diagram of a moving target detection device according to an embodiment of the present application is shown;

[0035] Figure 5 A block diagram of a computer device according to an embodiment of the present application is shown;

[0036] Figure 6 A block diagram of a computer device according to an embodiment of the present application is shown. [Specific implementation method]

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] The technical solution of the present application aims at the technical problem that both the inter-frame difference method and the background difference method in the related art cannot meet the actual moving target detection needs in the financial field. It proposes to combine the inter-frame difference method with the background difference method, and at the same time, dynamically update the background frame to avoid the technical problem that the original background difference method is inaccurate due to the lack of real-time performance of the fixed background frame. Finally, the background difference method with updated background frame is combined with the inter-frame difference method as the basis for detecting moving targets. The technical solution of the present application is described in detail below through several embodiments.

[0039] Embodiment 1

[0040] Figure 1 A flow chart of a moving target detection method according to an embodiment of the present application is shown.

[0041] like Figure 1 As shown, the process of the moving target detection method according to an embodiment of the present application includes:

[0042] Step 102: acquiring a current background image based on the image sequence to be detected, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model.

[0043] The image sequence to be detected is continuous images in the video of the moving target to be detected. Each image in the image sequence to be detected is arranged in the order of image acquisition time. In other words, each image is stored in association with its own image acquisition time.

[0044] First, an initial background image, namely, a current background image, is obtained based on the image sequence to be detected. The current background image is used to reflect the background of the moving target in the video of the moving target to be detected at the current moment.

[0045] In a possible design, a non-motion dynamically updated image sequence having the same scene as the to-be-detected image sequence may be obtained, and any image in the non-motion dynamically updated image sequence may be determined as the current background image.

[0046] For example, in a bank scenario, if you need to detect moving targets in the area in front of the counter, you can use any frame of the surveillance image when there is no one in front of the counter as the current background image. The image sequence to be detected for detecting moving targets in the area in front of the counter is obtained from the surveillance video of the area in front of the counter during business hours.

[0047] The non-motion dynamically updated image sequence refers to an image sequence that is taken in the same static scene as the image sequence to be detected and has no moving objects. Therefore, any image in the non-motion dynamically updated image sequence can reflect the background distribution of the image sequence to be detected.

[0048] In one possible design, a motion-free dynamically updated image sequence with the same scene as the image sequence to be detected can be obtained, and based on the pixel value of each pixel in each image of the motion-free dynamically updated image sequence, the average pixel value of each pixel in the motion-free dynamically updated image sequence is determined, and then based on the average pixel value of each pixel, the current background image is constructed.

[0049] The non-motion dynamically updated image sequence refers to an image sequence without moving objects that is taken in the same dynamic scene as the image sequence to be detected. Since the background displayed by the non-motion dynamically updated image sequence is dynamic, in order to obtain a fixed background image, the average pixel value of each pixel in the non-motion dynamically updated image sequence in multiple images in the sequence can be calculated. This average value reflects the average color level of the pixel as a background pixel in the non-motion dynamically updated image sequence. Accordingly, the current background image composed of the average pixel value of each pixel can reflect the background information in the dynamic scene where the image sequence to be detected is located.

[0050] For example, in an insurance claim review scenario involving a traffic accident, a video clip of the surveillance image of the traffic accident scene when no vehicles or pedestrians are passing by can be obtained as a non-motion dynamically updated image sequence.

[0051] Step 104 : Based on each dynamic update of the to-be-detected image sequence, multiple distributions describing each pixel point of the current background image are updated.

[0052] For example, in a bank scenario, the surveillance video of the area in front of the counter continuously adds new video frames as time goes by. In the surveillance video of the area in front of the counter, the video from the current moment to one minute ago is taken as the image sequence to be detected. As time goes by, the surveillance video captures a new frame of image, and the new frame of image is regarded as a dynamic update of the image sequence to be detected.

[0053] The new frame of image captures the situation in the area in front of the counter at the time of the new addition. If the background changes such as the movement of the device in front of the counter during this period, the background changes in the image sequence to be detected and the new frame of image can be regarded as changed, that is, the color information of the pixels in some areas of the image has changed over time. Therefore, in order to still accurately identify the human activities in the area in front of the counter, the background image needs to be updated.

[0054] The single dynamic update of the sequence of images to be detected refers to adding a new image to the end of the sequence of images to be detected.

[0055] In a possible design, the to-be-detected image sequence is dynamically updated as the video is captured in real time, that is, images are added one by one at the end as the video is captured in real time.

[0056] In another possible design, the video of the moving target to be detected is a video that has been shot. In order to detect the moving target therein, the first specified number of image frames in the video are first formed into an image sequence to be detected, and then the other image frames in the video are sequentially added to the image sequence to be detected one by one as an update to the image sequence to be detected.

[0057] Multiple distributions of a mixed Gaussian distribution model are used to describe each pixel in the current background image, and the current background image is updated by updating multiple distributions, thereby dynamically updating the background image based on the update of the video frame, improving the reliability of the background image used for motion target detection, thereby further improving the accuracy of motion target detection.

[0058] Step 106, determining a first differential image based on the current background image and a dynamically updated image added after each dynamic update of the image sequence to be detected, and obtaining a second differential image based on the preceding adjacent image and the succeeding adjacent image of the dynamically updated image and the dynamically updated image.

[0059] On the one hand, background difference processing is performed on the current background image and the dynamically updated image newly added after each dynamic update of the sequence of images to be detected, so as to obtain a first differential image.

[0060] On the other hand, inter-frame difference processing is performed based on the previous adjacent image of the dynamically updated image and the dynamically updated image to obtain a first difference result, and then inter-frame difference processing is performed based on the subsequent adjacent image of the dynamically updated image and the dynamically updated image to obtain a second difference result. Finally, the first difference result and the second difference result are taken as a union to obtain a second difference image. That is, inter-frame difference processing is performed on the dynamically updated image and two adjacent frames of the dynamically updated image.

[0061] Step 108 : Subtract the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image.

[0062] The first differential image is subtracted from the dynamically updated image to obtain a differential result of a background differential method for a dynamically updated background image, namely, a first subtracted image.

[0063] The second differential image is subtracted from the dynamically updated image to obtain a differential result of an inter-frame difference method, namely, a second subtracted image.

[0064] Step 110: determining a moving target in the dynamically updated image based on the first subtracted image and the second subtracted image.

[0065] The first subtracted image is the moving target obtained by the background difference method of the dynamically updated background image, and the second subtracted image is the moving target obtained by the frame difference method. Based on the first subtracted image and the second subtracted image, the moving target in the dynamically updated image is determined, that is, the final moving target is obtained by comprehensively considering the moving target obtained by the background difference method of the dynamically updated background image and the moving target obtained by the frame difference method.

[0066] The above technical solution, based on combining the background difference method with the frame difference method for motion target detection, realizes the update of the current background image by updating the multiple distributions used to describe the current background image, and realizes the real-time update of the background image when the background difference method is applied. In this way, in many scenarios involved in the financial field such as bank monitoring and insurance claim review, the accuracy of the motion targets detected by the background difference method can be improved to improve the security or processing effectiveness of related businesses. At the same time, this technical solution uses the background difference method and the frame difference method, which can dynamically update the background image, to detect motion targets, which can further improve the accuracy of motion target detection in many scenarios involved in the financial field such as bank monitoring and insurance claim review.

[0067] Embodiment 2

[0068] Figure 2 A flow chart of a moving target detection method according to another embodiment of the present application is shown.

[0069] like Figure 2 As shown, the process of a moving target detection method according to another embodiment of the present application includes:

[0070] Step 202: acquiring a current background image based on the image sequence to be detected, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model.

[0071] The image sequence to be detected is continuous images in the video of the moving target to be detected. Each image in the image sequence to be detected is arranged in the order of image acquisition time. In other words, each image is stored in association with its own image acquisition time.

[0072] First, an initial background image, namely, a current background image, is obtained based on the image sequence to be detected. The current background image is used to reflect the background of the moving target in the video of the moving target to be detected at the current moment.

[0073] In a possible design, a non-motion dynamically updated image sequence having the same scene as the to-be-detected image sequence may be obtained, and any image in the non-motion dynamically updated image sequence may be determined as the current background image.

[0074] The non-motion dynamically updated image sequence refers to an image sequence that is taken in the same static scene as the image sequence to be detected and has no moving objects. Therefore, any image in the non-motion dynamically updated image sequence can reflect the background distribution of the image sequence to be detected.

[0075] In one possible design, a motion-free dynamically updated image sequence with the same scene as the image sequence to be detected can be obtained, and based on the pixel value of each pixel in each image of the motion-free dynamically updated image sequence, the average pixel value of each pixel in the motion-free dynamically updated image sequence is determined, and then based on the average pixel value of each pixel, the current background image is constructed.

[0076] The non-motion dynamically updated image sequence refers to an image sequence without moving objects that is taken in the same dynamic scene as the image sequence to be detected. Since the background displayed by the non-motion dynamically updated image sequence is dynamic, in order to obtain a fixed background image, the average pixel value of each pixel in the non-motion dynamically updated image sequence in multiple images in the sequence can be calculated. This average value reflects the average color level of the pixel as a background pixel in the non-motion dynamically updated image sequence. Accordingly, the current background image composed of the average pixel value of each pixel can reflect the background information in the dynamic scene where the image sequence to be detected is located.

[0077] Step 204: for each pixel in the current background image, generate a new distribution based on the new pixel value corresponding to the pixel in the new image.

[0078] The single dynamic update of the image sequence to be detected refers to the addition of a new image at the end of the image sequence to be detected. Since the sizes of the images in the image sequence to be detected are the same, the positions and numbers of the pixels in the images are the same. In other words, the image sequence to be detected is equivalent to the color update of each pixel in the pixel set over time.

[0079] On this basis, a new distribution can be generated based on the new pixel value corresponding to the pixel point in the new image. The new distribution represents the color presentation of the pixel point in the new image.

[0080] Step 206, determine whether the current distribution of the pixel points has a target distribution that matches the newly added distribution. If the judgment result is that the current distribution set of the pixel points has a target distribution that matches the newly added distribution, go to step 208; if the judgment result is that the current distribution set of the pixel points does not have a target distribution that matches the newly added distribution, go to step 210.

[0081] It is determined whether the current distribution of the pixel points has a target distribution that matches the newly added distribution, and the matching degree between each current distribution of the pixel points and the newly added distribution may be calculated.

[0082] In one possible design, the matching between distributions is calculated as:

[0083]

[0084] Wherein, t is the current time, k is the sequential identifier of the multiple current distributions of the pixel point at the current time t, M k (t) is the matching degree between the kth current distribution and the newly added distribution of the pixel at the current time t, is the condition that must be met for the matching degree between the kth current distribution and the newly added distribution of the pixel point at the current time t to be 1, that is, the condition that is met for the match.

[0085] Among them, X t is the pixel value of the pixel at the current time t, μ k (t) is the variance of the kth distribution of the pixel at the current time t, γ is the variance coefficient, which takes any value between 3 and 7, is the standard deviation of the kth distribution of the pixel at the current time t.

[0086] Based on the above matching degree calculation scheme, if the current distribution of the pixel point has a target distribution whose matching degree with the newly added distribution is 1, then the target distribution is considered to match the newly added distribution. If the matching degree between the newly added distribution of the pixel point and a certain distribution in the current distribution is 0, then the newly added distribution is considered to not match the distribution.

[0087] Step 208: Update the current distribution set based on the arrangement order of the current distribution set and each distribution in the newly added distribution, wherein the arrangement order is distributed from large to small according to the ratio of the priority coefficient to the standard deviation parameter of the current distribution set and each distribution in the newly added distribution at the current moment.

[0088] Specifically, the current distribution set and each distribution in the newly added distribution may be sorted from large to small according to the ratio of the priority coefficient to the standard deviation parameter of each distribution at the current moment to obtain a distribution sequence. Further, the last distribution of the distribution sequence is deleted to obtain an updated current distribution set.

[0089] Among them, the priority coefficient of a single distribution at the current moment is used to determine the probability of the distribution appearing in the background image at the current moment. In other words, the higher the priority coefficient of a single distribution at the current moment, the higher the probability of its staying in the background image. At the same time, this probability is affected by the standard deviation of each distribution at the current moment, so the standard deviation parameter can be obtained based on the standard deviation of each distribution at the current moment, and the ratio of the priority coefficient of each distribution to the standard deviation parameter at the current moment is obtained to reflect the probability of each distribution staying in the background image.

[0090] Since the arrangement order of the current distribution set and the newly added distribution is distributed from large to small according to the ratio of the priority coefficient of each distribution to the standard deviation parameter at the current moment, the distribution ranked last is the distribution with the least possibility of staying in the background image. At this time, in order to update the current background image and make it more accurate, the distribution with the least possibility of staying in the background image can be deleted to complete the dynamic update of the current background image.

[0091] Step 210: Delete the distribution with the smallest priority coefficient from the current distribution set and the newly added distribution.

[0092] On the contrary, if the judgment result is that the current distribution set of the pixel point does not have a target distribution that matches the newly added distribution, the current distribution set and the newly added distribution can be directly sorted according to the priority coefficient. The distribution at the end of the deck, that is, the distribution with the smallest priority coefficient, is also the distribution with the smallest possibility of staying in the background image. Therefore, it can be deleted to complete the dynamic update of the current background image and improve the accuracy of the background image.

[0093] Step 212, based on the current background image and the dynamically updated image added after each dynamic update of the image sequence to be detected, determine the first differential image, and based on the previous adjacent image and the subsequent adjacent image of the dynamically updated image and the dynamically updated image, obtain the second differential image.

[0094] First, background difference processing is performed on the current background image and the newly added dynamically updated image after each dynamic update of the sequence of images to be detected to obtain a first difference image. Next, inter-frame difference processing is performed based on the previous adjacent image of the dynamically updated image and the dynamically updated image to obtain a first difference result, and then inter-frame difference processing is performed based on the subsequent adjacent image of the dynamically updated image and the dynamically updated image to obtain a second difference result. Finally, the first difference result and the second difference result are taken as a union to obtain a second difference image. That is, inter-frame difference processing is performed on the dynamically updated image and two adjacent frames of the dynamically updated image.

[0095] Step 214: Subtract the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image.

[0096] The first differential image is subtracted from the dynamically updated image to obtain the differential result of the background differential method of the dynamically updated background image, i.e., the first subtracted image. Similarly, the second differential image is subtracted from the dynamically updated image to obtain the differential result of the inter-frame differential method, i.e., the second subtracted image. The first subtracted image and the second subtracted image are the basis for detecting the moving target.

[0097] Step 216: Obtain an intersection image of the respective binarized images of the first subtracted image and the second subtracted image.

[0098] The first subtracted image is the moving target obtained by the background difference method of dynamically updating the background image, and the second subtracted image is the moving target obtained by the inter-frame difference method. The intersection image of the binary images of the first subtracted image and the second subtracted image reflects the same part of the two moving target detection results obtained by the background difference method and the inter-frame difference method.

[0099] Step 218: Perform noise reduction processing on the intersection image to obtain a noise-reduced image, and identify the moving target in the noise-reduced image.

[0100] Furthermore, the same parts of the two moving target detection results obtained by the background difference method and the frame difference method are subjected to noise reduction processing such as connected component analysis and morphological filtering processing to further improve the accuracy of moving target recognition. At this point, based on the first subtracted image and the second subtracted image, the moving target in the dynamically updated image is determined, that is, the final moving target is obtained by comprehensively considering the moving target obtained by the background difference method of the dynamically updated background image and the moving target obtained by the frame difference method.

[0101] The above technical solution, based on combining the background difference method with the frame difference method for motion target detection, updates the distribution set of single pixel points used to describe the current background image over time to achieve the update of the current background image, and realizes the real-time update of the background image when the background difference method is applied. In this way, in many scenarios involved in the financial field such as bank monitoring and insurance claim review, the accuracy of the motion targets detected by the background difference method can be improved to improve the security or processing effectiveness of related businesses. At the same time, this technical solution uses the background difference method and the frame difference method, which can dynamically update the background image, to detect motion targets, which can further improve the accuracy of motion target detection in many scenarios involved in the financial field such as bank monitoring and insurance claim review.

[0102] It should be supplemented that the specific calculation method of the priority coefficient is: obtain a preset learning rate, and determine the time coefficient at the current moment based on the preset learning rate; based on the time coefficient at the current moment and the priority coefficient of each distribution in the current distribution set of the pixel points at the previous adjacent moment of the current moment, determine the priority coefficient of each distribution in the current distribution set of the pixel points at the current moment.

[0103] The preset learning rate is used to reflect the update rate of the current background image.

[0104] In a possible design, the preset learning rate may be set to a specified value, that is, a fixed update rate is set for the current background image.

[0105] In another possible design, a method for obtaining a preset learning rate includes: determining whether the inverse of the current moment is greater than a specified threshold; if the inverse of the current moment is greater than the specified threshold, setting the inverse of the current moment to the preset learning rate; if the inverse of the current moment is less than or equal to the specified threshold, setting the specified threshold to the preset learning rate.

[0106] In this case, the preset learning rate is inversely proportional to time. The longer the current moment is relative to the starting moment of the current background image update, the smaller the reciprocal. If this reciprocal is directly determined as the preset learning rate, the update speed of the current background image will become slower and slower over time, and its accuracy will also decrease, affecting the accuracy of moving target detection.

[0107] Therefore, the specified threshold value can be set as the minimum value when the reciprocal at the current moment can meet the accuracy requirement of moving target detection. Once the reciprocal at the current moment is lower than the specified threshold value, it means that the reciprocal at the current moment will not meet the accuracy requirement of moving target detection as time goes by. Therefore, the specified threshold value can be directly set as the preset learning rate to meet the minimum accuracy requirement of moving target detection.

[0108] In one embodiment of the present application, optionally, Visual C++2005 and Open CV are used as development tools to test a traffic monitoring video at a processing speed of 15 frames per second.

[0109] Next, the background subtraction method, the frame difference method and the above technical solution of the present application were used for testing respectively. The test results are as follows: Figure 3 shown.

[0110] Figure 3 In the figure, the first column is the original image, the second column is the result obtained by using the background subtraction method, the third column is the result obtained by using the frame difference method, and the last column is the result obtained by using the above-mentioned technical solution of the present application. It can be seen from the experimental results that since the traffic monitoring video is affected by the change of illumination, the moving targets detected by the background subtraction method have more noise, while the moving targets detected by the frame difference method have more obvious ghosting and hole phenomena. The moving targets detected in the last column are more complete and clearer than those detected by the background subtraction method and the frame difference method. It can be seen that applying the above-mentioned technical solution of the present application to the detection of moving targets can reduce the influence of illumination on the detection results of moving targets, while effectively eliminating ghosting and hole phenomena, thereby improving the accuracy of the detection of moving targets.

[0111] Figure 4 A block diagram of a moving target detection device according to an embodiment of the present application is shown.

[0112] like Figure 4 As shown, the embodiment of the present application provides a moving target detection device 400, including:

[0113] A background image acquisition unit 402 is used to acquire a current background image based on a sequence of images to be detected, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model;

[0114] A background image dynamic updating unit 404, configured to update multiple distributions describing each pixel point of the current background image based on each dynamic update of the image sequence to be detected;

[0115] The difference processing unit 406 is used to determine a first difference image based on the current background image and the dynamically updated image added after each dynamic update of the sequence of images to be detected, and obtain a second difference image based on the previous adjacent image and the subsequent adjacent image of the dynamically updated image and the dynamically updated image;

[0116] An image subtraction unit 408, configured to respectively subtract the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image;

[0117] The moving target identification unit 410 is configured to determine a moving target in the dynamically updated image based on the first subtracted image and the second subtracted image.

[0118] The background image acquisition unit 402 is used for:

[0119] Acquire a non-motion dynamically updated image sequence having the same scene as the image sequence to be detected;

[0120] Determine any image in the non-motion dynamically updated image sequence as the current background image; or,

[0121] Based on the pixel value of each pixel in each image of the motion-free dynamically updated image sequence, the average pixel value of each pixel in the motion-free dynamically updated image sequence is determined, and based on the average pixel value of each pixel, the current background image is constructed.

[0122] The background image dynamic updating unit 404 includes:

[0123] A newly added distribution generating unit, configured to generate a newly added distribution for each pixel point in the current background image based on a newly added pixel value corresponding to the pixel point in the newly added image;

[0124] A matching judgment unit, used to judge whether the current distribution of the pixel points has a target distribution that matches the newly added distribution;

[0125] A first execution unit is configured to update the current distribution set based on an arrangement order of the current distribution set and each distribution in the newly added distribution if a judgment result shows that the current distribution set of the pixel point has a target distribution that matches the newly added distribution, wherein the arrangement order is distributed from large to small according to a ratio of a priority coefficient to a standard deviation parameter of each distribution in the current distribution set and the newly added distribution at a current moment;

[0126] The second execution unit is configured to delete a distribution with a smallest priority coefficient from the current distribution set and the newly added distribution if a judgment result shows that the current distribution set of the pixel point does not have a target distribution matching the newly added distribution.

[0127] The first execution unit is used for:

[0128] According to the ratio of the priority coefficient of each distribution to the standard deviation parameter at the current moment, the current distribution set and each distribution in the newly added distribution are sorted from large to small to obtain a distribution sequence;

[0129] The tail distribution of the distribution sequence is deleted to obtain an updated current distribution set.

[0130] The moving object detection device 400 further includes:

[0131] A preset learning rate acquisition unit, used for acquiring a preset learning rate before determining whether the current distribution of the pixel points has a target distribution matching the newly added distribution;

[0132] A time coefficient setting unit, used to determine the time coefficient at the current moment based on the preset learning rate;

[0133] A priority coefficient calculation unit is used to determine the priority coefficient of each distribution in the current distribution set of the pixel points at the current moment based on the time coefficient at the current moment and the priority coefficient of each distribution in the current distribution set of the pixel points at the previous adjacent moment at the current moment.

[0134] The preset learning rate acquisition unit is used for:

[0135] Determine whether the inverse of the current moment is greater than a specified threshold;

[0136] If the inverse of the current moment is greater than the specified threshold, setting the inverse of the current moment to the preset learning rate;

[0137] If the inverse of the current moment is less than or equal to the specified threshold, the specified threshold is set as the preset learning rate.

[0138] The moving target identification unit 410 is used for:

[0139] Acquire an intersection image of respective binarized images of the first subtracted image and the second subtracted image;

[0140] The intersection image is subjected to denoising to obtain a denoised image, and the moving target is identified in the denoised image.

[0141] The moving target detection device 400 uses any of the solutions in the above embodiments, and therefore has all the above technical effects, which will not be repeated here.

[0142] In addition, in one embodiment, the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the information processing method described in any of the above embodiments can be implemented.

[0143] In one embodiment, the present application further provides a computer device, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, the information processing method described in any of the above embodiments can be implemented.

[0144] Any of the above-mentioned computer devices in the embodiments of the present application may exist in various forms, including but not limited to:

[0145] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.

[0146] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.

[0147] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys, wearable devices, and portable car navigation devices.

[0148] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0149] (5) Other electronic devices with data interaction functions.

[0150] In addition, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to perform the following steps:

[0151] Based on the image sequence to be detected, a current background image is acquired, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model;

[0152] Based on each dynamic update of the sequence of images to be detected, updating multiple distributions describing each pixel of the current background image;

[0153] Determine a first differential image based on the current background image and a dynamically updated image newly added after each dynamic update of the sequence of images to be detected, and obtain a second differential image based on a preceding adjacent image and a succeeding adjacent image of the dynamically updated image and the dynamically updated image;

[0154] subtracting the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image;

[0155] Based on the first subtracted image and the second subtracted image, a moving target within the dynamically updated image is determined.

[0156] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant description in the aforementioned method embodiment. In order to avoid repetition, they will not be described one by one here.

[0157] The technical solution of the present application is described in detail above in conjunction with the accompanying drawings. The technical solution of the present application, based on combining the background difference method with the frame difference method for moving target detection, realizes the update of the current background image by updating the multiple distributions used to describe the current background image, and realizes the real-time update of the background image when the background difference method is applied. In this way, in many scenarios involved in the financial field such as bank monitoring and insurance claim review, the accuracy of the moving targets detected by the background difference method can be improved to improve the security or processing effectiveness of related businesses. At the same time, the technical solution uses the background difference method and the frame difference method, which can dynamically update the background image, to detect moving targets, which can further improve the accuracy of moving target detection in many scenarios involved in the financial field such as bank monitoring and insurance claim review.

[0158] It should be understood that, although the terms first, second, etc. may be used to describe the differential images in the embodiments of the present application, the differential images should not be limited to these terms. These terms are only used to distinguish the differential images from each other. For example, without departing from the scope of the embodiments of the present application, the first differential image may also be referred to as the second differential image, and similarly, the second differential image may also be referred to as the first differential image.

[0159] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0160] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0161] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0162] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0163] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0164] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A moving target detection method, characterized in that: include: Based on the image sequence to be detected, a current background image is acquired, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model; Based on each dynamic update of the sequence of images to be detected, updating multiple distributions describing each pixel of the current background image; Determine a first differential image based on the current background image and a dynamically updated image newly added after each dynamic update of the sequence of images to be detected, and obtain a second differential image based on a preceding adjacent image and a succeeding adjacent image of the dynamically updated image and the dynamically updated image; subtracting the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image; Based on the first subtracted image and the second subtracted image, a moving target within the dynamically updated image is determined.

2. The moving target detection method according to claim 1, characterized in that: The step of obtaining the current background image based on the image sequence to be detected includes: Acquire a non-motion dynamically updated image sequence having the same scene as the image sequence to be detected; Determine any image in the non-motion dynamically updated image sequence as the current background image; or, Based on the pixel value of each pixel in each image of the motion-free dynamically updated image sequence, the average pixel value of each pixel in the motion-free dynamically updated image sequence is determined, and based on the average pixel value of each pixel, the current background image is constructed.

3. The moving target detection method according to claim 1, characterized in that: The updating of the multiple distributions of each pixel point describing the current background image based on each dynamic update of the image sequence to be detected includes: For each pixel in the current background image, generating a new distribution based on a new pixel value corresponding to the pixel in the new image; Determine whether the current distribution of the pixel points has a target distribution that matches the newly added distribution; If the judgment result is that the current distribution set of the pixel point has a target distribution that matches the newly added distribution, the current distribution set is updated based on the arrangement order of the current distribution set and each distribution in the newly added distribution, wherein the arrangement order is distributed from large to small according to the ratio of the priority coefficient to the standard deviation parameter of each distribution in the current distribution set and the newly added distribution at the current moment; If the judgment result is that the current distribution set of the pixel point does not have a target distribution that matches the newly added distribution, the distribution with the smallest priority coefficient is deleted from the current distribution set and the newly added distribution.

4. The moving target detection method according to claim 3, characterized in that: The updating of the current distribution set based on the arrangement order of each distribution in the new distribution set includes: According to the ratio of the priority coefficient of each distribution to the standard deviation parameter at the current moment, the current distribution set and each distribution in the newly added distribution are sorted from large to small to obtain a distribution sequence; The tail distribution of the distribution sequence is deleted to obtain an updated current distribution set.

5. The moving target detection method according to claim 3 or 4, characterized in that: Before determining whether the current distribution of the pixel points has a target distribution matching the newly added distribution, the method further includes: Obtaining a preset learning rate, and determining a time coefficient at a current moment based on the preset learning rate; Based on the time coefficient at the current moment and the priority coefficient of each distribution in the current distribution set of the pixel points at the previous adjacent moment at the current moment, the priority coefficient of each distribution in the current distribution set of the pixel points at the current moment is determined.

6. The moving target detection method according to claim 5, characterized in that: The obtaining of a preset learning rate comprises: Determine whether the inverse of the current moment is greater than a specified threshold; If the inverse of the current moment is greater than the specified threshold, setting the inverse of the current moment to the preset learning rate; If the inverse of the current moment is less than or equal to the specified threshold, the specified threshold is set as the preset learning rate.

7. The moving target detection method according to claim 1, characterized in that: The step of determining the moving target in the dynamically updated image based on the first subtracted image and the second subtracted image comprises: Acquire an intersection image of respective binarized images of the first subtracted image and the second subtracted image; The intersection image is subjected to denoising to obtain a denoised image, and the moving target is identified in the denoised image.

8. A moving target detection device, characterized in that: include: A background image acquisition unit, configured to acquire a current background image based on a sequence of images to be detected, wherein each pixel in the current background image is described by multiple distributions of a mixed Gaussian distribution model; A background image dynamic updating unit, configured to update multiple distributions of each pixel point describing the current background image based on each dynamic update of the image sequence to be detected; A difference processing unit, configured to determine a first difference image based on the current background image and a dynamically updated image newly added after each dynamic update of the sequence of images to be detected, and to obtain a second difference image based on a preceding adjacent image and a succeeding adjacent image of the dynamically updated image and the dynamically updated image; an image subtraction unit, configured to respectively subtract the first differential image and the second differential image from the dynamically updated image to obtain a first subtracted image and a second subtracted image; A moving target identification unit is used to determine the moving target in the dynamically updated image based on the first subtracted image and the second subtracted image.

9. A computer device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, wherein the instructions are configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the method according to any one of claims 1 to 7.