Alarm method, device, and electronic equipment based on image detection

By acquiring scene images captured by multiple image acquisition devices, performing image quality evaluation and similarity comparison, determining the equipment information of the target image acquisition device, and performing abnormal detection, the problem of how to improve the accuracy of alarm detection and feedback is solved, and efficient alarm processing is achieved.

CN115762029BActive Publication Date: 2025-03-04CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211455770.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-03-04
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

How to detect preset abnormal situations based on images captured by image acquisition equipment to improve the accuracy of alarm detection and the accuracy of alarm feedback.

Method used

By acquiring scene images captured by multiple image acquisition devices, performing image quality evaluation, determining the image area for similarity comparison, determining the device information of the target image acquisition device, and performing abnormal detection of the scene images captured by the target image acquisition device. If an abnormality is detected, the alarm information is sent to the target alarm information recipient.

Benefits of technology

It improves the accuracy of police detection and the accuracy of police feedback, improves the speed of police processing, and reduces losses caused by police incidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115762029B_ABST
    Figure CN115762029B_ABST
Patent Text Reader

Abstract

The present application discloses an alarm method and device based on image detection, which belongs to the field of target detection technology. The method includes: obtaining a scene image taken by an image acquisition device; performing image quality evaluation on the scene image to obtain an image quality score; determining an image area in the scene image for similarity comparison based on the image quality score; determining device information of a target image acquisition device that photographed the scene image of the target scene based on the similarity of the scene image in the image area; performing anomaly detection on the scene image of the target scene taken by the target image acquisition device to obtain a detection result; when the detection result indicates that an abnormality exists in the target scene, sending an alarm message to the target alarm message recipient based on the device information. The method can combine scene images taken by multiple image acquisition devices to perform anomaly detection and send alarm messages, thereby improving the accuracy of alarm detection and the accuracy of alarm feedback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of target detection, and in particular to an alarm method and device based on image detection, and an electronic device and a computer-readable storage medium. Background Art

[0002] With the implementation of urban safety projects, surveillance cameras are usually installed in some public places in the city to collect videos or images of relevant areas as a data source for monitoring or post-event tracing. With the advancement of technology, the number of image acquisition devices used to collect images has gradually increased: smartphones and car cameras can collect images in the field of view anytime and anywhere. The widespread application of image acquisition devices provides an implementation basis for alarm applications based on image detection. How to perform preset abnormal situation detection based on images taken by image acquisition devices to improve the accuracy of alarm detection and alarm feedback is a problem that needs to be studied. Summary of the invention

[0003] The embodiments of the present application provide an alarm method, device, and electronic device based on image detection, which can perform anomaly detection based on scene images captured by multiple image acquisition devices that capture the same scene, and select a target alarm information recipient to send alarm information based on the geographical location of the image acquisition device, thereby improving the accuracy of alarm detection and the accuracy of alarm feedback.

[0004] In a first aspect, an embodiment of the present application discloses an alarm method based on image detection, the method comprising:

[0005] Acquire a scene image captured by an image acquisition device;

[0006] Performing image quality evaluation on the scene image to obtain an image quality score;

[0007] Determining, according to the image quality score, an image region in the scene image for performing similarity comparison;

[0008] Determining device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene image within the image area;

[0009] Performing anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result;

[0010] When the detection result indicates that an abnormal situation exists in the target scene, an alarm message is sent to a target alarm message recipient according to the device information.

[0011] Optionally, determining the device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene images within the image area includes:

[0012] Obtaining a pixel matrix corresponding to each of the scene images according to pixel values ​​of the pixel points within the image area in each of the scene images;

[0013] According to the scene image similarity expressed by the difference in the grayscale values ​​of pixels in the pixel matrix, device information of a target image acquisition device that captures the scene image of the target scene is determined.

[0014] Optionally, the determining, according to the scene image similarity expressed by the difference in pixel grayscale values ​​in the pixel matrix, device information of a target image acquisition device for capturing the scene image of the target scene includes:

[0015] Calculating the difference between the grayscale values ​​of pixels in every two of the pixel matrixes to obtain the scene similarity of the scene images corresponding to every two of the pixel matrixes;

[0016] When the scene similarity satisfies a preset condition, determining a scene in the two scene images corresponding to the scene similarity as a target scene;

[0017] Determine the two pixel point matrices corresponding to the scene similarity as the traversed pixel point matrices;

[0018] Determine the image acquisition device of the scene image corresponding to the traversed pixel matrix as the first target image acquisition device for photographing the scene image of the target scene;

[0019] Calculate the average value of the traversed pixel matrix to obtain a pixel average value matrix;

[0020] For the target scene, according to the difference between the pixel average value matrix and the pixel grayscale values ​​in the pixel matrix that has not been traversed, find the image acquisition device that captures the scene image of the target scene as the second target image acquisition device;

[0021] The geographical locations of the first target image acquisition device and the second target image acquisition device and the total number of devices are acquired as the device information of the target image acquisition device.

[0022] Optionally, determining, according to the image quality score, an image region in the scene image for performing similarity comparison includes:

[0023] Adjusting the preset radius according to the image quality score to obtain an adjusted radius;

[0024] According to the adjusted radius, a sector-shaped area is determined in the scene image as an image area for similarity comparison.

[0025] Optionally, the device information includes: geographic location and number of devices, and when the detection result indicates that the target scene has an abnormal situation, sending alarm information to a target alarm information recipient according to the device information includes:

[0026] When the detection result indicates that an abnormal situation exists in the target scene, determining a target alarm information recipient according to the geographical location and the number of devices;

[0027] Sending alarm information to the target alarm information recipient, wherein the alarm information includes: the scene image corresponding to the detection result.

[0028] Optionally, determining a target alarm information recipient according to the geographical location and the number of devices includes:

[0029] In response to the number of devices being equal to 1, determining the alarm information receiver to which the geographical location belongs as a target alarm information receiver;

[0030] In response to the number of devices being greater than 1, and the geographical location belonging to more than one alarm information receiver, the alarm information receiver closest to the target scene is determined as a target alarm information receiver.

