Picture anomaly detection method and device based on continuous video, electronic equipment and storage medium

By performing picture blur and displacement detection in continuous video of the fixed image acquisition device, and using fuzzy classification and feature matching models to generate alarm signals, the video abnormality problem caused by untimely inspection of camera points is solved, and automated picture abnormality detection and timely alarm are realized.

CN120451862APending Publication Date: 2025-08-08CHINA NAT BUILDING MATERIALS TECH CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510527962.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the existing surveillance video system, untimely inspection and maintenance of camera points lead to abnormal video images, unable to effectively monitor the environment and personnel, consume a lot of human resources and pose a risk of loss.

Method used

By acquiring the first image and the second image in the continuous video collected by the same fixed image acquisition device, the picture blur and displacement detection are performed, and the alarm signal is generated using the fuzzy classification model and the feature matching model to identify and classify the picture abnormality type.

Benefits of technology

It realizes automatic screen abnormality detection of continuous videos, reduces the need for manual inspection, timely identify and deal with equipment failures and environmental interference, and ensures the normal operation of video surveillance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451862A_ABST
    Figure CN120451862A_ABST
Patent Text Reader

Abstract

The invention discloses a picture anomaly detection method and device based on continuous videos, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first image serving as a detection reference and a second image to be subjected to anomaly detection from a continuous video acquired by the same fixed image acquisition device; performing image fuzzy detection based on the first image and the second image to obtain an image fuzzy detection result; inputting the second image into a fuzzy classification model to obtain a fuzzy type under the condition that the image fuzzy detection result is that the image is fuzzy; and generating a fuzzy alarm signal based on the fuzzy type and the image fuzzy detection result. According to the invention, picture anomaly detection of continuous videos can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, electronic device, and storage medium for detecting anomalies in images based on continuous video. Background Art

[0002] With the rapid development of security monitoring technology, cameras are widely used as monitoring video acquisition devices.

[0003] To ensure the normality of surveillance video images, camera points need to be inspected and maintained regularly, which will consume a lot of human resources. If the inspection and maintenance of camera points are not timely, the video images will become abnormal, and the environment, personnel, equipment, etc. cannot be monitored normally, which may cause irreparable losses. Summary of the Invention

[0004] The present invention provides a method, device, electronic equipment, and storage medium for detecting picture anomalies based on continuous video, so as to realize the detection of picture anomalies in continuous video.

[0005] According to one aspect of the present invention, a method for detecting anomalies in a continuous video is provided, comprising:

[0006] Acquire a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos captured by a same fixed image acquisition device;

[0007] performing image blur detection based on the first image and the second image to obtain an image blur detection result;

[0008] When the image blur detection result is image blur, inputting the second image into a blur classification model to obtain a blur type;

[0009] A blur warning signal is generated based on the blur type and the image blur detection result.

[0010] According to another aspect of the present invention, there is provided a device for detecting anomalies in a continuous video image, comprising:

[0011] An image acquisition module, configured to acquire a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos acquired by a same fixed image acquisition device;

[0012] a blur detection module, configured to perform image blur detection based on the first image and the second image to obtain an image blur detection result;

[0013] a blur type determination module, configured to input the second image into a blur classification model to obtain a blur type when the picture blur detection result indicates that the picture is blurred;

[0014] An alarm signal generating module is used to generate a blur alarm signal based on the blur type and the image blur detection result.

[0015] According to another aspect of the present invention, an electronic device is provided, comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for detecting anomalies based on continuous video according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for detecting anomalies based on continuous video according to any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention acquires a first image serving as a detection reference and a second image to be detected for anomalies from continuous video captured by the same fixed image acquisition device; performs image blur detection based on the first and second images to obtain an image blur detection result; if the image blur detection result indicates image blur, inputs the second image into a fuzzy classification model to obtain a blur type; and generates a fuzzy alarm signal based on the blur type and the image blur detection result. This enables image anomaly detection in continuous video.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 This is a flow chart of a method for detecting anomalies in a continuous video according to the first embodiment of the present invention;

