Determination method and device of dripping event, storage medium and electronic device

By acquiring multiple frames of images from the monitored area and accumulating mask images, the problem of speed and accuracy in drip event detection in existing technologies has been solved, enabling rapid detection of drip events under multiple video data streams.

CN115861236BActive Publication Date: 2026-02-06ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211549842.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2026-02-06
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

Existing technologies cannot quickly and accurately determine whether a dripping event has occurred in a monitored area, especially in the processing of multi-channel video data, where the algorithm is time-consuming and prone to missing dripping information.

Method used

By acquiring images of the monitored area, mask images of multiple frames are obtained and accumulated. Preset conditions are used to detect whether there is a dripping image area in the accumulated mask image, and to determine whether a dripping event has occurred.

Benefits of technology

It enables rapid and accurate determination of whether a leak has occurred in a monitored area within a limited time, improving the efficiency and accuracy of leak detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861236B_ABST
    Figure CN115861236B_ABST
Patent Text Reader

Abstract

The application discloses a kind of determination method and device of dripping event, storage medium, electronic device, wherein above-mentioned method includes: image acquisition is carried out to monitoring area, obtains the multiple frames of images corresponding to the monitoring area;Obtain the mask chart corresponding to each group of frame images in the multiple frames of images, wherein the multiple frames of images correspond to multiple groups of frame images, and each group of frame images includes: two frame images successively at acquisition time;The mask chart corresponding to the multiple frames of images is accumulated, and the accumulated mask chart is obtained;According to whether there is dripping image area in the accumulated mask chart according to preset condition is detected, to determine whether dripping event occurs in the monitoring area. Solve the problem that cannot quickly and accurately determine whether dripping event occurs in monitoring area in related art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a dripping event determination method and device, a storage medium and an electronic device. BACKGROUND

[0002] In many fields such as electric power energy, petroleum and chemical industry, etc., the areas where dripping may occur, such as equipment and pipelines, need to be monitored to give timely alarms and ensure production safety. At present, with the development of image processing and deep learning technologies, intelligent analysis functions of dripping can be realized by relying on image recognition algorithms, but deep learning methods are limited by the difficulty of obtaining real dripping materials, and deep learning methods are heavily dependent on manual annotation.

[0003] Under normal circumstances, the frame rate of a video is 25 frames per second. If the dripping area is shot close, the size (pixels) of the dripping target in the image can be increased, but the monitored area will be reduced if it is too close; if the dripping area is shot far away, a larger range can be monitored, but the imaging of the dripping target will be smaller, which is not conducive to identification, so in the case of shooting the dripping area at a general angle, a dripping target only needs 5 consecutive frames from the beginning of falling to disappearing from the picture. In actual application and deployment, in order to save costs, more than one (usually 8 or even more) video data is sent to the algorithm for identification. Specifically, in actual application, video data is sent to the algorithm for identification after being decimated, because 1000 milliseconds / (25 frames*8 video channels) = 5 milliseconds, so the algorithm needs to process the data sent in 5 milliseconds and give the result. But in general, there are 5 frames per second, so the algorithm time consumption can be 25 milliseconds.

[0004] Therefore, for the phenomenon of dripping, the following problems exist: 1) If decimation is performed, there will certainly be frames that have not been decimated but contain the required dripping falling data; 2) If decimation is not performed, and multiple video data is to be supported, the algorithm must not consume too much time, at least within 5ms.

[0005] In related technologies, there is no effective solution to the problem of quickly and accurately determining whether a dripping event occurs in a monitoring area. SUMMARY

[0006] The embodiments of the present application provide a dripping event determination method and device, a storage medium and an electronic device to at least solve the problem in related technologies that a dripping event in a monitoring area cannot be quickly and accurately determined.

[0007] According to an aspect of an embodiment of the present application, a method for determining a dripping event is provided. The method comprises: acquiring images of a monitoring area to obtain a plurality of frames of images corresponding to the monitoring area; obtaining a mask corresponding to each group of frames of images in the plurality of frames of images, wherein the plurality of frames of images correspond to a plurality of groups of frames of images, and each group of frames of images comprises two frames of images acquired successively at different time points; accumulating the masks corresponding to the plurality of frames of images to obtain an accumulated mask; and detecting whether a dripping image area exists in the accumulated mask according to a preset condition to determine whether a dripping event occurs in the monitoring area.

[0008] In one example embodiment, in the process of obtaining the mask corresponding to each group of frames of images in the plurality of frames of images, the method further comprises: for any two groups of frames of images in the plurality of groups of frames of images, obtaining a first temporary mask corresponding to a first group of frames of images and a second temporary mask corresponding to a second group of frames of images, wherein there is an overlapping image in the first group of frames of images and the second group of frames of images, and there is a first frame of image acquired at an earlier time point than a second frame of image in the second group of frames of images in the first group of frames of images, the first group of frames of images comprises the first frame of image and the overlapping image, and the second group of frames of images comprises the overlapping image and the second frame of image; and obtaining the mask corresponding to the second frame of image according to the first temporary mask and the second temporary mask.

[0009] In one example embodiment, obtaining the mask corresponding to the second frame of image according to the first temporary mask and the second temporary mask comprises: determining whether a pixel point gray value at a first position of the second temporary mask is a target value; determining whether a pixel point gray value at a second position of the first temporary mask is the target value, wherein the second position corresponds to the first position; and obtaining a mask corresponding to the second frame of image in which a pixel point gray value at a third position is not the target value, in a case where the pixel point gray value at the first position is not the target value and the pixel point gray value at the second position is the target value, wherein the third position corresponds to both the first position and the second position.

[0010] In one example embodiment, accumulating the masks corresponding to the plurality of frames of images to obtain the accumulated mask comprises: obtaining a frame number of the frames of images; determining a division result of the masks corresponding to the plurality of frames of images according to the frame number, wherein each division result comprises a frame of image corresponding to the frame number; and accumulating the frames of image in each division result respectively to obtain the accumulated mask.

[0011] In an example embodiment, detecting whether there is a drip image region in the accumulated mask image comprises: extracting contour frames of a plurality of objects in the accumulated mask image; determining whether the contour frames of the plurality of objects meet preset conditions; in a case where a contour frame of a target object in the plurality of objects meets the preset conditions, determining that the target object is a drip target, and determining the drip image region according to the drip target, wherein the drip image region includes the drip target.

[0012] In an example embodiment, determining whether the contour of the plurality of objects meets the preset conditions comprises: obtaining a rotation angle and a height-width difference of the contour frame of each object, wherein the rotation angle is used to indicate an angle difference between the contour frame and a vertical line, and the height-width difference is used to indicate a difference between the height and the width of the contour frame; in a case where the rotation angle is less than a first threshold value and the height-width difference is greater than a second threshold value, determining that the contour frame of the target object meets the preset conditions.

