Method and apparatus for judging image motion and stillness
By fusing differential images of small window and large window frame difference method in image processing, the fusion weight calculation improves the accuracy of judgment of motion and stationary areas in high noise scenes, and solves the problem of misjudgment of frame difference method in high noise scenes.
Patent Information
- Application Number
- CN202010701482.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-20
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2040-07-20
AI Technical Summary
In high noise level scenarios, the existing frame difference method determines that the error rate of the image motion area and the stationary area is high, especially the small filtering window causes the error rate to increase, while the large filtering window causes the motion area to expand, resulting in the increase of the error rate.
The first filter window and the second filter window are respectively used to filter the current frame image and the reference frame image, and differentiate, obtain the first and second differential images, and then calculate the fusion weight based on the second differential image, fuse the first and second differential images, and finally perform binarization processing to judge the motion area and the rest area.
By integrating the advantages of the small window and large window frame difference method, the accuracy of judgment of the motion and rest areas in high noise level scenes is significantly improved, and the noise level and misjudgment rate are reduced.
Smart Images

Figure CN113963018B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision detection, and particularly to a method for judging image motion and stillness and a device for judging image motion and stillness. Background Art
[0002] In related technologies, the frame difference method is usually used to analyze images to judge the moving area and the static area in the images, so that different denoising algorithms are used for the moving area and the static area respectively during denoising. However, due to different noise levels, generally, the two frames of images to be differentiated are first subjected to spatial domain filtering, and then the frame difference method is used to obtain a differential image, and the differential image is binarized using a hard threshold to extract moving and static information respectively.
[0003] However, as the noise level increases, when using the frame difference method to judge the moving area and the static area, the corresponding misjudgment rate will become higher and higher. This is because if a small filtering window is used for filtering, as the image noise level increases, its misjudgment rate becomes larger and larger. If a large filtering window is used for filtering, it will cause the expansion of the moving area, resulting in some small motions being misjudged as static, which will also lead to an increase in the misjudgment rate. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems in the related technologies to some extent. For this purpose, the first object of the present invention is to propose a method for judging image motion and stillness, which can improve the judgment accuracy of the moving area and the static area in a high-noise-level scenario by integrating the advantages of the small-window frame difference method and the large-window frame difference method.
[0005] To achieve the above object, the method for judging image motion and stillness proposed in the first aspect embodiment of the present invention includes the following steps: filtering the current frame image and the reference frame image respectively using a first filtering window, and differentiating the filtered current frame image and reference frame image to obtain a first differential image; filtering the current frame image and the reference frame image respectively using a second filtering window, and differentiating the filtered current frame image and reference frame image to obtain a second differential image, where the second filtering window is larger than the first filtering window; calculating a fusion weight according to the second differential image to obtain a fusion weight, and fusing the first differential image and the second differential image according to the fusion weight to obtain a fused differential image; performing binarization processing on the fused differential image to judge the moving area and the static area.
[0006] The method for judging image motion and stillness according to an embodiment of the present invention filters the current frame image and the reference frame image respectively using a first filtering window, and differentiates the filtered current frame image and reference frame image to obtain a first difference image. At the same time, a second filtering window larger than the first filtering window is used to filter the current frame image and the reference frame image respectively, and the filtered current frame image and reference frame image are differentiated to obtain a second difference image. Then, a fusion weight is calculated based on the second difference image to obtain a fusion weight, and the first difference image and the second difference image are fused according to the fusion weight to obtain a fused difference image. Finally, the fused difference image is binarized to judge the moving area and the static area. Thus, the advantages of the small window frame difference method and the large window frame difference method can be fused, and the judgment accuracy of the moving area and the static area in a high-noise level scene can be greatly improved.
[0007] In addition, the method for judging image motion and stillness according to the above embodiment of the present invention may further have the following additional technical features:
[0008] According to an embodiment of the present invention, calculating a fusion weight based on the second difference image to obtain a fusion weight includes:
[0009] Performing binarization processing on the second difference image Delta2 using a preset hard threshold Thres to obtain a binarized image Val:
[0010]
[0011] Dividing the binarized image into multiple non-overlapping image blocks according to a fixed size, and calculating the sum Sta of Val equal to 1 in each image block;
[0012] Calculating the fusion weight according to the Sta value in each image block.
[0013] According to an embodiment of the present invention, calculating the fusion weight Weight according to the following formula:
[0014]
[0015] where SThresMin is the lower threshold limit and SThresMax is the upper threshold limit.
[0016] According to an embodiment of the present invention, fusing the first difference image and the second difference image according to the following formula:
[0017] Delta = Weight * Delta1 + (1 - Weight) * Delta2
[0018] Wherein, Delta is the fused difference image, Delta1 is the first difference image, and Delta2 is the second difference image.
[0019] According to an embodiment of the present invention, the first filtering window is a 3*3 or 5*5 filtering window, the second filtering window is a 15*15 or 17*17 filtering window, and the size of the image block is 16*16.
[0020] According to an embodiment of the present invention, the reference frame image is the result frame image of time-domain filtering of the previous frame image.
[0021] To achieve the above object, a computer-readable storage medium proposed in the second aspect embodiment of the present invention stores a program for judging image motion and stillness. When the judging program is executed by a processor, the above-mentioned method for judging image motion and stillness is implemented.
[0022] According to the computer-readable storage medium of the embodiment of the present invention, by executing the program for judging image motion and stillness stored thereon by a processor, the advantages of the small-window frame difference method and the large-window frame difference method can be combined, and the judgment accuracy of the motion area and the still area in a high-noise-level scene can be greatly improved.
[0023] To achieve the above object, a computer device proposed in the third aspect embodiment of the present invention includes a memory, a processor, and a program for judging image motion and stillness stored on the memory and executable on the processor. When the processor executes the judging program, the above-mentioned method for judging image motion and stillness is implemented.
[0024] According to the computer device of the embodiment of the present invention, by running the program for judging image motion and stillness stored on the memory by a processor, the advantages of the small-window frame difference method and the large-window frame difference method can be combined, and the judgment accuracy of the motion area and the still area in a high-noise-level scene can be greatly improved.
[0025] To achieve the above object, the image motion and stillness judgment device according to the fourth aspect embodiment of the present invention includes: a first window filtering stage frame difference module, configured to perform filtering processing on the current frame image and the reference frame image respectively using a first filtering window, and perform difference on the filtered current frame image and reference frame image to obtain a first difference image; a second window filtering stage frame difference module, configured to perform filtering processing on the current frame image and the reference frame image respectively using a second filtering window, and perform difference on the filtered current frame image and reference frame image to obtain a second difference image, wherein the second filtering window is larger than the first filtering window; a fusion weight calculation module, configured to calculate a fusion weight according to the second difference image to obtain a fusion weight; a fusion frame difference module, configured to fuse the first difference image and the second difference image according to the fusion weight to obtain a fusion difference image; and a judgment module, configured to perform binarization processing on the fusion difference image to judge the moving area and the static area.
[0026] According to the image motion and stillness judgment device proposed by the embodiment of the present invention, the first window filtering stage frame difference module performs filtering processing on the current frame image and the reference frame image respectively using the first filtering window, and performs difference on the filtered current frame image and reference frame image to obtain a first difference image. At the same time, the second window filtering stage frame difference module performs filtering processing on the current frame image and the reference frame image respectively using the second filtering window, and performs difference on the filtered current frame image and reference frame image to obtain a second difference image. Then, the fusion weight calculation module calculates a fusion weight according to the second difference image to obtain a fusion weight, and the fusion frame difference module fuses the first difference image and the second difference image according to the fusion weight to obtain a fusion difference image. Finally, the judgment module performs binarization processing on the fusion difference image to judge the moving area and the static area. Thus, the image motion and stillness judgment device of the embodiment of the present invention can greatly improve the judgment accuracy of the moving area and the static area in a high-noise level scene by integrating the advantages of the small window frame difference method and the large window frame difference method.
[0027] In addition, the image motion and stillness judgment device according to the above embodiment of the present invention may further have the following additional technical features:
[0028] According to an embodiment of the present invention, when the fusion weight calculation module calculates the fusion weight according to the second difference image,
[0029] perform binarization processing on the second difference image Delta2 using a preset hard threshold Thres to obtain a binarized image Val:
[0030]
[0031] Divide the binarized image into multiple non - overlapping image blocks according to a fixed size, and calculate the sum Sta of the values where Val equals 1 within each image block;
[0032] Calculate the fusion weight according to the Sta value within each image block.
[0033] According to an embodiment of the present invention, calculate the fusion weight Weight according to the following formula:
[0034]
[0035] where SThresMin is the lower threshold and SThresMax is the upper threshold.
[0036] According to an embodiment of the present invention, fuse the first difference image and the second difference image according to the following formula:
[0037] Delta = Weight * Delta1+(1 - Weight)*Delta2
[0038] where Delta is the fused difference image, Delta1 is the first difference image, and Delta2 is the second difference image.
[0039] According to an embodiment of the present invention, the first filtering window is a 3*3 or 5*5 filtering window, the second filtering window is a 15*15 or 17*17 filtering window, and the size of the image block is 16*16.
[0040] According to an embodiment of the present invention, the reference frame image is the result frame image of time - domain filtering of the previous frame image.
[0041] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. Brief Description of the Drawings
[0042] Figure 1 It is a schematic flowchart of a method for judging image motion and stillness according to an embodiment of the present invention;
[0043] Figure 2 It is a schematic flowchart of a method for judging image motion and stillness according to an embodiment of the present invention;
[0044] Figure 3 It is a schematic diagram of weight calculation according to an embodiment of the present invention;
[0045] Figure 4 It is a schematic flowchart of a method for judging image motion and stillness according to a specific embodiment of the present invention;
[0046] Figure 5 Schematic diagram of the current frame image according to an embodiment of the present invention;
[0047] Figure 6 Schematic diagram of the reference frame image according to an embodiment of the present invention;
[0048] Figure 7 Schematic diagram of the differential image obtained by the frame difference method according to the prior art;
[0049] Figure 8 Schematic diagram of binarizing the differential image obtained by the frame difference method;
[0050] Figure 9 Schematic diagram of the first differential image according to an embodiment of the present invention;
[0051] Figure 10 Schematic diagram of binarizing the first differential image according to an embodiment of the present invention;
[0052] Figure 11 Schematic diagram of the second differential image according to an embodiment of the present invention;
[0053] Figure 12 Schematic diagram of binarizing the second differential image according to an embodiment of the present invention;
[0054] Figure 13 Schematic diagram of the fused differential image according to an embodiment of the present invention;
[0055] Figure 14 Schematic diagram of binarizing the fused differential image according to an embodiment of the present invention;
[0056] Figure 15 Schematic diagram of the structure of the computer device according to an embodiment of the present invention;
[0057] Figure 16 Schematic block diagram of the image motion and stillness judgment device according to an embodiment of the present invention. Detailed implementation manners
[0058] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as limiting the present invention.
[0059] The image motion and stillness judgment method and the image motion and stillness judgment device proposed by the embodiments of the present invention are described below with reference to the accompanying drawings.
[0060] Figure 1 It is a schematic flowchart of a method for judging image motion and stillness according to an embodiment of the present invention.
[0061] As Figure 1 shown, the method for judging image motion and stillness includes the following steps:
[0062] S1011, filter the current frame image and the reference frame image respectively using a first filtering window, and perform a difference operation on the filtered current frame image and reference frame image to obtain a first difference image.
[0063] Optionally, in an embodiment of the present invention, the first filtering window may be a 3*3 or 5*5 filtering window, and the filtering process may use mean filtering.
[0064] It can be understood that in the embodiment of the present invention, the first filtering window can be a small window.
[0065] Specifically, a 3*3 or 5*5 filtering window can be used to perform mean filtering on the current frame image (cur) to obtain the filtered current frame image Mean1cur, and a 3*3 or 5*5 filtering window can be used to perform mean filtering on the reference frame image (ref) to obtain the filtered reference frame image Mean1ref.
[0066] Furthermore, obtain the first difference image.
[0067] S1012, filter the current frame image and the reference frame image respectively using a second filtering window, and perform a difference operation on the filtered current frame image and reference frame image to obtain a second difference image, where the second filtering window is larger than the first filtering window.
[0068] Optionally, in an embodiment of the present invention, the second filtering window may be a 15*15 or 17*17 filtering window.
[0069] It can be understood that in the embodiment of the present invention, the second filtering window can be a large window.
[0070] Specifically, a 15*15 or 17*17 filtering window can be used to perform mean filtering on the current frame image (cur) to obtain the filtered current frame image Mean2cur, and a 3*3 or 5*5 filtering window can be used to perform mean filtering on the reference frame image (ref) to obtain the filtered reference frame image Mean2ref.
[0071] Furthermore, obtain the second difference image.
[0072] S102. Calculate the fusion weight according to the second difference image to obtain the fusion weight, and fuse the first difference image and the second difference image according to the fusion weight to obtain the fused difference image.
[0073] It should be understood that since the second filtering window is larger than the first filtering window, the accuracy of determining the stationary area of the second difference image Delta2 is higher than that of the first difference image Delta1. Therefore, in the embodiment of the present invention, the fusion weight is calculated according to the second difference image Delta2 to obtain the fusion weight, and then the first difference image Delta1 and the second difference image Delta2 are fused according to the fusion weight to obtain the fused difference image Delta, so as to improve the judgment of the moving and stationary areas.
[0074] S103. Perform binarization processing on the fused difference image to determine the moving area and the stationary area.
[0075] Optionally, as an embodiment, the fused difference image Delta can be binarized according to a preset motion and stationary judgment threshold DThres:
[0076]
[0077] The area where the binarization result result is 1 is determined as the moving area, and the area where the binarization result result is 0 is determined as the stationary area.
[0078] Thus, the method for judging image motion and stillness in the embodiment of the present invention calculates the fusion weight based on the second difference image obtained by large-window filtering and frame difference processing, and then fuses the first difference image obtained by small-window filtering and frame difference processing and the second difference image obtained by large-window filtering and frame difference processing according to the fusion weight to obtain the fused difference image. Finally, the moving area and the stationary area are judged according to the fused difference image, so that the advantages of the small-window frame difference method and the large-window frame difference method can be fused, and the judgment accuracy of the moving area and the stationary area in a high-noise-level scene can be greatly improved.
[0079] Further, as Figure 2 shown, calculating the fusion weight according to the second difference image to obtain the fusion weight includes the following steps:
[0080] S201. Perform binarization processing on the second difference image Delta2 using a preset hard threshold Thres to obtain a binarized image Val:
[0081]
[0082] S202, divide the binarized image into multiple non - overlapping image blocks according to a fixed size, and calculate the sum Sta of Val equal to 1 within each image block;
[0083] Optionally, as a specific example, the size of each image block can be 16 * 16.
[0084] S203, calculate the fusion weight according to the Sta value within each image block.
[0085] Optionally, in an embodiment of the present invention, calculate the fusion weight Weight according to the following formula:
[0086]
[0087] where SThresMin is the lower threshold and SThresMax is the upper threshold.
[0088] Specifically, as shown in Figure 3 it is possible to calculate the fusion weight according to Sta within each image block.
[0089] Optionally, in an embodiment of the present invention, fuse the first difference image and the second difference image according to the following formula:
[0090] Delta = Weight * Delta1+(1 - Weight)*Delta2
[0091] where Delta is the fused difference image, Delta1 is the first difference image, and Delta2 is the second difference image.
[0092] Thus, by fusing the first difference image and the second difference image according to the fusion weight, a fused difference image can be obtained.
[0093] where the reference frame image is the result frame image of time - domain filtering of the previous frame image.
[0094] According to a specific embodiment of the present invention, as shown in Figure 4 the above - mentioned method for judging image motion and stillness includes the following steps:
[0095] S1, obtain the current frame image.
[0096] S2, obtain the reference frame image.
[0097] S3, perform mean filtering on the current frame image using a 5x5 filtering window and a 15x15 filtering window.
[0098] Thus, perform small - window filtering and large - window filtering on the current frame image.
[0099] S4, perform mean filtering on the reference frame image using 5x5 and 15x15 filtering windows.
[0100] Thus, perform small-window filtering and large-window filtering on the reference frame image.
[0101] S5, perform difference operation on the current frame image and the reference frame image that have been mean-filtered using a 5x5 filtering window to obtain a first difference image.
[0102] Thus, obtain the first difference image through the small-window frame difference method.
[0103] S6, perform difference operation on the current frame image and the reference frame image that have been mean-filtered using a 15x15 filtering window to obtain a second difference image.
[0104] Thus, obtain the second difference image through the large-window frame difference method.
[0105] S7, calculate the fusion weight based on the second difference image to obtain the fusion weight.
[0106] It should be noted that since the misjudgment rate of the stationary area of the first difference image obtained by the small-window frame difference method is higher than that of the second difference image obtained by the large-window frame difference method, therefore, the second difference image obtained by large-window filtering must be used here for calculating the fusion weight, thereby improving the judgment accuracy of the moving area and the stationary area in a high-noise-level scene.
[0107] S8, fuse the first difference image and the second difference image according to the fusion weight to obtain a fused difference image. It can be understood that the fused difference image simultaneously has the advantages of a low misjudgment rate of the moving area of the small-window frame difference method and a low misjudgment rate of the stationary area of the large-window frame difference method.
[0108] S9, perform binarization processing on the fused difference image.
[0109] It should be understood that the moving area and the stationary area of the image can be judged according to the binarization processing result of the fused difference image.
[0110] Specifically, as an example, as Figures 5 to 14 shown, Figure 5 is the current frame image, Figure 6 is the reference frame image, where, if the frame difference method of the related technology is used to analyze the images of Figure 5 and Figure 6 , then the frame difference image as shown in Figure 7 is obtained, and then binarization processing is performed on it to obtain the frame difference binarization image as shown in Figure 8 . It can be seen that there are many noise points in the image, and the image is a high-noise-level scene. At this time, if only the small-window frame difference method is used to obtain as shown in Figure 9The differential image shown is binarized to obtain, as shown in Figure 10 the binarized image shown. It can be seen that there are many noise points and the misjudgment rate is large. If only the large window frame difference method is used to obtain the differential image as shown in Figure 11 and the differential image is binarized to obtain the binarized image as shown in Figure 12 it can be seen that the moving area expands, resulting in some small movements being misjudged as static.
[0111] Therefore, in the method for judging image motion and stillness according to the embodiment of the present invention, after performing image analysis on Figure 5 and Figure 6 using the small window frame difference method and the large window frame difference method, the fusion weight is calculated according to the second differential image, and the first differential image and the second differential image are fused according to the fusion weight to obtain the fused differential image as shown in Figure 13 Then, the fused differential image is binarized to obtain the binarized image as shown in Figure 14 It can be seen that the binarized image of the fused differential image has a significantly lower noise level and a distinct distinction between the moving area and the static area compared to the binarized images of Figure 10 and Figure 12 .
[0112] In summary, according to the method for judging image motion and stillness according to the embodiment of the present invention, the first filtering window is used to filter the current frame image and the reference frame image respectively, and the filtered current frame image and reference frame image are differentiated to obtain the first differential image. At the same time, the second filtering window larger than the first filtering window is used to filter the current frame image and the reference frame image respectively, and the filtered current frame image and reference frame image are differentiated to obtain the second differential image. Then, the fusion weight is calculated according to the second differential image to obtain the fusion weight, and the first differential image and the second differential image are fused according to the fusion weight to obtain the fused differential image. Finally, the fused differential image is binarized to judge the moving area and the static area. Thus, the advantages of the small window frame difference method and the large window frame difference method can be combined, and the judgment accuracy of the moving area and the static area in a high-noise level scene can be greatly improved.
[0113] To implement the above embodiment, the present invention also proposes a computer-readable storage medium. When the instructions in the storage medium are executed by a processor, they are used to execute the method for judging image motion and stillness in the above embodiment, improving the judgment accuracy of the moving area and the static area in a high-noise level scene.
[0114] To implement the above embodiment, as shown in Figure 15As shown in the figure, the present invention also provides a computer device, including: a memory 1203, a processor 1201, and a computer program stored in the memory 1203 and executable on the processor 1201. When the program is executed by the processor 1201, it is used to execute the method for judging image motion and stillness in the above embodiments, and can greatly improve the judgment accuracy of the motion area and the still area in a high-noise-level scene by integrating the advantages of the small-window frame difference method and the large-window frame difference method.
[0115] As Figure 15 shown in the figure, the computer device includes at least one processor 1201, at least one communication interface 1202, at least one memory 1203, and at least one communication bus 1204; in the embodiments of the present invention, the number of the processor 1201, the communication interface 1202, the memory 1203, and the communication bus 1204 is at least one, and the processor 1201, the communication interface 1202, and the memory 1203 complete mutual communication through the communication bus 1204.
[0116] Among them, the memory 1203 can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. Among them, the memory 120 is used to store the program, and after receiving the execution instruction, the processor 1201 executes the program to implement the steps of the method for judging image motion and stillness described in the above embodiments.
[0117] The processor 1201 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0118] In addition, an embodiment of the present invention further provides a determination device corresponding to the method for determining image motion and stillness in the foregoing embodiments of the present invention.
[0119] Figure 16 It is a block diagram of a determination device for image motion and stillness according to an embodiment of the present invention.
[0120] As Figure 16 shown, the determination device 100 for image motion and stillness includes: a first window filtering stage frame difference module 1, a second window filtering stage frame difference module 2, a fusion weight calculation module 3, a fusion frame difference module 4, and a determination module 5.
[0121] Among them, the first window filtering stage frame difference module 1 is used to perform filtering processing on the current frame image and the reference frame image respectively by using a first filtering window, and perform difference on the filtered current frame image and reference frame image to obtain a first difference image; the second window filtering stage frame difference module 2 is used to perform filtering processing on the current frame image and the reference frame image respectively by using a second filtering window, and perform difference on the filtered current frame image and reference frame image to obtain a second difference image, where the second filtering window is larger than the first filtering window; the fusion weight calculation module 3 is used to calculate a fusion weight according to the second difference image; the fusion frame difference module 4 is used to fuse the first difference image and the second difference image according to the fusion weight to obtain a fusion difference image; the determination module 5 is used to perform binarization processing on the fusion difference image to determine the motion area and the still area.
[0122] Furthermore, when the fusion weight calculation module 3 further calculates the fusion weight according to the second difference image,
[0123] perform binarization processing on the second difference image Delta2 by using a preset hard threshold Thres to obtain a binarized image Val:
[0124]
[0125] divide the binarized image into multiple non-overlapping image blocks according to a fixed size, and calculate the sum Sta of Val equal to 1 in each image block;
[0126] calculate the fusion weight according to the Sta value in each image block.
[0127] Furthermore, the fusion weight calculation module 3 calculates the fusion weight Weight according to the following formula:
[0128]
[0129] where SThresMin is the lower threshold limit and SThresMax is the upper threshold limit.
[0130] Further, the fusion frame difference module 4 fuses the first difference image and the second difference image according to the following formula:
[0131] Delta = Weight * Delta1+(1 - Weight)*Delta2
[0132] where Delta is the fused difference image, Delta1 is the first difference image, and Delta2 is the second difference image.
[0133] Further, the first filtering window is a 3*3 or 5*5 filtering window, the second filtering window is a 15*15 or 17*17 filtering window, and the size of the image block is 16*16.
[0134] Further, the reference frame image is the result frame image of time domain filtering of the previous frame image.
[0135] Since the device described in the above embodiments of the present invention is the device adopted for implementing the method in the above embodiments of the present invention, based on the method described in the above embodiments of the present invention, those skilled in the art can understand the specific structure and deformation of the device, and thus will not be elaborated herein. Any device adopted for the method in the above embodiments of the present invention falls within the scope of protection of the present invention.
[0136] In summary, according to the image motion and stillness judgment device proposed in the embodiments of the present invention, the first window filtering stage frame difference module uses the first filtering window to perform filtering processing on the current frame image and the reference frame image respectively, and performs difference on the current frame image and the reference frame image after filtering processing to obtain the first difference image. At the same time, the second window filtering stage frame difference module uses the second filtering window to perform filtering processing on the current frame image and the reference frame image respectively, and performs difference on the current frame image and the reference frame image after filtering processing to obtain the second difference image. Then, the fusion weight calculation module calculates the fusion weight according to the second difference image to obtain the fusion weight, and the fusion frame difference module fuses the first difference image and the second difference image according to the fusion weight to obtain the fused difference image. Finally, the judgment module performs binarization processing on the fused difference image to judge the moving area and the static area. Thus, the image motion and stillness judgment device of the embodiments of the present invention can greatly improve the judgment accuracy of the moving area and the static area in a high-noise-level scene by integrating the advantages of the small window frame difference method and the large window frame difference method.
[0137] Note that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of the computer-readable medium include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.
[0138] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc. 1
[0139] In the description of this specification, the description referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0140] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention.
[0141] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically and clearly defined.
[0142] In the present invention, unless otherwise clearly specified and limited, the terms "mounted", "connected", "coupled", "fixed", etc. should be construed in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements or the interaction relationship between two elements, unless otherwise clearly limited. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0143] In the present invention, unless otherwise clearly specified and limited, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on top of" the second feature may be that the first feature is directly above or obliquely above the second feature, or merely indicates that the first feature has a higher horizontal height than the second feature. The first feature being "under", "beneath" and "underneath" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature.
[0144] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for judging image motion and stillness, characterized in that, Including the following steps: Filter the current frame image and the reference frame image respectively using a first filtering window, and perform differencing on the filtered current frame image and reference frame image to obtain a first difference image; Filter the current frame image and the reference frame image respectively using a second filtering window, and perform differencing on the filtered current frame image and reference frame image to obtain a second difference image, where the second filtering window is larger than the first filtering window; Calculate a fusion weight according to the second difference image, and fuse the first difference image and the second difference image according to the fusion weight to obtain a fused difference image; Perform binarization processing on the fused difference image to determine the moving area and the static area; Calculating a fusion weight according to the second difference image includes: Adopt a preset hard threshold Perform binaryzation processing on the second difference image to obtain a binary image : ; Divide the binarized image into multiple non - overlapping image patches according to a fixed size, and calculate the sum of those within each image patch that equal to 1 ; Calculate the fusion weights according to the values within each image block.
2. The method for judging image motion and stillness according to claim 1, characterized in that, Calculate the fusion weight according to the following formula :[[]]END]] Among them, is the lower threshold limit, is the upper threshold limit.
3. The method for judging image motion and stillness according to any one of claims 1-2, characterized in that, Fusing the first difference image and the second difference image according to the following formula: Among them, is the fused difference image, is the first difference image, is the second difference image.
4. The method for judging image motion and stillness according to claim 1, characterized in that, The first filtering window is a 3*3 or 5*5 filtering window, the second filtering window is a 15*15 or 17*17 filtering window, and the size of the image block is 16*16.
5. The method for judging image movement and stillness according to claim 1, characterized in that, The reference frame image is the result frame image of time domain filtering of the previous frame image.
6. An apparatus for judging image movement and stillness, characterized in that, Including: A first window filtering stage frame difference module, configured to filter the current frame image and the reference frame image respectively using a first filtering window, and perform differencing on the filtered current frame image and reference frame image to obtain a first difference image; A second window filtering stage frame difference module, configured to filter the current frame image and the reference frame image respectively using a second filtering window, and perform differencing on the filtered current frame image and reference frame image to obtain a second difference image, where the second filtering window is larger than the first filtering window; A fusion weight calculation module, configured to calculate a fusion weight according to the second difference image; A fusion frame difference module, configured to fuse the first difference image and the second difference image according to the fusion weight to obtain a fused difference image; A judgment module, configured to perform binarization processing on the fused difference image to determine the moving area and the static area; When the fusion weight calculation module calculates the fusion weight according to the second difference image, Using a preset hard threshold perform binarization on the second difference image to obtain a binary image : ; Divide the binarized image into multiple non - overlapping image blocks according to a fixed size, and calculate the sum of the values equal to 1 within each image block equal to 1 ; Calculate the fusion weight according to the value within each image block.
7. The apparatus for judging image motion and stillness according to claim 6, characterized in that, Calculate the fusion weight according to the following formula : Among them, is the lower threshold limit, is the upper threshold limit.
8. The image motion and stillness determination device according to any one of claims 6-7, characterized in that The fusion frame difference module fuses the first difference image and the second difference image according to the following formula: Wherein, is the fused difference image, is the first difference image, is the second difference image.
Citation Information
Patent Citations
Denoising device and method for sequence image
CN106251318A