[0024] Figure 2 This is a flow chart of a method for detecting anomalies in a continuous video according to a second embodiment of the present invention;

[0025] Figure 3 This is an example diagram of a displacement warning image provided by the second embodiment of the present invention;

[0026] Figure 4 1 is a schematic structural diagram of a device for detecting anomalies in a continuous video according to a third embodiment of the present invention;

[0027] Figure 5 This is a structural diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only 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 making creative efforts should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] Figure 1 This is a flow chart of a method for detecting anomalies in a continuous video image provided by the first embodiment of the present invention. This embodiment is applicable to the case of detecting anomalies in images of fixed cameras. The method can be performed by a device for detecting anomalies in a continuous video image. The device can be implemented in the form of hardware and / or software. The device can be configured in electronic devices such as computers and servers. Figure 1 As shown, the method includes:

[0032] S110 , acquiring a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos captured by a same fixed image acquisition device.

[0033] The image acquisition device refers to a fixed image acquisition device used to perform monitoring tasks. For example, the image acquisition device can be a surveillance camera used in scenarios such as factory monitoring or road scenes, and is used to capture images from a fixed angle. In an embodiment of the present invention, a fixed image acquisition device captures continuous video from a fixed angle. The clear image of the first frame in the continuous video frames can be used as the first image, and the image corresponding to the current video frame can be used as the second image. The second image is then detected for anomalies using the first image as the detection reference.

[0034] S120: Perform image blur detection based on the first image and the second image to obtain an image blur detection result.

[0035] In the embodiment of the present invention, the second image is subjected to image blur detection based on the first image to obtain an image blur detection result. The image blur detection includes image blur and image non-blur.

[0036] Based on the above embodiment, optionally, the performing of image abnormality detection based on the first image and the second image to obtain an image blur detection result includes: performing edge detection on the first image and the second image based on a preset gradient operator to obtain a first edge image and a second edge image; determining the blurriness of the second image based on the number of first non-zero elements of the first edge image and the number of second non-zero elements of the second edge image; and determining the image blur detection result as image blur when the blurriness of the second image meets an image blur determination condition.

[0037] Among them, the preset gradient operator includes but is not limited to the Sobel operator, the Canny operator, etc. In an embodiment of the present invention, the preset gradient operator is used to perform edge extraction on the first image and the second image respectively to generate corresponding first edge images and second edge images. This process enhances the gradient change of the object contour in the image through the gradient operator, thereby separating the edge features. Further, based on the number of non-zero elements in the first edge image and the number of non-zero elements in the second edge image, the blur index of the second image is calculated. It can be understood that an image with a higher degree of blur will produce fewer or more dispersed non-zero elements during edge detection, resulting in a significant difference in the number of non-zero elements in the two edge images. Among them, the number of non-zero elements is the number of effective edge pixels in the edge image. Furthermore, the image blur judgment condition can be a set blur judgment threshold. If the blur of the second image meets the judgment condition, the image blur detection result is determined to be image blur.

[0038] For example, the Sobel operator can be used to perform edge detection on the first image and the second image respectively to obtain the first edge image and the second edge image, and the number N of non-zero elements in the first edge image can be calculated respectively. base and the number of non-zero elements N of the second edge image now The image blur determination condition can be a preset blur determination threshold N threshold , if N base -N now >N threshold , the second image is a blurred image, and the image blur detection result is determined as image blur.

[0039] S130: When the image blur detection result is image blur, input the second image into a blur classification model to obtain a blur type.

[0040] In an embodiment of the present invention, when the image blur detection result is a blurred image, a blurred area in the second image can be extracted, and multimodal features in the blurred area can be extracted. The multimodal features are fuzzily classified based on a fuzzy classification model to obtain a blur type. The multimodal features include spatial domain features, frequency domain features, and motion features. Blur types include, but are not limited to, equipment failure blur, environmental interference blur, etc. Equipment failure blur can be caused by lens defocus, lens damage, etc. Environmental interference blur can be caused by motion blur, rainy or snowy weather blur, etc., which are not limited here.

[0041] S140: Generate a blur warning signal based on the blur type and the image blur detection result.