[0013] In an example embodiment, determining the drip image region according to the drip target comprises: in a case where a plurality of drip targets have been determined, obtaining center point coordinates corresponding to the plurality of drip targets respectively; obtaining a first difference between a maximum horizontal coordinate and a minimum horizontal coordinate of a plurality of the center point coordinates, a second difference between a maximum vertical coordinate and a minimum vertical coordinate of the plurality of the center point coordinates, and a width difference between a first drip target corresponding to the maximum horizontal coordinate and a second drip target corresponding to the minimum horizontal coordinate; in a case where an absolute value of the first difference is less than a third threshold value, an absolute value of the second difference is greater than a fourth threshold value, and an absolute value of the width difference is less than a fifth threshold value, determining that a region corresponding to the plurality of drip targets is the drip image region.

[0014] According to another aspect of an embodiment of the present application, there is also provided a drip event determination apparatus, comprising: a collection module configured to collect images of a monitoring region to obtain a plurality of images corresponding to the monitoring region; an obtaining module configured to obtain a mask image corresponding to each group of images in the plurality of images, wherein the plurality of images correspond to a plurality of groups of images, and each group of images includes two images collected at consecutive time points; an accumulation module configured to accumulate the mask images corresponding to the plurality of images to obtain an accumulated mask image; and a detection module configured to detect, according to a preset condition, whether there is a drip image region in the accumulated mask image to determine whether a drip event occurs in the monitoring region.

[0015] According to another aspect of an embodiment of the present application, there is also provided a computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program runs the drip event determination method described above when running.

[0016] According to a further aspect of the embodiments of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for determining a dripping event.

[0017] In the embodiments of the present application, images of a monitoring area are collected to obtain a plurality of frames of images corresponding to the monitoring area; a mask corresponding to each group of frames of images in the plurality of frames of images is obtained, wherein the plurality of frames of images correspond to a plurality of groups of frames of images, and each group of frames of images comprises two frames of images collected at continuous time points; the masks corresponding to the plurality of frames of images are accumulated to obtain an accumulated mask; and whether a dripping image area exists in the accumulated mask is detected according to a preset condition to determine whether a dripping event occurs in the monitoring area. That is, by collecting images of the monitoring area and processing, a mask corresponding to each group of frames of images is obtained, and then the masks are accumulated to obtain an accumulated mask, and then the accumulated mask is detected and compared with the preset condition, so that whether a dripping event occurs in the monitoring area can be determined. The problems in the related art that a dripping event in the monitoring area cannot be quickly and accurately determined are solved, and a dripping event in the monitoring area can be quickly and accurately determined. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:

[0019] Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a method for determining a dripping event according to an embodiment of the present application;

[0020] Figure 2 FIG. 2 is a flowchart of an optional method for determining a dripping event according to an embodiment of the present application;

[0021] Figure 3 FIG. 3 is a schematic diagram of a third frame of image collected in an optional method for determining a dripping event according to an embodiment of the present application;

[0022] Figure 4 FIG. 4 is a schematic diagram of a fourth frame of image collected in an optional method for determining a dripping event according to an embodiment of the present application;

[0023] Figure 5 FIG. 5 is a schematic diagram of a fifth frame of image collected in an optional method for determining a dripping event according to an embodiment of the present application;

[0024] Figure 6 FIG. 6 is a mask in an optional method for determining a dripping event according to an embodiment of the present application;

[0025] Figure 7 is an optional accumulated mask diagram of a drip event determination method of an embodiment of the present application;

[0026] Figure 8 is another optional accumulated mask diagram of a drip event determination method of an embodiment of the present application;

[0027] Figure 9 is a flow chart of a drip event processing method of an embodiment of the present application;

[0028] Figure 10 is a structural block diagram of a drip event determination device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the personnel in the field without creative labor should belong to the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0031] The method embodiments provided by the embodiments of the present application can be run in a computer terminal. Taking the running on a computer terminal as an example, Figure 1 is a hardware structural block diagram of a computer terminal of a drip event determination method of an embodiment of the present application. As Figure 1 shown, the computer terminal can include one or more Figure 1The computer terminal shown in the figure includes only one processor 102 (the processor 102 can include, but is not limited to, a processing system such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. In an exemplary embodiment, the computer terminal can further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art can understand that, Figure 1 The structure shown in the figure is only schematic and does not limit the structure of the computer terminal. For example, the camera device can include more or fewer components than those shown, or have different configurations of components with the same or different functions than those shown. Figure 1 The structure shown in the figure is only schematic and does not limit the structure of the computer terminal. For example, the camera device can include more or fewer components than those shown, or have different configurations of components with the same or different functions than those shown. Figure 1 The structure shown in the figure is only schematic and does not limit the structure of the computer terminal. For example, the camera device can include more or fewer components than those shown, or have different configurations of components with the same or different functions than those shown. Figure 1 The structure shown in the figure is only schematic and does not limit the structure of the computer terminal. For example, the camera device can include more or fewer components than those shown, or have different configurations of components with the same or different functions than those shown.

[0032] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as the computer program corresponding to the determination method of the drip event in the embodiment of the present application. The processor 102 runs various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage systems, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and these remote memories can be connected to the secure text through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0033] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network can include a wireless network provided by a communication provider of the camera device. In one example, the transmission system 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.

[0034] In the present embodiment, a determination method of a drip event is provided, which includes but is not limited to being applied to the above-mentioned computer terminal, Figure 2 is a flowchart of an optional determination method of a drip event according to an embodiment of the present application, which includes the following steps:

[0035] Step S202, image acquisition is performed on a monitoring area to obtain a plurality of frames of images corresponding to the monitoring area;

[0036] Step S204, a mask image corresponding to each group of frames of images in the plurality of frames of images is obtained, wherein the plurality of frames of images correspond to a plurality of groups of frames of images, and each group of frames of images includes two frames of images continuous in time.

[0037] It can be understood that if the multiple frames of images correspond to 100 frames of images, the 100 frames of images can be sequentially sorted according to the collection time, and then two frames of images continuous in collection time are determined as a group of frames of images. Then, 100 frames of images can determine 50 groups of frames of images, and each group of frames of images in the 50 groups of frames of images includes two frames of images continuous in collection time.

[0038] It should be noted that the mask image here can be a temporary mask image or a mask image processed from the temporary mask image, and the embodiments of the present application do not limit this.