[0031] Optionally, the device information includes: the number of devices, and the abnormality detection is performed on the scene image of the target scene captured by the target image acquisition device to obtain the detection result, including:

[0032] In response to the number of devices being equal to 1, performing anomaly detection on the scene image of the target scene captured by the target image acquisition device by using a first anomaly detection method based on template matching to obtain a detection result;

[0033] In response to the number of devices being greater than 1, anomaly detection is performed on the scene image of the target scene captured by the target image acquisition device using a second anomaly detection method based on target detection to obtain a detection result.

[0034] In a second aspect, an embodiment of the present application discloses an alarm device based on image detection, the device comprising:

[0035] A scene image acquisition module is used to acquire scene images captured by an image acquisition device;

[0036] An image quality score acquisition module is used to evaluate the image quality of the scene image to obtain an image quality score;

[0037] An image region determination module, used to determine an image region in the scene image for similarity comparison according to the image quality score;

[0038] A device information determination module, used to determine device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene image within the image area;

[0039] an anomaly detection module, used to perform anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result;

[0040] The alarm information sending module is used to send alarm information to a target alarm information receiver according to the device information when the detection result indicates that the target scene has an abnormal situation.

[0041] Optionally, determining the device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene images within the image area includes:

[0042] Obtaining a pixel matrix corresponding to each of the scene images according to pixel values ​​of the pixel points within the image area in each of the scene images;

[0043] According to the scene image similarity expressed by the difference in the grayscale values ​​of pixels in the pixel matrix, device information of a target image acquisition device that captures the scene image of the target scene is determined.

[0044] Optionally, the determining, according to the scene image similarity expressed by the difference in pixel grayscale values ​​in the pixel matrix, device information of a target image acquisition device for capturing the scene image of the target scene includes:

[0045] Calculating the difference between the grayscale values ​​of pixels in every two of the pixel matrixes to obtain the scene similarity of the scene images corresponding to every two of the pixel matrixes;

[0046] When the scene similarity satisfies a preset condition, determining a scene in the two scene images corresponding to the scene similarity as a target scene;

[0047] Determine the two pixel point matrices corresponding to the scene similarity as the traversed pixel point matrices;

[0048] Determine the image acquisition device of the scene image corresponding to the traversed pixel matrix as the first target image acquisition device for photographing the scene image of the target scene;

[0049] Calculate the average value of the traversed pixel matrix to obtain a pixel average value matrix;

[0050] For the target scene, according to the difference between the pixel average value matrix and the pixel grayscale values ​​in the pixel matrix that has not been traversed, find the image acquisition device that captures the scene image of the target scene as the second target image acquisition device;

[0051] The geographical locations of the first target image acquisition device and the second target image acquisition device and the total number of devices are acquired as the device information of the target image acquisition device.

[0052] Optionally, determining, according to the image quality score, an image region in the scene image for performing similarity comparison includes:

[0053] Adjusting the preset radius according to the image quality score to obtain an adjusted radius;

[0054] According to the adjusted radius, a sector-shaped area is determined in the scene image as an image area for similarity comparison.

[0055] Optionally, the device information includes: geographic location and device quantity, and the alarm information sending module is further used to:

[0056] When the detection result indicates that an abnormal situation exists in the target scene, determining a target alarm information recipient according to the geographical location and the number of devices;

[0057] Sending alarm information to the target alarm information recipient, wherein the alarm information includes: the scene image corresponding to the detection result.

[0058] Optionally, determining a target alarm information recipient according to the geographical location and the number of devices includes:

[0059] In response to the number of devices being equal to 1, determining the alarm information receiver to which the geographical location belongs as a target alarm information receiver;

[0060] In response to the number of devices being greater than 1, and the geographical location belonging to more than one alarm information receiver, the alarm information receiver closest to the target scene is determined as a target alarm information receiver.

[0061] Optionally, the device information includes: the number of devices, and the anomaly detection module is further used to:

[0062] In response to the number of devices being equal to 1, performing anomaly detection on the scene image of the target scene captured by the target image acquisition device by using a first anomaly detection method based on template matching to obtain a detection result;

[0063] In response to the number of devices being greater than 1, anomaly detection is performed on the scene image of the target scene captured by the target image acquisition device using a second anomaly detection method based on target detection to obtain a detection result.

[0064] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the image detection-based alarm method described in the embodiment of the present application is implemented.

[0065] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the image detection-based alarm method disclosed in the embodiment of the present application.

[0066] The alarm method based on image detection disclosed in the embodiment of the present application obtains a scene image taken by an image acquisition device; performs image quality evaluation on the scene image to obtain an image quality score; determines an image area in the scene image for similarity comparison based on the image quality score; determines device information of a target image acquisition device that captures the scene image of a target scene based on the similarity of the scene image in the image area; performs anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result. The anomaly detection can be performed in combination with scene images captured by multiple image acquisition devices, which helps to improve the accuracy of alarm detection. Furthermore, when an abnormal situation is detected, an alarm message is sent to a target alarm information recipient based on the device information of the image acquisition device, and the alarm is fed back to the alarm information recipient under its direct jurisdiction, thereby improving the accuracy of alarm feedback. This can increase the alarm processing speed and reduce the losses caused by the occurrence of alarms.

[0067] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] Figure 1 is a flow chart of an alarm method based on image detection disclosed in an embodiment of the present application;

[0070] Figure 2 It is a flow chart of the abnormality detection steps in the image detection-based alarm method disclosed in the embodiment of the present application;

[0071] Figure 3 It is a flowchart of the sub-step of determining the target alarm information receiver in the alarm method based on image detection disclosed in the embodiment of the present application;

[0072] Figure 4 It is a schematic diagram of the structure of an alarm device based on image detection disclosed in an embodiment of the present application;

[0073] Figure 5 A block diagram schematically shows an electronic device for executing the method according to the present application; and

[0074] Figure 6 A storage unit for holding or carrying a program code for implementing the method according to the present application is schematically shown. DETAILED DESCRIPTION

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