[0042] For example, if the blur type is equipment failure blur (such as lens defocus), a level one alarm is triggered, prompting the user to immediately repair the image acquisition equipment; if the blur is environmental interference type (such as motion afterimage), a level two alarm is triggered, prompting the user to review the on-site status.

[0043] The technical solution of this embodiment acquires a first image serving as a detection reference and a second image to be detected for anomalies from continuous video captured by the same fixed image acquisition device; performs image blur detection based on the first and second images to obtain an image blur detection result; if the image blur detection result indicates image blur, inputs the second image into a fuzzy classification model to obtain a blur type; and generates a fuzzy alarm signal based on the blur type and the image blur detection result. This enables image anomaly detection in continuous video.

[0044] Example 2

[0045] Figure 2This is a flow chart of a method for detecting anomalies in a continuous video provided by the second embodiment of the present invention. This embodiment, based on the above embodiment, further includes: performing image displacement detection based on the first image and the second image to obtain an image displacement detection result; and generating an image movement alarm signal when the image displacement detection result is image displacement. Figure 2 As shown, the method includes:

[0046] S210 , acquiring a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos captured by a same fixed image acquisition device.

[0047] S220: Perform image blur detection based on the first image and the second image to obtain an image blur detection result.

[0048] S230: When the image blur detection result is image blur, input the second image into a blur classification model to obtain a blur type.

[0049] S240: Generate a blur warning signal based on the blur type and the image blur detection result.

[0050] S250: Perform picture displacement detection based on the first image and the second image to obtain a picture displacement detection result; if the picture displacement detection result is picture displacement, generate a picture movement alarm signal.

[0051] In this embodiment of the present invention, a second image is subjected to image displacement detection based on the first image. If the detection result indicates image displacement, it indicates that the image acquisition device has shifted, and a motion alarm signal is generated. It is understood that since the image acquisition device has a fixed shooting angle, image displacement indicates that the image acquisition device has shifted.

[0052] On the basis of the above embodiment, optionally, the picture displacement detection is performed based on the first image and the second image to obtain a picture displacement detection result, including: inputting the first image and the second image into a pre-trained feature matching model for feature matching to obtain multiple groups of feature matching point pairs; the feature matching model is trained based on image data under different image acquisition conditions, and the image acquisition conditions include one or more of scenes, time periods and lighting; determining the displacement vector between the first image and the second image based on position information of the multiple groups of feature matching point pairs; when the displacement vector between the first image and the second image meets a preset picture displacement detection condition, determining the picture displacement detection result as picture displacement.

[0053] Specifically, image data can be collected under different scenes, time periods and lighting conditions, a data set can be constructed with the collected image data, and a feature matching model can be trained based on the data set to obtain a trained feature matching model. Among them, the feature matching model can be an XFeat model. It is understandable that different shooting scenes (such as city streets, natural scenery, indoor environments, etc.) have different image features, which can enable the model to adapt to image differences in various scenes. The lighting conditions at different time periods (such as daytime, night, dusk, etc.) are different, which will affect the color, brightness, contrast and other features of the image, so that the model can have feature matching capabilities at different time periods. Changes in factors such as light intensity, direction and color will have a significant impact on the image. Training the model under a variety of lighting conditions can better handle image matching problems under different lighting conditions.

[0054] In an embodiment of the present invention, a first image and a second image are input into a pre-trained feature matching model for feature matching, resulting in multiple sets of feature matching point pairs. Feature matching point pairs are points corresponding to regions with similar features in the first and second images, reflecting the position and shape information of objects in the images. Furthermore, for each set of feature matching point pairs, the position coordinates of the matching point pairs in the first and second images are obtained. The displacement vector between the first and second images is calculated by calculating the average displacement of the multiple sets of feature matching point pairs in the first and second images. It will be understood that the displacement vector includes information about the horizontal and vertical displacement of the images, reflecting the relative position change between the images. Furthermore, the displacement vector is compared with preset image displacement detection conditions. If the displacement vector meets the preset image displacement detection conditions, it is determined that image displacement exists between the first and second images, and the image displacement detection result is determined to be image displacement, thereby confirming that the image acquisition device has experienced displacement. The preset image displacement detection conditions are pre-set by those skilled in the art based on specific application requirements and scenario characteristics, such as an image displacement threshold.