[0039] In step S206, the mask images corresponding to the multiple frames of images are accumulated to obtain an accumulated mask image.

[0040] In step S208, it is detected whether there is a dripping image region in the accumulated mask image according to a preset condition, so as to determine whether a dripping event occurs in the monitoring area.

[0041] Through the above technical solution of the embodiments of the present application, the images of the monitoring area are collected to obtain multiple frames of images corresponding to the monitoring area; the mask image corresponding to each group of frames of images in the multiple frames of images is obtained, wherein the multiple frames of images correspond to multiple groups of frames of images, and each group of frames of images includes two frames of images continuous in collection time; the mask images corresponding to the multiple frames of images are accumulated to obtain an accumulated mask image; and it is detected whether there is a dripping image region in the accumulated mask image according to a preset condition, so as to determine whether a dripping event occurs in the monitoring area. That is, by collecting and processing the images of the monitoring area, the mask image corresponding to each group of frames of images is obtained, then the mask images are accumulated to obtain an accumulated mask image, and then the accumulated mask image is detected and compared with the preset condition, so that it can be determined whether a dripping event occurs in the monitoring area. The problems that a dripping event in the monitoring area cannot be quickly and accurately determined in the related art are solved, and a dripping event in the monitoring area can be quickly and accurately determined.

[0042] It should be noted that the multiple frames of images corresponding to the monitoring area obtained in step S202 can be collected within a preset time period. Since the process of determining whether a dripping event occurs requires multiple frames of images, and multiple frames of images are images of a certain time period, the final determination result will be more accurate. Therefore, in order to more accurately determine whether a dripping event occurs, multiple frames of images within a preset time period can be obtained. In the actual operation process, the preset time period can be 10 seconds, 1 minute, 2 minutes, etc., which can be flexibly adjusted according to the actual situation, and the embodiments of the present application do not limit this.

[0043] In an optional embodiment, in the process of acquiring the mask image corresponding to each group of frame images in the plurality of frame images, the method further comprises: for any two groups of frame images in the plurality of groups of frame images, acquiring a first temporary mask image corresponding to a first group of frame images and a second temporary mask image corresponding to a second group of frame images, wherein there is an overlapping image in the first group of frame images and the second group of frame images, and there is a first frame image in the first group of frame images that is captured earlier than a second frame image in the second group of frame images, the first group of frame images comprises the first frame image and the overlapping image, and the second group of frame images comprises the overlapping image and the second frame image; and acquiring the mask image corresponding to the second frame image according to the first temporary mask image and the second temporary mask image.

[0044] It should be noted that the optional embodiment of the present application provides a method for acquiring the contour of a moving target by performing difference operation on adjacent two frames in a video image sequence, which can be well applied to the case where there are multiple moving targets and camera movement. When an abnormal object moves in a monitored scene, there will be a relatively obvious difference between frames. By subtracting two frames, the absolute value of the brightness difference between the two frames is obtained, and it is determined whether it is greater than a threshold to analyze the motion characteristics of the video or image sequence and determine whether there is object movement in the image sequence.

[0045] For example, taking three consecutive frames as an example, the serial numbers are 3, 4 and 5 respectively. The third frame image is as shown in Figure 3 , which contains a pipeline and / or a drip (equivalent to a drip target) collected at a first time; the fourth frame image is as shown in Figure 4 , which contains a pipeline and / or a drip collected at a second time; and the fifth frame image is as shown in Figure 5 , which contains a pipeline and / or a drip collected at a third time. The third frame and the fourth frame are a first group of frame images, and the fourth frame and the fifth frame are a second group of frame images. The third, fourth and fifth frame images are respectively subjected to grayscale processing and adjusted to a suitable size, such as 320*180. Then, the first temporary mask image and the second temporary mask image corresponding to the first group of frame images and the second group of frame images respectively can be acquired according to the frame difference method: the fourth frame image is subtracted from the third frame image, specifically, the gray values of the pixel points at the corresponding positions of the fourth frame image and the third frame image are subtracted and the absolute values are taken, and the first temporary mask image can be obtained. The fifth frame image is subtracted from the fourth frame image, specifically, the gray values of the pixel points at the corresponding positions of the fifth frame image and the fourth frame image are subtracted and the absolute values are taken, and the second temporary mask image can be obtained.

[0046] Since two possible drop-out targets can appear in the first temporary mask image and the second temporary mask image, i.e., the 3rd frame image and the 4th frame image in the first temporary mask image and the 4th frame image and the 5th frame image in the second temporary mask image, it is necessary to further obtain the mask image corresponding to the 5th frame image with only one drop-out target according to the first temporary mask image and the second temporary mask image.

[0047] Further, the method for obtaining the mask image corresponding to the second frame image according to the first temporary mask image and the second temporary mask image comprises: determining whether the pixel point gray value at the first position of the second temporary mask image is a target value; determining whether the pixel point gray value at the second position of the first temporary mask image is the target value, wherein the second position corresponds to the first position; and obtaining the mask image corresponding to the second frame image with the pixel point gray value at the third position not being the target value in the case that the pixel point gray value at the first position is not the target value and the pixel point gray value at the second position is the target value, wherein the third position corresponds to both the first position and the second position.

[0048] It can be understood that, still taking the 3rd, 4th and 5th frame images as an example, the 3rd frame image and the 4th frame image are the first group of frame images, corresponding to the first temporary mask image, and the 4th frame image and the 5th frame image are the second group of frame images, corresponding to the second temporary mask image. In the first temporary mask image, the drop-out targets corresponding to the 3rd frame image and the 4th frame image after processing are displayed, specifically, the pixel point gray value at the position corresponding to the drop-out target is not 0; in the second temporary mask image, the drop-out targets corresponding to the 4th frame image and the 5th frame image after processing are displayed, specifically, the pixel point gray value at the position corresponding to the drop-out target is not 0. Then, according to the first temporary mask image and the second temporary mask image, the mask image with only the drop-out target corresponding to the 5th frame image can be obtained, specifically, 1) determining the region with the gray value not being 0 in the second temporary mask image; 2) determining the gray value at the corresponding position of the first temporary mask image and the second temporary mask image, in the case that the gray value at the corresponding position is 0, it can be determined that the gray value at the corresponding position of the first mask image and the second mask image is not 0, and the mask image is as shown in Figure 6 It can be understood that, still taking the 3rd, 4th and 5th frame images as an example, the 3rd frame image and the 4th frame image are the first group of frame images, corresponding to the first temporary mask image, and the 4th frame image and the 5th frame image are the second group of frame images, corresponding to the second temporary mask image. In the first temporary mask image, the drop-out targets corresponding to the 3rd frame image and the 4th frame image after processing are displayed, specifically, the pixel point gray value at the position corresponding to the drop-out target is not 0; in the second temporary mask image, the drop-out targets corresponding to the 4th frame image and the 5th frame image after processing are displayed, specifically, the pixel point gray value at the position corresponding to the drop-out target is not 0. Then, according to the first temporary mask image and the second temporary mask image, the mask image with only the drop-out target corresponding to the 5th frame image can be obtained, specifically, 1) determining the region with the gray value not being 0 in the second temporary mask image; 2) determining the gray value at the corresponding position of the first temporary mask image and the second temporary mask image, in the case that the gray value at the corresponding position is 0, it can be determined that the gray value at the corresponding position of the first mask image and the second mask image is not 0, and the mask image is as shown in