[0076] like Figure 1 As shown, an alarm method based on image detection disclosed in an embodiment of the present application includes: steps 110 to 160.

[0077] Step 110: Acquire a scene image captured by an image acquisition device.

[0078] In the embodiment of the present application, the image acquisition device may be a camera, a camcorder, a mobile terminal, a vehicle-mounted camera, or other device with image acquisition and transmission functions.

[0079] The image acquisition device may be an image acquisition device that is fixedly arranged at a designated location and used to capture images of a designated scene, or an image acquisition device whose position changes dynamically. Generally, for an image acquisition device that is fixedly arranged at a certain location in a city, the geographical location of the image acquisition device will be recorded in the database. For an image acquisition device that changes its position dynamically, the geographical location of the image acquisition device can be obtained by calling the system interface of the image acquisition device, and used as the attribute information of the image captured by it.

[0080] In an embodiment of the present application, the image acquisition device can automatically or based on a user trigger, send the captured scene image of the current field of view to a preset server (such as a cloud platform for image processing, a cloud platform for receiving alarm information, etc.).

[0081] Optionally, the server receives scene images uploaded by one or more image acquisition devices.

[0082] In an embodiment of the present application, the scene image acquired by the server may be an image of the same scene taken by one or more image acquisition devices, or may be images of different scenes taken by multiple image acquisition devices.

[0083] Step 120: Perform image quality evaluation on the scene image to obtain an image quality score.

[0084] In an embodiment of the present application, the number of image acquisition devices can change dynamically, and the scene captured by the same image acquisition device can also change dynamically. For the server, it is impossible to determine in advance whether multiple image acquisition devices upload scene images of the same scene at a certain moment. In order to improve the accuracy of image-based abnormal situation detection, the server first needs to determine one or more scenes captured in the acquired scene image as target scenes, and further determine the number of image acquisition devices that capture the scene image of each target scene, as well as the device information of each image acquisition device.