[0055] For example, feature matching can be performed on the first image and the second image based on the XFeat model to obtain K groups of matching point pairs. The matching points in the first image are (x base ,y base ), the corresponding matching point in the second image is (x now ,y now ); Calculate the displacement vector between the coordinates of the matching points in the first image and the second image. The displacement vector includes lateral displacement and longitudinal displacement. The lateral displacement can be expressed as The longitudinal displacement can be expressed as The preset image displacement detection condition may be an image displacement threshold D theshold , when the absolute value of the lateral displacement |x avg_diff|>D theshold Or the absolute value of the longitudinal displacement |y avg_diff |>D theshold , it indicates that the first image and the second image are displaced.

[0056] Based on the above embodiment, optionally, after obtaining the multiple groups of feature matching point pairs, the method further includes: comparing the number of groups of the multiple groups of feature matching point pairs with a preset group number threshold; if the number of groups of the multiple groups of feature matching point pairs is less than the preset group number threshold, determining the picture displacement detection result as picture displacement.

[0057] The preset threshold number of pairs is set by those skilled in the art based on actual application scenarios and experience. When the number of feature matching point pairs reaches or exceeds this threshold, the feature matching result is reliable and accurately reflects the displacement between the images. If the number of feature matching point pairs is too small, it indicates a mismatch between the first and second images, indicating displacement between the images.

[0058] In an embodiment of the present invention, whether the image is displaced can be determined by the number of groups of feature matching point pairs. Specifically, the number of groups of feature matching point pairs is compared with a preset group number threshold. If the number of groups of feature matching point pairs is less than the preset group number threshold, it indicates that there is no match between the first image and the second image, and the image displacement detection result is determined to be image displacement. For example, the matching point group number threshold is set to K theshold , when K <K theshold , it indicates that the first image and the second image do not match, and an image acquisition device movement alarm will be output.

[0059] Based on the above embodiment, optionally, the image acquisition device further includes an image acquisition device control device. When the displacement vector between the first image and the second image satisfies a preset displacement detection condition, the method further includes: controlling the image acquisition device control device to reversely adjust the image acquisition device based on the displacement vector to reset the image acquisition device.

[0060] In an embodiment of the present invention, a control device for the image acquisition device can be provided on the image acquisition device, which is used to receive a displacement vector, calculate a corresponding reverse adjustment parameter based on the displacement vector, and reversely adjust the image acquisition device based on the reverse adjustment parameter to reset the image acquisition device.

[0061] For example, if the displacement vector indicates that the image is shifted to the right by 10 pixels, the control device needs to generate an adjustment instruction to shift the image to the left by 10 pixels.

[0062] It should be noted that the control device supports multi-dimensional adjustment such as translation (X / Y axis) and rotation (pitch / yaw / roll) to ensure that the image acquisition device can be accurately reset to its initial position and posture.

[0063] On the basis of the above embodiment, optionally, when the average displacement between the first image and the second image meets the preset displacement detection conditions, the method further includes: generating a displacement warning image based on the first image, the second image, the multiple groups of feature matching point pairs and the displacement vector; wherein, the displacement warning image includes a line segment connecting the first feature matching point in the first image and the second feature matching point in the second image, the number of the multiple groups of feature matching point pairs and one or more of the displacement information.

[0064] In an embodiment of the present invention, the first image and the second image are spliced together to obtain the background of the warning image. A line segment connecting the first feature matching point in the first image and the second feature matching point in the second image is drawn on the spliced image, along with the number of pairs of feature matching points and displacement information. The displacement information includes horizontal and vertical displacements, which are determined based on the displacement vector. For example, Figure 3 This is an example of a displacement warning image provided by the second embodiment of the present invention. Figure 3 As shown, the displacement warning image includes a green line segment connecting the first feature matching point in the first image and the second feature matching point in the second image, showing the local displacement; the number of groups of feature matching point pairs, lateral displacement and longitudinal displacement are marked with red text.