[0049] For step S206, there are various embodiments, in an optional embodiment, comprising: obtaining the number of frame images; determining the division result of the mask image corresponding to the multiple frame images according to the number of frame images, wherein each of the division results includes the frame images corresponding to the number of frame images; and respectively accumulating the frame images in each division result to obtain the accumulated mask image. That is, according to the total number of mask images, for example, in the case of 100 frame mask images, 25 frame images can be set as a group for accumulation, and then 4 frame accumulated mask images can be obtained, as shown in Figure 7 、 8 Figure 7 , Figure 8 are two different accumulated mask images.

[0050] Optionally, detecting whether there is a drop image region in the accumulated mask image comprises: extracting the contour frame of each object in the accumulated mask image; determining whether the contour frame of each object meets a preset condition; in the case that the contour frame of a target object in the multiple objects meets the preset condition, determining that the target object is a drop target, and determining the drop image region according to the drop target, wherein the drop image region includes the drop target.

[0051] It can be understood that the contour frame of the suspected drop target with multiple gray values not equal to 0 in the accumulated mask image is extracted, and in the case that multiple contour frames meet the preset condition, it is determined that the suspected drop target is the required drop target, and then the drop image region can be determined according to the drop target.

[0052] Further, determining whether the contour of each object meets a preset condition comprises: obtaining the rotation angle and the height-width difference of the contour frame of each object, wherein the rotation angle is used to indicate the angle difference between the contour frame and the vertical line, and the height-width difference is used to indicate the difference between the height and the width of the contour frame; in the case that the rotation angle is less than a first threshold value and the height-width difference is greater than a second threshold value, it is determined that the contour frame of the target object meets the preset condition.

[0053] ​Specifically, the preset conditions include a first threshold of the rotation angle and a second threshold of the height-width difference. Wherein, 1) regarding the first threshold: the dripping process is generally vertical falling, but due to the interference of wind and other factors, the rotation angle will be caused, so the first threshold of the angle can be set. Further, a coordinate system with a certain fixed position as the coordinate origin can be determined first, and then the center point coordinates of the contour frame of the suspected dripping object are determined, and then the rotation angle is calculated according to the center point coordinates. If the obtained rotation angle is greater than the first threshold, it is not a dripping target; 2) regarding the second threshold: the dripping target is generally rectangular, and the height in the vertical direction is greater than the width in the horizontal direction, so the height-width difference can be set as the second threshold. Further, the height-width difference value obtained by subtracting the width from the height of the contour frame is less than the second threshold, which is not a dripping target. Optionally, the height-width ratio threshold, the minimum width threshold, the maximum width threshold, the minimum height threshold, the maximum height threshold, etc. can also be set according to the actual situation, which is not limited in the embodiment.

[0054] Further, the dripping image region is determined according to the dripping target, including: in the case that a plurality of dripping targets have been determined, the center point coordinates corresponding to the plurality of dripping targets are respectively acquired; the first difference value of the maximum horizontal coordinate and the minimum horizontal coordinate of the plurality of center point coordinates, the second difference value of the maximum vertical coordinate and the minimum vertical coordinate of the plurality of center point coordinates, and the width difference of the first dripping target corresponding to the maximum horizontal coordinate and the second dripping target corresponding to the minimum horizontal coordinate are acquired; in the case that the absolute value of the first difference value is less than a third threshold, the absolute value of the second difference value is greater than a fourth threshold, and the absolute value of the width difference is less than a fifth threshold, the region corresponding to the plurality of dripping targets is determined as the dripping image region.

[0055] In the case that a plurality of suspected dripping targets are determined as dripping targets, the center point coordinates of the plurality of dripping targets are acquired according to the coordinate system with a certain fixed position as the coordinate origin. Taking three dripping targets as an example, assuming that the serial numbers are 1, 2 and 3, the corresponding center point coordinates are (2, 2), (2.1, 5) and (1.9, 8), and the corresponding widths are 1, 1 and 1.1 respectively. According to the order from small to large of the horizontal coordinates, they are 3rd dripping target-1st dripping target-2nd dripping target. Therefore, the first difference value of the maximum horizontal coordinate and the minimum horizontal coordinate of the horizontal coordinates of the center point coordinates of the three dripping targets is 2.2-1.9=0.2; the second difference value of the maximum vertical coordinate and the minimum vertical coordinate of the vertical coordinates of the center point coordinates of the three dripping targets is 8-2=6, and the width difference of the first dripping target corresponding to the maximum horizontal coordinate and the second dripping target corresponding to the minimum horizontal coordinate is 1.1-1=0.1.

[0056] In the case that the third threshold value is 0.5, the fourth threshold value is 4, and the third threshold value is 0.2, it can be determined that the region corresponding to the plurality of dripping targets is the dripping image region; but if the third threshold value and / or the fourth threshold value and / or the fifth threshold value is not satisfied, it is determined to be a non-dripping image region. It should be noted that the threshold value can be set as needed, and the present application is not limited thereto.

[0057] In order to better understand the above-mentioned dripping event determination scheme, in an optional embodiment, a scheme is further provided for explaining the above-mentioned scheme.

[0058] The present application provides a kind of dripping event determination method of optional embodiment. Figure 9 It is a kind of optional dripping event processing flowchart of the embodiment of the present application, as shown in Figure 9 The method comprises the following steps:

[0059] Step 1: obtaining the region of the possible dripping event to be identified image;

[0060] Obtain the current real-time monitoring image image, as shown in Figure 3 、 4 , 5.

[0061] Step 2: dripping target motion detection;

[0062] The to-be-identified image image is grayed to obtain a gray image, taking the 5th image as an example, to obtain gray_image_5; then it is reduced to a certain size (such as 320*180) to obtain the resize_image_5 of the 5th image;