[0085] In an embodiment of the present application, the device information of the image acquisition device includes: the geographical location of the image acquisition device and the number of image acquisition devices. The geographical location of the image acquisition device can be the location of a fixed image acquisition device (such as a city surveillance camera), or the real-time geographical location of an image acquisition device with a dynamically changing location (such as a vehicle-mounted camera, a driving recorder, a user's smart phone, etc.) when acquiring images of the corresponding scene.

[0086] In an embodiment of the present application, a target image acquisition device for acquiring the scene image of the target scene and device information of each target image acquisition device are determined based on the similarity of each scene image.

[0087] In order to reduce the amount of computation for similarity comparison, firstly, an image region in the scene image for similarity comparison is determined according to the quality of the scene image.

[0088] In some embodiments of the present application, the image quality score can be calculated based on one or more image indicators such as the pixel mean, standard deviation, and average gradient of the image. Among them, the mean refers to the average value of the image pixels, which reflects the average brightness of the image. The larger the average brightness, the better the image quality and the higher the image quality score; the standard deviation refers to the discrete degree of the image pixel grayscale value relative to the mean. If the standard deviation is larger, it indicates that the grayscale levels in the image are more dispersed, the image quality is better, and the image quality score is higher; the average gradient can reflect the detail contrast and texture transformation in the image. It reflects the clarity of the image to a certain extent. The larger the average gradient, the better the image quality and the higher the image quality score. Optionally, the image quality score of the scene image can be obtained by calculating the above-mentioned image indicators of the scene image and according to the ratio of the above-mentioned image indicators to the reference image of the same size.

[0089] In some other embodiments of the present application, a full-reference image quality evaluation method based on image pixel statistics can also be used to calculate the corresponding image index value of the scene image, and then, based on the obtained image index value, according to the corresponding relationship between the preset image index value and the image quality score, the image quality score of the scene image is calculated. For example, the image index value can be calculated by using: Peak-Signal to Noise Ratio (PSNR) and mean square error image quality evaluation methods, mutual information evaluation methods based on information entropy in information theory, and structural similarity (SSIM) methods based on structural information.

[0090] The specific implementation method for calculating the above-mentioned image index value of the scene image can be found in the prior art and will not be described in detail in the embodiments of the present application.

[0091] Step 130: determining an image region in the scene image for performing similarity comparison according to the image quality score.

[0092] In some embodiments of the present application, the image quality score is positively correlated with the image quality, that is, the better the image quality, the greater the value of the image quality score, and conversely, the worse the image quality, the smaller the value of the image quality score.

[0093] Considering that a large number of scene image comparisons will cause additional overhead to the server during the image acquisition process, in order to reduce the amount of calculation during the image similarity comparison, for scene images with good image quality, partial areas in the image can be used for similarity comparison to obtain accurate similarity comparison results without the need to perform similarity comparison based on the entire scene image.

[0094] In some embodiments of the present application, the determining of the image area in the scene image for similarity comparison based on the image quality score includes: adjusting the preset radius based on the image quality score to obtain an adjusted radius. That is, based on the adjusted radius, a sector-shaped area is determined in the scene image as the image area for similarity comparison. For example, the area of ​​the image area for similarity comparison can be calculated by the following formula:

[0095] Wherein, Q represents the normalized image quality score, with a value ranging from 0 to 1, R represents the preset radius, and n is the central angle of the sector area.

[0096] In the above formula, the preset radius can be determined based on the scene image and experience. For example, the value of the preset radius R is the radius of the inscribed circle of the scene image.

[0097] In the above formula, the value of n is determined according to the computational requirements. The larger the value of n is, the greater the amount of computation is. For example, n can be 90.

[0098] If the center of the scene image is taken as the vertex of the fan-shaped area and 90 degrees is taken as the central angle of the fan-shaped area, a fan-shaped area with an area of ​​S is determined in the scene image. From the above calculation formula of the image area S, it can be seen that the area size of the scene image is negatively correlated with the image quality score, that is, the higher the image quality score, the smaller the area of ​​the determined image area; conversely, the lower the image quality score, the smaller the area of ​​the determined image area.

[0099] In an embodiment of the present application, the image area can be determined based on the minimum value of the image quality score of the acquired scene images, so that the image area determined in each scene image has the same size, which facilitates similarity comparison.

[0100] Step 140: Determine device information of a target image acquisition device that captures the scene image of a target scene based on the similarity of the scene images within the image area.

[0101] The device information includes: geographic location and number of devices.

[0102] After determining the image area in each scene image for similarity comparison according to the above method, the similarity of the corresponding image areas of every two scene images is further calculated based on the image content in the image area, and based on the calculated similarity, the scenes covered by the acquired scene images and the device information of the image acquisition device that took the scene images of each scene are determined.

[0103] Those skilled in the art should understand that when image acquisition devices A and B capture the same scene and obtain scene images PicA and PicB respectively, the similarity between scene images PicA and PicB will be very high. When there are multiple scene images with high similarity among the scene images acquired by the server, it can be considered that the multiple scene images are scene images obtained by capturing the same scene (for example, recorded as "scene 1"). Furthermore, by analyzing the geographical locations of the image acquisition devices of the multiple scene images, the number of image acquisition devices that captured the same scene (i.e., the aforementioned scene 1") and the geographical location of each image acquisition device can be determined.

[0104] In some embodiments of the present application, determining the device information of the target image acquisition device for capturing the scene image of the target scene based on the similarity of the scene images within the image area includes: obtaining a pixel point matrix corresponding to each scene image based on the pixel values ​​of the pixel points within the image area in each of the scene images; and determining the device information of the target image acquisition device for capturing the scene image of the target scene based on the scene image similarity expressed by the difference in pixel grayscale values ​​in the pixel point matrix.

[0105] Among them, the pixel matrix expresses the pixel value distribution information in the specified image area (i.e., the regional image) of the scene image. In some embodiments of the present application, a sliding window can be constructed, which is a convolution kernel, and the sliding window can extract the sub-pixel features (such as pixel values) of all pixels in the image area covered by the small window; then, the sliding window slides on the scene image to extract all pixels in the aforementioned image area, and obtains the pixel matrix corresponding to the corresponding scene.

[0106] By performing pixel grayscale value difference calculation based on the pixel matrix, the image can be compared at the pixel level grayscale value, and the similarity of two regional images, that is, the similarity of two scene images, can be determined. When the similarity value of the two scene images is greater than the preset threshold after comparison, it can be considered that there are more than one image acquisition device shooting the scene in the scene corresponding to the scene image. If there are multiple scene images whose similarity values ​​are greater than the preset threshold, it can be considered that there are more than one image acquisition device shooting the scene in the scene corresponding to the scene image. By comparing the similarity, all scene images whose similarities meet the preset conditions are found, and the device information of the image acquisition device of the found scene image can be determined.

[0107] Through this step, one or more scenes covered in the acquired scene image and device information of the image acquisition device that captures the scene image of each scene can be determined.

[0108] Step 150: Perform anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result.

[0109] In some embodiments of the present application, the device information includes: the number of devices, performing anomaly detection on the scene image of the target scene photographed by the target image acquisition device to obtain a detection result, including: using an anomaly detection method that matches the number of devices, performing anomaly detection on the scene image of the target scene photographed by the target image acquisition device to obtain a detection result.

[0110] Next, for each scene determined in the above steps, each scene can be used as a target scene respectively. Accordingly, the image acquisition device that acquires the above scene image of the target scene is used as a target image acquisition device. Further anomaly detection is performed on the scene image of each target scene taken by the corresponding target image acquisition device to obtain the detection results of each scene image.

[0111] For example, for the above-mentioned "scene 1", by performing anomaly detection on the scene image PicA taken by the target image acquisition device A and the scene image PicB taken by the target image acquisition device B respectively, the detection results of the scene image PicA and the scene image PicB are obtained.

[0112] From the above operations, it can be seen that the detection results of scene image PicA and scene image PicB reflect whether there is an abnormal situation in "scene 1" (ie, the target scene).

[0113] In some embodiments of the present application, when performing anomaly detection on the scene image, a pre-trained target detection method can be used to detect whether there are pre-defined abnormal things in the scene image. In some other embodiments of the present application, when performing anomaly detection on the scene image, the scene image can also be classified by a pre-trained neural network model to determine whether the scene image is an abnormal category.

[0114] Step 160, when the detection result indicates that the target scene has an abnormal situation, send an alarm message to a target alarm message recipient according to the device information.

[0115] After obtaining the detection results of each scene image, if the detection results indicate that there are abnormal things in the corresponding scene image, or the scene captured by the corresponding scene image is an abnormal scene, the server further sends an alarm message to the target alarm information recipient based on the geographic location of the corresponding scene image.

[0116] Optionally, the geographic location of the scene image is the geographic location of the image acquisition device that captured the scene image when the scene image was captured.

[0117] In some embodiments of the present application, the target alarm information receiver may be a preset alarm information receiver, or an alarm information receiver near the geographical location of the target scene detected as having an abnormal situation (i.e., the geographical location of the image acquisition device that acquires the target scene when acquiring the target image) or an alarm information receiver directly under the geographical location of the target scene with an abnormal situation. The alarm information receiver may be a police station, traffic management department, or other police handling department.

[0118] In some embodiments of the present application, the alarm information sent to the target alarm information recipient may include a scene image of the target scene where an abnormal situation exists, and / or the geographical location of the target scene, so that the target alarm information recipient can manually identify the alarm situation and handle it in a timely manner.

[0119] In order to make the solution of the present application clearer, the specific implementation methods of the aforementioned steps are further illustrated below.

[0120] In some embodiments of the present application, determining the device information of the target image acquisition device that captures the scene image of the target scene based on the scene image similarity expressed by the difference in pixel grayscale values ​​in the pixel point matrix includes: sub-steps S1 to S7.

[0121] Sub-step S1, calculating the difference between the grayscale values ​​of pixels in every two of the pixel point matrices to obtain the scene similarity of the scene images corresponding to every two of the pixel point matrices.

[0122] In some embodiments of the present application, the difference sim of the pixel grayscale values ​​in two pixel matrixes can be calculated by the following formula:

[0123]

[0124] Where W and H represent the size of the window, f1(i, j) and f2(i, j) represent the grayscale values ​​of the pixels in the two pixel matrixes, respectively, and d represents the disparity of the scene images corresponding to the two pixel matrixes. The above formula uses the window as the basic unit to calculate the difference in the pixel grayscale values ​​of the specified image area of ​​the two scene images. After calculating the similarity values ​​under various disparity conditions, the minimum similarity is selected as the scene similarity of the scene images corresponding to the two pixel matrixes.

[0125] In other embodiments of the present application, other methods may be used to calculate the similarity between two images based on the difference in grayscale values ​​of the image pixels, which will not be described in detail in the embodiments of the present application.

[0126] In some other embodiments of the present application, the similarity between two images may be calculated using methods based on edge features, texture features, etc. of the images, which are not listed one by one in the embodiments of the present application.

[0127] Sub-step S2, when the scene similarity satisfies a preset condition, determining the scene in the two scene images corresponding to the scene similarity as the target scene.

[0128] In some embodiments of the present application, a similarity condition may be preset, such as a similarity threshold. When the scene similarity of two scene images calculated is greater than or equal to the similarity threshold, the scene similarity is considered to meet the preset condition. At this time, the two scene images to which the scene similarity belongs are considered to be images obtained by photographing the same scene, and thus, the scene photographed by the two scene images corresponding to the scene similarity is taken as the target scene.

[0129] Sub-step S3, determining the two pixel point matrices corresponding to the scene similarity as the traversed pixel point matrices.

[0130] For example, when the scene similarity satisfies a preset condition, the two pixel point matrices corresponding to the scene similarity are used as the traversed pixel point matrices for subsequent calculation of a pixel point average value matrix.

[0131] Sub-step S4, determining the image acquisition device of the scene image corresponding to the traversed pixel matrix as the first target image acquisition device for photographing the scene image of the target scene.

[0132] Correspondingly, the image acquisition device of the scene image corresponding to the two traversed pixel point matrices determined in the previous step is determined as a target image acquisition device that captures a part of the scene image of the target scene, and is recorded as the "first target image acquisition device".

[0133] In some embodiments of the present application, the target scene, the scene image of the target scene, and the device identification, geographic location, and performance of the target image acquisition device that captured the scene image can be stored in association to facilitate subsequent analysis of the detection results in the geographic location dimension, as well as statistical analysis of the number of target image acquisition devices in the same target scene.

[0134] Sub-step S5, calculating the average value of the traversed pixel matrix to obtain a pixel average value matrix.

[0135] Optionally, the average values ​​of the two traversed pixel point matrices may be calculated by averaging matrix pixels to obtain a pixel point average value matrix.

[0136] Sub-step S6, for the target scene, according to the difference between the pixel average value matrix and the pixel grayscale value in the untraversed pixel matrix, searching for the image acquisition device that captured the scene image of the target scene as the second target image acquisition device.

[0137] For the target scenes (such as "scene 1") corresponding to the two traversed pixel matrixes determined in the above steps, further calculate the difference between the pixel gray values ​​in other pixel matrixes (referred to as "second pixel matrix" in the embodiment of the present application) and the pixel average value matrix, and find the untraversed pixel matrix matr ix1 whose difference meets the preset conditions. Then the scene image corresponding to the found pixel matrix matr ix1 can be considered as the scene image obtained by shooting the target scene (i.e., "scene 1"). Correspondingly, the image acquisition device that shoots the scene image corresponding to the found pixel matrix matr ix1 is used as the target image acquisition device found in this round of traversal, and is recorded as the "second target image acquisition device".

[0138] Next, the average value of the found pixel matrix matr ix1 and the pixel average value matrix is ​​calculated, the pixel average value matrix is ​​updated, and the difference between the pixel grayscale values ​​in other untraversed pixel matrices and the updated pixel average value matrix is ​​repeatedly calculated, and the pixel matrix whose difference meets the preset conditions is continued to be searched until the pixel matrices corresponding to all scene images are traversed.

[0139] Sub-step S7, obtaining the geographical locations of the first target image acquisition device and the second target image acquisition device and the total number of devices as device information of the target image acquisition device.

[0140] At this point, all the scene images obtained by shooting the target scene and the target image acquisition devices corresponding to the images of each target have been found. Furthermore, by analyzing the device identification of the target image acquisition device, the device number of the target image acquisition device shooting the target scene can be obtained. Among them, the device identification can be carried by the attribute information of the scene image. In some embodiments of the present application, the number of the scene images obtained by shooting the target scene can also be used as the device number of the target image acquisition device shooting the target scene.

[0141] In some embodiments of the present application, the geographical location of the target image acquisition device that photographed the scene image can be obtained by analyzing the shooting geographical locations carried by all the scene images obtained by photographing the target scene.

[0142] Finally, the number of devices and the geographical location are used as the device information of the target image acquisition device for capturing the scene image of the target scene.

[0143] like Figure 2 As shown, in the aforementioned step 150, anomaly detection is performed on the scene image of the target scene photographed by the target image acquisition device to obtain a detection result, including: sub-step 1501, sub-step 1502 and sub-step 1503.

[0144] Sub-step 1501, determining whether the number of the target image acquisition device is greater than 1, if so, executing sub-step 1503, otherwise, executing sub-step 1502.

[0145] In some embodiments of the present application, for a certain target scene, when different numbers of image acquisition devices are used to shoot, different anomaly detection algorithms can be used to detect the scene image of the target scene.

[0146] Sub-step 1502, in response to the number of devices being equal to 1, performing anomaly detection on the scene image of the target scene captured by the target image acquisition device by using a first anomaly detection method based on template matching to obtain a detection result.

[0147] In some embodiments of the present application, the first anomaly detection method based on template matching is used to perform anomaly detection on the scene image of the target scene photographed by the target image acquisition device to obtain a detection result, including: based on a pre-trained feature extraction network, performing feature extraction on the scene image of the target scene photographed by the target image acquisition device to obtain image features; and obtaining the detection result of the scene image based on a comparison result of a feature difference between the image features and a preset template scene feature and a preset feature threshold.

[0148] Optionally, the feature extraction network includes: a backbone network, a multi-dimensional feature fusion structure and a prediction layer.

[0149] The backbone network may adopt a Darknet53 network structure. The Darknet53 network structure is further composed of conv (convolutional layer) + batchnorm (batch normalization layer) + mix (activation function). In some embodiments of the present application, the backbone network is formed by sequentially connecting two Darknet53 network structures. The backbone network is used to extract features from the input scene image.

[0150] The multi-dimensional feature fusion structure can be composed of a U-net network and a PSENet2 network connected in sequence, and is used to fuse the features extracted by the backbone network to obtain fused features.

[0151] The prediction layer uses the dbscan algorithm to perform feature mapping on the fused features and determine the detection frame position of the abnormal objects in the scene image, thereby obtaining the background area and foreground area in the scene image.

[0152] Furthermore, according to the image of the background area in the scene image, image features for abnormal matching are further obtained. For example, the image features may be: the average value and covariance of the pixel values ​​of the background area image.

[0153] Afterwards, the image features obtained according to the scene image are calculated to be different from the preset template scene features to obtain the feature difference, and the detection result of the scene image is obtained according to the size relationship between the feature difference and the preset feature threshold. For example, in some embodiments of the present application, anomaly detection can be performed based on the image features of the scene image using the following model:

[0154]

[0155] Among them, r is the preset template scene feature, that is, the observation data based on human experience, which can be understood as the image features of the scenes that the police believe are risky; represents the pixel value covariance of the background area in the scene image, represents the average pixel value of the background area in the scene image, η represents the preset feature threshold, H 1 and H 0 Represent the upper and lower thresholds respectively.

[0156] The above anomaly detection model compares the difference of the obtained picture with a threshold value to determine whether there is an abnormality in the picture.

[0157] Step 1503, in response to the number of devices being greater than 1, performing anomaly detection on the scene image of the target scene captured by the target image acquisition device by using a second anomaly detection method based on target detection to obtain a detection result.

[0158] In some embodiments of the present application, the second anomaly detection method based on target detection is used to perform anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result, including: performing anomaly detection on the scene image of the target scene captured by the target image acquisition device through a pre-trained target detection network to obtain a detection result. The target detection network can be a YOLO-V5s target detection model, or other target detection models.

[0159] By collecting scene images of abnormal situations as training data sets and training a target detection network, in the anomaly detection stage, for an input scene image, the target detection network can identify whether the input scene image is a scene image containing an abnormal situation.

[0160] In the embodiments of the present application, different image anomaly detection methods are used for anomaly detection according to the number of different image acquisition devices, which can improve the accuracy of abnormal situation detection in the image.

[0161] The device information includes: geographic location and number of devices. In the aforementioned step 160, when the detection result indicates that the target scene has an abnormal situation, sending alarm information to a target alarm information recipient based on the device information, including: when the detection result indicates that the target scene has an abnormal situation, determining the target alarm information recipient based on the geographic location and the number of devices; sending alarm information to the target alarm information recipient, wherein the alarm information includes: the scene image corresponding to the detection result.

[0162] In some embodiments of the present application, Figure 3 As shown, determining the target alarm information recipient according to the geographical location and the number of devices includes: sub-step 310, sub-step 320 and sub-step 330.

[0163] In sub-step 310 , it is determined whether the number of the target image acquisition device is greater than 1. If so, sub-step 330 is executed; if not, sub-step 320 is executed.

[0164] Sub-step 320, in response to the number of devices being equal to 1, determining the alarm information receiver to which the geographical location belongs as the target alarm information receiver.

[0165] For example, when an abnormal situation is detected in the scene image of a scene, and only one image acquisition device takes the scene image of the scene, the server sends an alarm message to the police station with jurisdiction over the scene (i.e., the police station with jurisdiction over the geographical location of the image acquisition device that takes the scene image when taking the scene image).

[0166] Sub-step 330, in response to the number of devices being greater than 1, and the geographical location belonging to more than one alarm information receiver, determining the alarm information receiver closest to the target scene as a target alarm information receiver.

[0167] For example, when an abnormal situation is detected in two scene images of a certain scene, the server determines whether the street where the two image acquisition devices that took the two scene images are located is under the jurisdiction of the same police station (that is, the police station with jurisdiction over the geographical location where the image acquisition devices that took the two scene images were located when the scene images were taken). If so, an alarm message is sent to the police station; if not, an alarm message is sent to the police station with jurisdiction closest to the scene.

[0168] The present application also discloses an alarm method based on image detection, which obtains a scene image taken by an image acquisition device; performs image quality evaluation on the scene image to obtain an image quality score; determines an image area in the scene image for similarity comparison based on the image quality score; determines device information of a target image acquisition device that captures the scene image of a target scene based on the similarity of the scene image in the image area; performs anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result. The anomaly detection can be performed on scene images captured by multiple image acquisition devices, which helps to improve the accuracy of alarm detection. Furthermore, when an abnormal situation is detected, an alarm message is sent to a target alarm information recipient based on the device information of the image acquisition device, and the alarm is fed back to the alarm information recipient under its direct jurisdiction, thereby improving the accuracy of alarm feedback. This can increase the alarm processing speed and reduce the losses caused by the occurrence of alarms.

[0169] Correspondingly, the embodiment of the present application also discloses an alarm device based on image detection, such as Figure 4 As shown, the device comprises:

[0170] The scene image acquisition module 410 is used to acquire the scene image captured by the image acquisition device;

[0171] An image quality score acquisition module 420 is used to evaluate the image quality of the scene image to obtain an image quality score;

[0172] An image region determination module 430, configured to determine an image region in the scene image for similarity comparison according to the image quality score;

[0173] The device information determination module 440 is used to determine the device information of the target image acquisition device that captures the scene image of the target scene according to the similarity of the scene image in the image area;

[0174] An anomaly detection module 450 is used to perform anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result;

[0175] The alarm information sending module 460 is used to send alarm information to a target alarm information receiver according to the device information when the detection result indicates that the target scene has an abnormal situation.

[0176] Optionally, determining the device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene images within the image area includes:

[0177] Obtaining a pixel matrix corresponding to each of the scene images according to pixel values ​​of the pixel points within the image area in each of the scene images;

[0178] According to the scene image similarity expressed by the difference in the grayscale values ​​of pixels in the pixel matrix, device information of a target image acquisition device that captures the scene image of the target scene is determined.

[0179] Optionally, the determining, according to the scene image similarity expressed by the difference in pixel grayscale values ​​in the pixel matrix, device information of a target image acquisition device for capturing the scene image of the target scene includes:

[0180] Calculating the difference between the grayscale values ​​of pixels in every two of the pixel matrixes to obtain the scene similarity of the scene images corresponding to every two of the pixel matrixes;

[0181] When the scene similarity satisfies a preset condition, determining a scene in the two scene images corresponding to the scene similarity as a target scene;

[0182] Determine the two pixel point matrices corresponding to the scene similarity as the traversed pixel point matrices;

[0183] Determine the image acquisition device of the scene image corresponding to the traversed pixel matrix as the first target image acquisition device for photographing the scene image of the target scene;

[0184] Calculate the average value of the traversed pixel matrix to obtain a pixel average value matrix;

[0185] For the target scene, according to the difference between the pixel average value matrix and the pixel grayscale values ​​in the pixel matrix that has not been traversed, find the image acquisition device that captures the scene image of the target scene as the second target image acquisition device;

[0186] The geographical locations of the first target image acquisition device and the second target image acquisition device and the total number of devices are acquired as the device information of the target image acquisition device.

[0187] Optionally, determining, according to the image quality score, an image region in the scene image for performing similarity comparison includes:

[0188] Adjusting the preset radius according to the image quality score to obtain an adjusted radius;

[0189] According to the adjusted radius, a sector-shaped area is determined in the scene image as an image area for similarity comparison.

[0190] Optionally, the device information includes: geographic location and device quantity, and the alarm information sending module 460 is further used to:

[0191] When the detection result indicates that an abnormal situation exists in the target scene, determining a target alarm information recipient according to the geographical location and the number of devices;

[0192] Sending alarm information to the target alarm information recipient, wherein the alarm information includes: the scene image corresponding to the detection result.

[0193] Optionally, determining a target alarm information recipient according to the geographical location and the number of devices includes:

[0194] In response to the number of devices being equal to 1, determining the alarm information receiver to which the geographical location belongs as a target alarm information receiver;

[0195] In response to the number of devices being greater than 1, and the geographical location belonging to more than one alarm information receiver, the alarm information receiver closest to the target scene is determined as a target alarm information receiver.

[0196] Optionally, the device information includes: the number of devices, and the anomaly detection module 450 is further used to:

[0197] In response to the number of devices being equal to 1, performing anomaly detection on the scene image of the target scene captured by the target image acquisition device by using a first anomaly detection method based on template matching to obtain a detection result;

[0198] In response to the number of devices being greater than 1, anomaly detection is performed on the scene image of the target scene captured by the target image acquisition device using a second anomaly detection method based on target detection to obtain a detection result.

[0199] The image detection-based alarm device disclosed in the embodiment of the present application is used to implement the image detection-based alarm method described in the embodiment of the present application. The specific implementation methods of each module of the device will not be repeated here, and the specific implementation methods of the corresponding steps in the method embodiment can be referred to.

[0200] An alarm device based on image detection disclosed in an embodiment of the present application obtains a scene image taken by an image acquisition device; performs image quality evaluation on the scene image to obtain an image quality score; determines an image area in the scene image for similarity comparison based on the image quality score; determines device information of a target image acquisition device that takes the scene image of a target scene based on the similarity of the scene image in the image area; performs anomaly detection on the scene image of the target scene taken by the target image acquisition device to obtain a detection result. The anomaly detection can be performed in combination with scene images taken by multiple image acquisition devices, which helps to improve the accuracy of alarm detection. Furthermore, when an abnormal situation is detected, an alarm message is sent to a target alarm information recipient based on the device information of the image acquisition device, and the alarm is fed back to the alarm information recipient under its direct jurisdiction, thereby improving the accuracy of alarm feedback. This can increase the alarm processing speed and reduce the losses caused by the occurrence of alarms.

[0201] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0202] The above is a detailed introduction to an alarm method and device based on image detection provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and a core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0203] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0204] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiment of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0205] For example, Figure 5An electronic device that can implement the method according to the present application is shown. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc. The electronic device traditionally includes a processor 510 and a memory 520 and a program code 530 stored on the memory 520 and can be run on the processor 510, and the processor 510 implements the method described in the above embodiment when executing the program code 530. The memory 520 can be a computer program product or a computer-readable medium. The memory 520 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 520 has a storage space 5201 for the program code 530 of the computer program for executing any method step in the above method. For example, the storage space 5201 for the program code 530 can include various computer programs for implementing the various steps in the above method respectively. The program code 530 is a computer-readable code. These computer programs can be read from one or more computer program products or written into the one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. The computer program includes a computer readable code, and when the computer readable code is executed on an electronic device, the electronic device is caused to execute the method according to the above embodiment.