[0065] The technical solution of this embodiment performs picture displacement detection based on the first image and the second image to obtain a picture displacement detection result; if the picture displacement detection result is picture displacement, a picture motion alarm signal is generated, thereby realizing picture displacement detection for continuous video.

[0066] Example 3

[0067] Figure 4 Schematic diagram of the structure of a device for detecting abnormalities in a continuous video according to the third embodiment of the present invention. Figure 4 As shown, the device includes:

[0068] An image acquisition module 410 is configured to acquire a first image serving as a detection reference and a second image to be subjected to anomaly detection from a continuous video captured by a same fixed image acquisition device;

[0069] a blur detection module 420 configured to perform image blur detection based on the first image and the second image to obtain an image blur detection result;

[0070] a blur type determination module 430 for inputting the second image into a blur classification model to obtain a blur type when the picture blur detection result is picture blur;

[0071] The warning signal generating module 440 is configured to generate a blur warning signal based on the blur type and the image blur detection result.

[0072] The technical solution of this embodiment obtains a first image serving as a detection reference and a second image to be detected for anomalies from continuous video captured by the same fixed image acquisition device. Blur detection is performed based on the first and second images to obtain a blur detection result. If the blur detection result indicates blur, the second image is input into a blur classification model to obtain a blur type. A blur alarm signal is generated based on the blur type and the blur detection result. This allows for image anomaly detection in continuous video.

[0073] Based on the above embodiment, optionally, the blur detection module 420 is specifically configured to:

[0074] Edge detection is performed on the first image and the second image based on a preset gradient operator to obtain a first edge image and a second edge image; the blurriness of the second image is determined based on the number of first non-zero elements of the first edge image and the number of second non-zero elements of the second edge image; and when the blurriness of the second image meets the image blur determination condition, the image blur detection result is determined as image blur.

[0075] Based on the above embodiment, optionally, the system further includes a picture displacement detection module, which is used to:

[0076] A picture displacement detection is performed based on the first image and the second image to obtain a picture displacement detection result; and a picture movement alarm signal is generated when the picture displacement detection result is picture displacement.

[0077] Based on the above embodiment, optionally, the picture displacement detection module is specifically configured to:

[0078] The first image and the second image are input into a pre-trained feature matching model for feature matching to obtain multiple groups of feature matching point pairs; the feature matching model is trained based on image data under different image acquisition conditions, and the image acquisition conditions include one or more of scene, time period and lighting; the displacement vector between the first image and the second image is determined based on the position information of the multiple groups of feature matching point pairs; when the displacement vector between the first image and the second image meets the preset picture displacement detection condition, the picture displacement detection result is determined as picture displacement.

[0079] Based on the above embodiment, optionally, the picture displacement detection module is further configured to:

[0080] The number of the plurality of feature matching point pairs is compared with a preset group number threshold, and if the number of the plurality of feature matching point pairs is less than the preset group number threshold, a picture motion alarm signal is generated.

[0081] Based on the above embodiment, optionally, the image acquisition device further includes an image acquisition device control device, and the system further includes an image acquisition device reverse adjustment module, which is configured to:

[0082] The image acquisition device control device is controlled based on the displacement vector to reversely adjust the image acquisition device so as to reset the image acquisition device.

[0083] Based on the above embodiment, optionally, the system further includes a displacement warning image generation module, which is used to:

[0084] A displacement warning image is generated based on the first image, the second image, the multiple groups of feature matching point pairs and the displacement vector; wherein the displacement warning image includes one or more of a line segment connecting a first feature matching point in the first image and a second feature matching point in the second image, the number of the multiple groups of feature matching point pairs and displacement information.

[0085] The image anomaly detection device based on continuous video provided by an embodiment of the present invention can execute the image anomaly detection method based on continuous video provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0086] Example 4

[0087] Figure 5 1 is a structural diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0088] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0089] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0090] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for detecting anomalies in continuous video.

[0091] In some embodiments, the method for detecting anomalies in a continuous video image can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for detecting anomalies in a continuous video image described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for detecting anomalies in a continuous video image by any other appropriate means (e.g., by means of firmware).