[0063] Subtracting resize_image_4 (the image of the 4th frame obtained by performing steps 1 and 2 on the image of the 4th frame, which is before the image of the 5th frame) from the obtained resize_image_5, that is, subtracting the gray scale values of the pixel points at the corresponding positions and taking the absolute value (because direct subtraction can result in a negative value). If the value is greater than a set threshold value gray_threshold (the threshold value can be artificially set, for example, set to 8), the gray scale value of the corresponding position in the temporary mask image tmp_mask_5 (the size is the same as that of resize_image_5, that is, 320*180) is 255 (it can be any value between 0 and 255 except 0), otherwise it is 0, that is, it is considered to be the background, and the place that does not move. The above operation can be a frame difference method, that is, subtracting the current frame from the previous frame of the current frame. However, the temporary mask image obtained by subtracting the current frame from the previous frame of the current frame will have a "ghosting" phenomenon, that is, there will be two obvious dripping areas in tmp_mask_5. However, there is only one water droplet (equivalent to the dripping target in the above embodiment) in the actual image_5, that is, the temporary mask image tmp_mask_5 may have a ghosting problem, so further processing needs to be performed on tmp_mask_5.

[0064] The 4th frame image is also subjected to the above-mentioned steps, and the temporary mask image tmp_mask_4 of the 4th frame image is obtained. According to the characteristics of dripping, the mask image with only one dripping target can be obtained by the following method, which needs to meet the following conditions at the same time:

[0065] (1) The gray scale difference of a certain position of tmp_mask_5 is greater than the threshold value;

[0066] (2) The gray scale value of the corresponding position of tmp_mask_4 is equal to 0; then the mask image mask_5 with the gray scale value of the pixel points at the corresponding positions of tmp_mask_4 and tmp_mask_5 equal to 255 can be obtained, as shown in Figure 6 .

[0067] The mask images (mask_5, mask_4, mask_3, etc.) obtained in the above-mentioned step two are added in sequence, and the number of accumulated images can be set as a parameter frame_num. For example, frame_num is set to 25, then the mask images are accumulated every 25 frames, that is, they are accumulated once from 1 to 25 frames, once from 26 to 50 frames, and once from 51 to 75 frames, and then the mask_accumulate image can be obtained, as shown in Figure 7 , 8 , but is not limited to Figure 7 , 8 .

[0068] Step 3: Perform drop region detection on the obtained mask_accumulate image to find the drop region while reducing background interference, specifically,

[0069] Extract contours from the mask_accumulate image;

[0070] Calculate the minimum enclosing rotated rectangle of each contour (suspected drop target);

[0071] 1) Suspected drop target detection: Since the dripping process is generally a vertical falling process, i.e., the rotation angle of the minimum enclosing rotated rectangle of the drop target is close to 0 (or -90 degrees), but there are wind blowing or other influencing factors in nature, so angle threshold comparison is needed: Specifically, set the angle threshold angle_threshold, take a fixed position as the coordinate origin, detect the center coordinate point of the suspected drop target contour, and calculate the angle. If the obtained angle result does not meet the threshold, the suspected drop target is not a drop target; Further, the drop target is generally long in shape, i.e., the height of the drop target is greater than the width, so the height-width ratio hw_threshold_ratio and / or the height-width difference threshold hw_threshold_diff can be set, and the height and width of the suspected drop target are detected and the ratio and / or difference are calculated. If the ratio and / or difference do not meet the threshold, it is not a drop target; At the same time, the width minimum threshold, width maximum threshold, height minimum threshold, and height maximum threshold can also be set according to actual conditions. If the threshold is not met, it is considered not to be a drop target.

[0072] 2) Drop region detection: Since the occurrence of the dripping event in the image corresponds to some consecutive columns of pixel points in the image, i.e., there is a phenomenon of similar horizontal coordinates and distant vertical coordinates between the drop targets, and the widths of the drop targets are similar. Therefore, sort the minimum enclosing rotated rectangle (center point position) of each contour by horizontal coordinate from small to large; Calculate the horizontal and vertical coordinates of the sorted targets.

[0073] For example, assuming that 9 targets are saved, the adjacent N (e.g., N = 3) targets can be counted, then (1) the horizontal coordinate of the 3rd target < the horizontal coordinate of the 1st target < x_threshold; (2) | the vertical coordinate of the 3rd target - the vertical coordinate of the 1st target | > y_threshold; (3) | the width of the 3rd target - the width of the 1st target | < w_threshold, if the above conditions are met simultaneously, it means that these consecutive targets are drop targets, and then the horizontal coordinate position drip_x and the drop target width drip_w of the drop targets can be counted.

[0074] Step 4: Determine whether there is a drop region;

[0075] If the drip area is not found, repeat all the above steps, step 1 to step 3; if the drip area has been found, go directly to step 5.

[0076] Step 5: Drip target judgment logic processing;

[0077] Get the final drip target position, because the actual drip area generally does not change at will, and once it appears in a place, it will always occur in that place, so after step 3 finds the drip area, it can no longer search for the drip area. Next, the judgment of the drip target can be directly performed, including:

[0078] (1) Extract the contour of the mask_5 obtained in step 2;

[0079] (2) Calculate the minimum circumscribed rectangle of each contour (drip target);

[0080] (3) Set the angle threshold angle_threshold_2, and those that do not meet the threshold are not drip targets; set the height-width ratio hw_threshold_ratio_2 and / or the height-width difference threshold hw_threshold_diff_2, and those that do not meet the threshold are not drip targets; At the same time, the width minimum threshold, width maximum threshold, height minimum threshold, and height maximum threshold can also be set according to the actual situation, and if the thresholds are not met, it is considered that the target is not a drip target,

[0081] (4) Determine the center coordinates of the remaining drip targets that do not pass the detection conditions in (3), and calculate whether |center position horizontal coordinate-drip_x| is less than the threshold, |drip target width-drip_w| is less than the threshold, if the requirements are met, it is considered that the target is a drip target. It should be noted that the threshold is considered to be set.

[0082] It should be noted that as long as the area found in step 3 is accurate, the judgment conditions in step 5 can be relaxed, i.e. the threshold in step 5 can be more relaxed than the corresponding threshold in step 3, mainly relying on step 5 (4) to confirm whether it is a real drip target.

[0083] Step 6: Output the result.

[0084] If it is necessary to accurately determine whether the target output in step five is a real drip target, the target classification technology in current deep learning can be combined to collect materials, label, model training, and classification recognition.

[0085] It is also needed to be explained that the accumulation (timing information) on the mask map makes the drip region more highlighted, but at the same time, other moving targets such as the branches in the example are also highlighted; but in step 4, the drip region is searched, and the situation of the drip falling process can be fully utilized to shield the interference of other moving targets such as branches and leaves.