[0206] The embodiment of the present application further discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the alarm method based on image detection as described in the embodiment of the present application are implemented.

[0207] Such a computer program product may be a computer-readable storage medium, which may have a computer-readable storage medium having a Figure 5 The memory 520 in the electronic device shown in the figure is similar to the storage segment, storage space, etc. The program code can be compressed and stored in the computer-readable storage medium in an appropriate form. The computer-readable storage medium is generally as shown in the reference Figure 6 The portable or fixed storage unit. Generally, the storage unit includes computer readable code 530', which is a code read by a processor. When the code is executed by the processor, each step in the method described above is implemented.

[0208] The term "one embodiment", "embodiment" or "one or more embodiments" herein means that a particular feature, structure or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the examples of the term "in one embodiment" here do not necessarily all refer to the same embodiment.

[0209] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0210] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0211] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An alarm method based on image detection, characterized in that: The method comprises: Acquire a scene image captured by an image acquisition device; Performing image quality evaluation on the scene image to obtain an image quality score; Determining, according to the image quality score, an image region in the scene image for performing similarity comparison; Determining device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene images within the image area; Performing anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result; When the detection result indicates that an abnormal situation exists in the target scene, sending an alarm message to a target alarm message recipient according to the device information; The step of determining the device information of a target image acquisition device for capturing the scene image of a target scene according to the similarity of the scene images within the image area comprises: Obtaining a pixel matrix corresponding to each of the scene images according to pixel values ​​of the pixel points within the image area in each of the scene images; Determining device information of a target image acquisition device for capturing the scene image of the target scene according to the scene image similarity expressed by the difference in pixel grayscale values ​​in the pixel matrix; Determining the device information of the target image acquisition device for capturing the scene image of the target scene according to the scene image similarity expressed by the difference in the pixel grayscale values ​​in the pixel matrix includes: Calculating the difference between the grayscale values ​​of pixels in every two of the pixel matrixes to obtain the scene similarity of the scene images corresponding to every two of the pixel matrixes; When the scene similarity satisfies a preset condition, determining a scene in the two scene images corresponding to the scene similarity as a target scene; Determine the two pixel point matrices corresponding to the scene similarity as the traversed pixel point matrices; Determine the image acquisition device of the scene image corresponding to the traversed pixel matrix as the first target image acquisition device for photographing the scene image of the target scene; Calculate the average value of the traversed pixel matrix to obtain a pixel average value matrix; For the target scene, according to the difference between the pixel average value matrix and the pixel grayscale values ​​in the pixel matrix that has not been traversed, find the image acquisition device that captures the scene image of the target scene as the second target image acquisition device; Acquire the geographical locations and the total number of the first target image acquisition device and the second target image acquisition device as the device information of the target image acquisition device; The step of determining, according to the image quality score, an image region in the scene image for performing similarity comparison comprises: Adjusting the preset radius according to the image quality score to obtain an adjusted radius; According to the adjusted radius, a sector-shaped area is determined in the scene image as an image area for performing similarity comparison.