[0092] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0093] The computer programs for implementing the continuous video-based anomaly detection method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0094] Example 5

[0095] Embodiment 5 of the present invention further provides a computer-readable storage medium storing computer instructions, the computer instructions being used to cause a processor to execute a method for detecting anomalies in a continuous video, the method comprising:

[0096] Acquire a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos captured by a same fixed image acquisition device;

[0097] performing image blur detection based on the first image and the second image to obtain an image blur detection result;

[0098] When the image blur detection result is image blur, inputting the second image into a blur classification model to obtain a blur type;

[0099] A blur warning signal is generated based on the blur type and the image blur detection result.

[0100] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

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

[0102] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0103] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0104] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0105] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for detecting anomalies in continuous video, characterized in that: include: Acquire a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos captured by a same fixed image acquisition device; performing image blur detection based on the first image and the second image to obtain an image blur detection result; When the image blur detection result is image blur, inputting the second image into a blur classification model to obtain a blur type; A blur warning signal is generated based on the blur type and the image blur detection result.

2. The method according to claim 1, characterized in that The performing image anomaly detection based on the first image and the second image to obtain an image blur detection result includes: Performing edge detection on the first image and the second image based on a preset gradient operator to obtain a first edge image and a second edge image; determining a blurriness of the second image based on a first number of non-zero elements of the first edge image and a second number of non-zero elements of the second edge image; In a case where the blurriness of the second image satisfies a picture blur determination condition, the picture blur detection result is determined as picture blur.

3. The method according to claim 1, characterized in that The method further comprises: performing picture displacement detection based on the first image and the second image to obtain a picture displacement detection result; When the picture displacement detection result is picture displacement, a picture movement alarm signal is generated.

4. The method according to claim 3, characterized in that The performing picture displacement detection based on the first image and the second image to obtain a picture displacement detection result includes: Inputting the first image and the second image into a pre-trained feature matching model for feature matching to obtain multiple sets of feature matching point pairs; the feature matching model is trained based on image data under different image acquisition conditions, the image acquisition conditions including one or more of scene, time period, and lighting; determining a displacement vector between the first image and the second image based on position information of the multiple sets of feature matching point pairs; In a case where the displacement vector between the first image and the second image meets a preset picture displacement detection condition, the picture displacement detection result is determined as picture displacement.

5. The method according to claim 4, characterized in that After obtaining the plurality of feature matching point pairs, the method further includes: The number of the plurality of feature matching point pairs is compared with a preset group number threshold. If the number of the plurality of feature matching point pairs is less than the preset group number threshold, the picture displacement detection result is determined to be picture displacement.

6. The method according to claim 4, characterized in that The image acquisition device further includes an image acquisition device control device. When a displacement vector between the first image and the second image satisfies a preset displacement detection condition, the method further includes: The image acquisition device control device is controlled based on the displacement vector to reversely adjust the image acquisition device so as to reset the image acquisition device.

7. The method according to claim 4, characterized in that When the average displacement between the first image and the second image meets a preset displacement detection condition, the method further includes: generating a displacement warning image based on the first image, the second image, the multiple groups of feature matching point pairs, and the displacement vector; The displacement warning image includes one or more of a line segment connecting a first feature matching point in the first image and a second feature matching point in the second image, the number of the multiple groups of feature matching point pairs, and displacement information.

8. A device for detecting abnormalities in a continuous video, characterized in that: include: An image acquisition module, configured to acquire a first image serving as a detection reference and a second image to be subjected to anomaly detection from continuous videos acquired by a same fixed image acquisition device; a blur detection module, configured to perform image blur detection based on the first image and the second image to obtain an image blur detection result; a blur type determination module, configured to input the second image into a blur classification model to obtain a blur type when the picture blur detection result indicates that the picture is blurred; An alarm signal generating module is used to generate a blur alarm signal based on the blur type and the image blur detection result.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for detecting anomalies based on continuous video according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for detecting anomalies based on continuous video according to any one of claims 1 to 7 when executed.