[0086] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platforms, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) run the method of each embodiment of the present application.

[0087] In the embodiment, a drip event determination device is also provided, which is used to realize the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably realized in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0088] Figure 10 is a structural block diagram of a drip event determination device according to an embodiment of the present application; as shown in Figure 10 , comprising:

[0089] The acquisition module 102 is configured to acquire images of the monitoring area to obtain a plurality of frames of images corresponding to the monitoring area;

[0090] The acquisition module 102 is configured to acquire images of the monitoring area to obtain a plurality of frames of images corresponding to the monitoring area;

[0091] The accumulation module 106 is configured to accumulate the mask maps corresponding to the plurality of frames of images to obtain an accumulated mask map;

[0092] The detection module 108 is configured to detect whether there is a drip image region in the accumulated mask map according to a preset condition, so as to determine whether a drip event occurs in the monitoring area.

[0093] The device is used for image acquisition of a monitoring area, and a plurality of images corresponding to the monitoring area are obtained. A mask image corresponding to each group of images in the plurality of images is acquired, wherein the plurality of images correspond to a plurality of groups of images, and each group of images includes two images collected at continuous time points. The mask images corresponding to the plurality of images are accumulated to obtain an accumulated mask image. Whether a drip leakage image area exists in the accumulated mask image is detected according to a preset condition, so as to determine whether a drip leakage event occurs in the monitoring area. That is, the drip leakage event in the monitoring area is determined by acquiring and processing the images of the monitoring area, obtaining the mask image corresponding to each group of images, accumulating the mask images, detecting the accumulated mask image, and comparing the accumulated mask image with the preset condition. The problems in the related art that the drip leakage event in the monitoring area cannot be quickly and accurately determined are solved, and the drip leakage event in the monitoring area can be quickly and accurately determined.

[0094] It should be noted that the plurality of images acquired by the acquisition module can be acquired within a preset time period. Since the process of determining whether the drip leakage event occurs requires a plurality of images, if the plurality of images are images of a time period, the final determination result is more accurate. Therefore, in order to more accurately determine whether the drip leakage event occurs, the plurality of images within the preset time period can be acquired. In the actual operation process, the preset time period can be 10 seconds, 1 minute, 2 minutes, etc., which can be flexibly adjusted according to the actual situation, and the embodiments of the present application do not limit this.

[0095] In one example embodiment, the acquisition module 104 is further configured to, in the process of acquiring the mask image corresponding to each group of images in the plurality of images, acquire a first temporary mask image corresponding to a first group of images and a second temporary mask image corresponding to a second group of images for any two groups of images in the plurality of groups of images, wherein the first group of images and the second group of images have overlapping images, and a first image in the first group of images is collected at an earlier time than a second image in the second group of images, the first group of images includes the first image and the overlapping images, the second group of images includes the overlapping images and the second image, and the mask image corresponding to the second image is acquired according to the first temporary mask image and the second temporary mask image.

[0096] It should be noted that the optional embodiment of the present invention provides a method for obtaining the contour of a moving target by performing a difference operation on two adjacent frames in a video image sequence. This method is well applicable to situations where there are multiple moving targets and camera movement. When abnormal object movement occurs in the monitored scene, there will be obvious differences between frames. Subtracting two frames yields the absolute value of the brightness difference between the two frames. Determining whether this value is greater than a threshold is used to analyze the motion characteristics of the video or image sequence and determine whether there is object movement in the image sequence.

[0097] For example, taking three consecutive frames of images, numbered 3, 4, and 5 respectively, the third frame image is as follows: Figure 3 As shown, the image contains: the pipe and / or dripping point captured in the first frame (equivalent to the dripping target); the fourth frame image is shown below. Figure 4 As shown, the image includes: the pipe and / or dripping captured at the second time point; the 5th frame image is as follows. Figure 5 As shown, the image contains: a pipe and / or dripping, captured at the third time point. Frames 3 and 4 are the first set of frame images, and frames 4 and 5 are the second set of frame images. Frames 3, 4, and 5 are converted to grayscale and adjusted to a suitable size, such as 320*180. Then, the first and second temporary mask images corresponding to the first and second set of frame images can be obtained using the inter-frame difference method: Subtracting the third frame image from the fourth frame image (specifically, subtracting the grayscale values ​​of corresponding pixels in the fourth and third frames and taking the absolute value) yields the first temporary mask image. Subtracting the fourth frame image from the fifth frame image (specifically, subtracting the grayscale values ​​of corresponding pixels in the fifth and fourth frames and taking the absolute value) yields the second temporary mask image.

[0098] Since the first and second temporary mask images obtained from the differential operation may contain two possible dripping targets—namely, the third and fourth frames of the first temporary mask may contain the dripping target, and the fourth and fifth frames of the second temporary mask may contain the dripping target—it is necessary to further obtain a mask image corresponding to the fifth frame image containing only one dripping target based on the first and second temporary mask images.

[0099] In an exemplary embodiment, the acquisition module 104 is further configured to determine whether the grayscale value of a pixel at a first position of the second temporary mask is a target value; determine whether the grayscale value of a pixel at a second position of the first temporary mask is a target value, wherein the second position corresponds to the first position; and, if the grayscale value of a pixel at the first position is not a target value and the grayscale value of a pixel at the second position is a target value, acquire a mask image corresponding to the second frame image where the grayscale value of a pixel at a third position is not a target value, wherein the third position corresponds to both the first position and the second position.

[0100] It can be understood that, still taking the 3rd, 4th and 5th frame images as an example, the 3rd and 4th frame images are the first group of frame images, corresponding to the first temporary mask image, and the 4th and 5th frame images are the second group of frame images, corresponding to the second temporary mask image. In the first temporary mask image, the corresponding dripping target after processing of the 3rd frame image and the 4th frame image will be displayed, specifically, the gray value of the pixel point corresponding to the dripping target is not 0; in the second temporary mask image, the corresponding dripping target after processing of the 4th frame image and the 5th frame image will be displayed, specifically, the gray value of the pixel point corresponding to the dripping target is not 0. Then, according to the first temporary mask image and the second temporary mask image, a mask image of the dripping target existing only in the 5th frame image can be obtained, specifically, 1) determining the region with the gray value not being 0 in the second temporary mask image; 2) determining the gray value of the corresponding position of the first temporary mask image and the second temporary mask image, in the case that the gray value of the corresponding position is 0, it can be determined that the gray value of the corresponding position of the first mask image and the second mask image is not 0, the mask image is as shown in Figure 6 , and in other cases, the gray value of the corresponding position of the mask image and the first mask image and the second mask image is 0. It should be noted that the gray value not being 0 can be understood as any value between 0 and 255 except 0.