2. The method according to claim 1, characterized in that The device information includes: geographic location and number of devices. When the detection result indicates that the target scene has an abnormal situation, sending alarm information to a target alarm information recipient according to the device information includes: When the detection result indicates that an abnormal situation exists in the target scene, determining a target alarm information recipient according to the geographical location and the number of devices; Sending alarm information to the target alarm information recipient, wherein the alarm information includes: the scene image corresponding to the detection result.

3. The method according to claim 2, characterized in that The step of determining a target alarm information recipient according to the geographical location and the number of devices includes: In response to the number of devices being equal to 1, determining the alarm information receiver to which the geographical location belongs as a target alarm information receiver; In response to the number of devices being greater than 1, and the geographical location belonging to more than one alarm information receiver, the alarm information receiver closest to the target scene is determined as a target alarm information receiver.

4. The method according to claim 1, characterized in that The device information includes: the number of devices; the abnormality detection is performed on the scene image of the target scene photographed by the target image acquisition device to obtain the detection result, including: In response to the number of devices being equal to 1, performing anomaly detection on the scene image of the target scene captured by the target image acquisition device by using a first anomaly detection method based on template matching to obtain a detection result; In response to the number of devices being greater than 1, anomaly detection is performed on the scene image of the target scene captured by the target image acquisition device using a second anomaly detection method based on target detection to obtain a detection result.

5. An alarm device based on image detection, characterized in that: The device comprises: A scene image acquisition module is used to acquire scene images captured by an image acquisition device; An image quality score acquisition module is used to evaluate the image quality of the scene image to obtain an image quality score; An image region determination module, configured to determine an image region in the scene image for similarity comparison according to the image quality score; specifically configured to adjust a preset radius according to the image quality score to obtain an adjusted radius; and determine a sector-shaped region in the scene image according to the adjusted radius as an image region for similarity comparison; The device information determination module is used to determine the device information of the target image acquisition device for shooting the scene image of the target scene according to the similarity of the scene images in the image area; specifically, to obtain the pixel point matrix corresponding to each scene image according to the pixel values ​​of the pixel points in the image area in each of the scene images; determine the device information of the target image acquisition device for shooting the scene image of the target scene according to the scene image similarity expressed by the difference in pixel gray values ​​in the pixel point matrix; specifically, to calculate the difference in pixel gray values ​​between each two of the pixel point matrices to obtain the scene similarity of the scene images corresponding to each two of the pixel point matrices; and when the scene similarity meets a preset condition, determine the scene in the two scene images corresponding to the scene similarity as the target scene. scene; determine the two pixel point matrices corresponding to the scene similarity as the traversed pixel point matrices; determine the image acquisition device of the scene image corresponding to the traversed pixel point matrix as the first target image acquisition device for shooting the scene image of the target scene; calculate the average value of the traversed pixel point matrix to obtain a pixel point average value matrix; for the target scene, find the image acquisition device for shooting the scene image of the target scene as the second target image acquisition device based on the difference between the pixel point average value matrix and the pixel grayscale values ​​in the untraversed pixel point matrix; obtain the geographical location and the total number of devices of the first target image acquisition device and the second target image acquisition device as the device information of the target image acquisition device; an anomaly detection module, used to perform anomaly detection on the scene image of the target scene captured by the target image acquisition device to obtain a detection result; The alarm information sending module is used to send alarm information to a target alarm information receiver according to the device information when the detection result indicates that the target scene has an abnormal situation.

6. An electronic device comprising a memory, a processor, and a program code stored in the memory and executable on the processor, characterized in that: When the processor executes the program code, the image detection-based alarm method described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having program code stored thereon, characterized in that: When the program code is executed by a processor, the steps of the image detection-based alarm method described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Data protection method and device

    CN110188576A

  • Scene picture shooting position range identification method and system based on image retrieval

    CN110704712A