[0101] In an example embodiment, the detection module 106 is further configured to obtain the number of frame images; determine the division result of the mask images corresponding to the plurality of frame images according to the number of frame images, wherein each of the division results includes the frame images corresponding to the number of frame images; and accumulate the frame images in each division result respectively to obtain the accumulated mask images. That is, the total number of mask images is divided, for example, in the case of 100 frame mask images, 25 frame images can be set as a group for accumulation, and then 4 frame accumulated mask images can be obtained, as shown in Figure 7 , 8 , Figure 7 , Figure 8 are two different accumulated mask images.

[0102] In an example embodiment, the detection module 108 is further configured to extract the contour frames of a plurality of objects in the accumulated mask images; determine whether the contour frames of the plurality of objects meet a preset condition; in the case that the contour frame of a target object in the plurality of objects meets the preset condition, determine that the target object is a dripping target, and determine the dripping image region according to the dripping target, wherein the dripping image region includes the dripping target.

[0103] It can be understood that the contour frames of a plurality of suspected dripping targets with the gray value not being 0 in the accumulated mask images are extracted, in the case that a plurality of contour frames meet the preset condition, it is determined that the suspected dripping target is the required dripping target, and then the dripping image region can be determined according to the dripping target.

[0104] In an example embodiment, the detection module 108 is further configured to obtain a rotation angle and a height-width difference of the contour frame of each object, wherein the rotation angle is used to indicate an angle difference between the contour frame and a vertical line, and the height-width difference is used to indicate a difference between the height and the width of the contour frame; and determine that the contour frame of the target object meets a preset condition when the rotation angle is less than a first threshold value and the height-width difference is greater than a second threshold value.

[0105] Specifically, the preset condition includes the first threshold value of the rotation angle and the second threshold value of the height-width difference. Wherein, 1) regarding the first threshold value: the dripping process is generally vertical, but due to the interference of wind and other factors, the angle will rotate, so the first threshold value of the angle can be set. Further, a coordinate system with a certain fixed position as the origin can be determined first, and then the center point coordinates of the contour frame of the suspected dripping object are determined, and then the rotation angle is calculated according to the center point coordinates. If the obtained rotation angle is greater than the first threshold value, it is not a dripping target; 2) regarding the second threshold value: the dripping target is generally rectangular, and the height in the vertical direction is greater than the width in the horizontal direction, so the height-width difference can be set as the second threshold value. Further, the height-width difference value obtained by subtracting the width from the height is less than the second threshold value, which is not a dripping target. Optionally, the height-width ratio threshold value, the minimum width threshold value, the maximum width threshold value, the minimum height threshold value, the maximum height threshold value, etc. can also be set according to the actual situation, which is not limited in the embodiment.

[0106] In an example embodiment, the detection module 108 is further configured to, when a plurality of dripping targets have been determined, obtain center point coordinates corresponding to the plurality of dripping targets respectively; obtain a first difference between a maximum horizontal coordinate and a minimum horizontal coordinate of the plurality of center point coordinates, a second difference between a maximum vertical coordinate and a minimum vertical coordinate of the plurality of center point coordinates, and a width difference between a first dripping target corresponding to the maximum horizontal coordinate and a second dripping target corresponding to the minimum horizontal coordinate; and determine that a region corresponding to the plurality of dripping targets is the dripping image region when an absolute value of the first difference is less than a third threshold value, an absolute value of the second difference is greater than a fourth threshold value, and an absolute value of the width difference is less than a fifth threshold value.

[0107] In the case that the objects of the plurality of suspected dripping targets are determined as dripping targets, the center point coordinates of the plurality of dripping targets are obtained according to the coordinate system with a certain fixed position as the coordinate origin, taking three dripping targets as an example, assuming that the serial numbers are 1, 2 and 3, the corresponding center point coordinates are (2, 2), (2.1, 5) and (1.9, 8), the corresponding widths are 1, 1 and 1.1 respectively, and according to the order of the horizontal coordinates from small to large, they are 3rd dripping target-1st dripping target-2nd dripping target, then the first difference between the maximum horizontal coordinate and the minimum horizontal coordinate of the horizontal coordinates of the center point coordinates of the three dripping targets is 2.2-1.9=0.2; the second difference between the maximum vertical coordinate and the minimum vertical coordinate of the vertical coordinates of the center point coordinates of the three dripping targets is 8-2=6, and the width difference between the first dripping target corresponding to the maximum horizontal coordinate and the second dripping target corresponding to the minimum horizontal coordinate is 1.1-1=0.1.

[0108] In the case that the third threshold value is 0.5, the fourth threshold value is 4, and the third threshold value is 0.2, it can be determined that the region corresponding to the plurality of dripping targets is the dripping image region; but if any of the third threshold value, the fourth threshold value and the fifth threshold value is not met, it is determined as a non-dripping image region. It should be noted that the threshold value can be set as needed, and the present application does not limit this.

[0109] The embodiment of the present application also provides a storage medium including a stored program, wherein the above-mentioned program runs the method of any one of the above-mentioned methods when running.

[0110] Optionally, in the present embodiment, the above-mentioned storage medium can be set to store program code for running the following steps:

[0111] S1, image acquisition is performed on a monitoring region to obtain a plurality of frames of images corresponding to the monitoring region;

[0112] S2, a mask image corresponding to each group of frames of images in the plurality of frames of images is obtained, wherein the plurality of frames of images correspond to a plurality of groups of frames of images, and each group of frames of images includes two frames of images continuous in time;

[0113] S3, the mask images corresponding to the plurality of frames of images are accumulated to obtain an accumulated mask image;

[0114] S4, whether there is a dripping image region in the accumulated mask image is detected according to a preset condition, so as to determine whether a dripping event occurs in the monitoring region.

[0115] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0116] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0117] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0118] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0119] S1, acquire images of the monitored area to obtain multiple frames of images corresponding to the monitored area;

[0120] S2, obtain the mask image corresponding to each group of frame images in the multi-frame images, wherein the multi-frame images correspond to multiple groups of frame images, and each group of frame images includes: two consecutive frames of images at the acquisition time;

[0121] S3, accumulate the mask images corresponding to the multiple frames of images to obtain an accumulated mask image;

[0122] S4. Detect whether there is a dripping image area in the accumulated mask image according to preset conditions, so as to determine whether a dripping event has occurred in the monitoring area.

[0123] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0124] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0125] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with a general purpose computing system, which can be centralized on a single computing system or distributed on a network of multiple computing systems, and optionally implemented with program codes executable by a computing system, which can be stored in a storage system and executed by a computing system, and in some cases, the steps shown or described herein can be executed in an order different from that shown, or made into individual integrated circuit modules, or made into a single integrated circuit module with multiple modules or steps. Thus, the application is not limited to any particular combination of hardware and software.

[0126] The preferred embodiments of the application described above are intended to be merely exemplary and those skilled in the art will recognize that changes can be made to the application without departing from the spirit thereof. Any modifications made to the application as well as equivalents thereof are intended to be within the scope of the application.

Claims

1. A method of determining a drop-out event, characterized in that, The method comprises the following steps: image acquisition is performed on a monitoring area to obtain a plurality of frames of images corresponding to the monitoring area; a mask image corresponding to each group of frames of images in the plurality of frames of images is obtained, wherein the plurality of frames of images correspond to a plurality of groups of frames of images, and each group of frames of images comprises two frames of images that are continuous in time; the mask images corresponding to the plurality of frames of images are accumulated to obtain an accumulated mask image; whether a dripping image area exists in the accumulated mask image is detected according to a preset condition, so as to determine whether a dripping event occurs in the monitoring area, wherein in the process of obtaining the mask image corresponding to each group of frames of images, the method further comprises the following steps: for any two groups of frames of images in the plurality of groups of frames of images, a first temporary mask image corresponding to a first group of frames of images and a second temporary mask image corresponding to a second group of frames of images are obtained according to an inter-frame difference method, wherein there is an overlapping image in the first group of frames of images and the second group of frames of images, and there is a first frame of image in the first group of frames of images that is collected earlier than a second frame of image in the second group of frames of images, the first group of frames of images comprises the first frame of image and the overlapping image, and the second group of frames of images comprises the overlapping image and the second frame of image; the mask image corresponding to the second frame of image is obtained according to the first temporary mask image and the second temporary mask image, wherein the mask image corresponding to the second frame of image is obtained according to the first temporary mask image and the second temporary mask image, comprising the following steps: determining whether the pixel point gray value of the first position of the second temporary mask image is a target value; determining whether the pixel point gray value of the second position of the first temporary mask image is a target value, wherein the second position corresponds to the first position; in the case that the pixel point gray value of the first position is not the target value and the pixel point gray value of the second position is the target value, obtaining the mask image corresponding to the second frame of image, wherein the third position corresponds to the first position and the second position.

2. The method of determining a run-out event according to claim 1, characterized in that accumulating the mask images corresponding to the plurality of frames of images to obtain the accumulated mask image, comprising the following steps: obtaining the number of frames of images; determining the division result of the mask images corresponding to the plurality of frames of images according to the number of frames; accumulating the mask images in each division result to obtain the accumulated mask image.

3. The method of determining a run-out event according to claim 1, characterized in that detecting whether the dripping image area exists in the accumulated mask image, comprising the following steps: extracting the contour frames of a plurality of objects in the accumulated mask image; determining whether the contour frames of the plurality of objects meet a preset condition; in the case that the contour frame of a target object in the plurality of objects meets the preset condition, determining that the target object is a dripping target, and determining the dripping image area according to the dripping target, wherein the dripping image area comprises the dripping target.

4. The method of determining a run-out event according to claim 3, characterized in that determining whether the contours of the plurality of objects meet the preset condition, comprising the following steps: obtaining the rotation angle and the height-width difference of the contour frame of each object, wherein the rotation angle is used to indicate the angle difference between the contour frame and a vertical line, and the height-width difference is used to indicate the difference between the height and the width of the contour frame; In a case where the rotation angle is less than a first threshold value and the height-width difference is greater than a second threshold value, it is determined that the contour frame of the target object meets a preset condition.

5. The method of determining a run-out event according to claim 3, characterized in that The drip image region is determined according to the drip target. In a case where a plurality of drip targets have been determined, the center point coordinates corresponding to the plurality of drip targets are respectively acquired. A first difference value of a maximum horizontal coordinate and a minimum horizontal coordinate of the horizontal coordinates of the plurality of center point coordinates, a second difference value of a maximum vertical coordinate and a minimum vertical coordinate of the vertical coordinates of the plurality of center point coordinates, and a width difference of a first drip target corresponding to the maximum horizontal coordinate and a second drip target corresponding to the minimum horizontal coordinate are acquired. In a case where an absolute value of the first difference value is less than a third threshold value, an absolute value of the second difference value is greater than a fourth threshold value, and an absolute value of the width difference is less than a fifth threshold value, it is determined that a region corresponding to the plurality of drip targets is the drip image region.

6. A device for determining a dripping event, characterized in that The method comprises the steps of: The acquisition module is configured to acquire images of a monitoring region to obtain a plurality of images corresponding to the monitoring region. The acquisition module is configured to acquire a mask image corresponding to each group of images in the plurality of images, wherein the plurality of images correspond to a plurality of groups of images, and each group of images comprises two images acquired at consecutive time points. The accumulation module is configured to accumulate the mask images corresponding to the plurality of images to obtain an accumulated mask image. The detection module is configured to detect whether a drip image region exists in the accumulated mask image according to a preset condition to determine whether a drip event occurs in the monitoring region. The acquisition module is further configured to, in the process of acquiring the mask image corresponding to each group of images in the plurality of images, acquire, for any two groups of images in the plurality of groups of images, a first temporary mask image corresponding to a first group of images and a second temporary mask image corresponding to a second group of images according to an inter-frame difference method, wherein there is an overlapping image in the first group of images and the second group of images, and there is a first image in the first group of images that is acquired at an earlier time point than a second image in the second group of images, the first group of images comprises the first image and the overlapping image, and the second group of images comprises the overlapping image and the second image; and acquire the mask image corresponding to the second image according to the first temporary mask image and the second temporary mask image. 7.An electronic device comprising a memory and a processor, the electronic device characterized by, The acquisition module is further configured to determine whether a pixel grayscale value at a first position of the second temporary mask image is a target value, and determine whether a pixel grayscale value at a second position of the first temporary mask image is the target value, wherein the second position corresponds to the first position; and acquire a mask image corresponding to the second image in which a pixel grayscale value at a third position is not the target value, in a case where the pixel grayscale value at the first position is not the target value and the pixel grayscale value at the second position is the target value, wherein the third position corresponds to both the first position and the second position. The memory stores a computer program, and the processor is configured to execute the method according to any one of claims 1 to 5 by using the computer program.

Citation Information

Patent Citations

  • Fully-automatic mechanical equipment installation leak detection method and device

    CN109146860A

  • Leakage detection method, device and system and storage medium

    CN114022804A