An animal monitoring method, apparatus, device, and storage medium

By using a method that updates background images and animal judgment thresholds in real time, the problem of low efficiency in inspecting small animals in cable trenches in high-voltage power distribution rooms has been solved, achieving efficient and accurate animal monitoring and ensuring equipment safety.

CN117011778BActive Publication Date: 2026-01-02GUANGDONG POWER GRID CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310725836.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2026-01-02
Estimated Expiration
2043-06-19

AI Technical Summary

Technical Problem

In existing technologies, the efficiency of inspecting small animals in cable trenches in high-voltage power distribution rooms is low, and intrusions cannot be detected in a timely manner, affecting the safe operation of equipment.

Method used

By acquiring images and historical images of the target cable trench, the background image is updated and the animal judgment threshold is updated in real time to monitor whether there are small animals in the cable trench.

Benefits of technology

This improved the accuracy and efficiency of small animal inspections, ensuring the safe operation of live equipment in cable trenches and enabling timely handling of small animal intrusions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011778B_ABST
    Figure CN117011778B_ABST
Patent Text Reader

Abstract

The application discloses an animal monitoring method, device and equipment and a storage medium, and belongs to the technical field of transformer operation. The method comprises the following steps: acquiring a target image and at least two historical images in a target cable trench; determining a target background image corresponding to the target image and a target animal judgment threshold according to the historical images, an initial background gray image and an initial animal judgment threshold; and determining whether an animal exists in the target cable trench according to the target image, the target background image and the target animal judgment threshold. The application realizes real-time updating of the background image and the animal judgment threshold, makes the obtained animal monitoring result more accurate, facilitates an operation personnel to accurately locate the position of a small animal in the cable trench, and processes the small animal in the cable trench in time, thereby improving the inspection quality and efficiency of the small animal in the cable trench and guaranteeing the safe operation of live equipment in the cable trench.
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 the technical field of power transformation operation, and specifically to an animal monitoring method, device, equipment and storage medium. BACKGROUND

[0002] The small animal prevention and inspection of the cable trench in the high-voltage distribution room is an important part of the power transformation operation and maintenance work.

[0003] Currently, the small animal inspection in the cable trench of the high-voltage distribution room is carried out by the operation personnel once a month. However, due to the narrow space and dark environment of the cable trench in the high-voltage distribution room, the operation personnel find it very inconvenient to monitor the small animals in the cable trench, thereby reducing the inspection efficiency and quality of the small animals in the cable trench. Meanwhile, the operation personnel cannot find the invasion of small animals into the cable trench of the high-voltage distribution room in time, which has a great impact on the safe operation of the live equipment in the cable trench. SUMMARY

[0004] The present application provides an animal monitoring method, device, equipment and storage medium to improve the inspection quality and efficiency of small animals in the cable trench and ensure the safe operation of live equipment in the cable trench.

[0005] According to an aspect of the present application, an animal monitoring method is provided, which comprises:

[0006] acquiring a target image and at least two historical images in a target cable trench;

[0007] determining a target background image and a target animal judgment threshold corresponding to the target image according to the historical images, an initial background grayscale image and an initial animal judgment threshold;

[0008] determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold.

[0009] According to another aspect of the present application, an animal monitoring device is provided, which comprises:

[0010] an image acquisition module for acquiring a target image and at least two historical images in a target cable trench;

[0011] a first determination module for determining a target background image and a target animal judgment threshold corresponding to the target image according to the historical images, an initial background grayscale image and an initial animal judgment threshold;

[0012] a second determination module for determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold.

[0013] According to another aspect of the present application, there is provided an electronic device comprising:

[0014] at least one processor; and

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

[0016] the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the animal monitoring method of any embodiment of the present application.

[0017] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the animal monitoring method of any embodiment of the present application when executed by the processor.

[0018] The technical solution of the embodiment of the present application comprises the following steps: obtaining a target image and at least two historical images in a target cable trench; determining a target background image corresponding to the target image and a target animal judgment threshold according to the historical images, an initial background grayscale image and an initial animal judgment threshold; and determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold. According to the historical images in the target cable trench, the initial background grayscale image and the initial animal judgment threshold, the target background image corresponding to the target image and the target animal judgment threshold are determined, so that the real-time updating of the background image and the animal judgment threshold is realized. At the same time, according to the updated background image and the animal judgment threshold, it is monitored whether there is a small animal in the target image, that is, whether there is a small animal in the target cable trench, so that the obtained animal monitoring result is more accurate, the position of the small animal in the cable trench can be accurately positioned by the operator, and the small animal in the cable trench can be processed in time, thereby improving the inspection quality and efficiency of the small animal in the cable trench and ensuring the safe operation of the live equipment in the cable trench.

[0019] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0021] Figure 1is a flow chart of an animal monitoring method according to an embodiment of the present application;

[0022] Figure 2 is a flow chart of an animal monitoring method according to an embodiment of the present application;

[0023] Figure 3 is a structural schematic diagram of an animal monitoring device according to an embodiment of the present application;

[0024] Figure 4 is a structural schematic diagram of an electronic device implementing an animal monitoring method according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction 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 other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0026] It should be noted that the terms "target", "history", "initial", "first" and "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 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 necessarily 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.

[0027] In addition, it should also be noted that in the technical solutions of the present application, the collection, storage, use, processing, transmission, provision and disclosure of target images, historical images, initial background grayscale images and initial animal judgment thresholds and the like involved in the technical solutions comply with the relevant legal regulations and do not violate public order and good customs.

[0028] Embodiment one

[0029] Figure 1A flowchart of an animal monitoring method provided for the first embodiment of the present application. The embodiment can be applied to the case of monitoring animals in a cable trench of a high-voltage power distribution room. The method can be executed by an animal monitoring device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device, which can be a workstation or a server. As shown in Figure 1 the method includes the following steps.

[0030] S101, obtaining a target image and at least two historical images in a target cable trench.

[0031] The target cable trench refers to a cable trench that needs to be monitored for small animals. The target image refers to the image in the target cable trench at the current time. The historical image refers to the image in the target cable trench at each time in the time period between the start time and the current time. It should be noted that the start time refers to the time when the infrared camera in the target cable trench starts to work.

[0032] Specifically, the target image and the at least two historical images can be obtained from the images collected by the infrared camera in the target cable trench.

[0033] S102, determining a target background image and a target animal judgment threshold corresponding to the target image according to the historical images, an initial background grayscale image, and an initial animal judgment threshold.

[0034] The initial background grayscale image refers to an image obtained by performing grayscale processing on an initial background image. The initial background image refers to an image that is set in advance and does not contain small animals. The image can be any image collected by the infrared camera in the target cable trench and does not contain small animals. For each pixel point in the initial background grayscale image, the initial animal judgment threshold refers to the animal judgment threshold corresponding to the pixel point. The animal judgment threshold refers to a value used to determine whether a pixel point in the target image belongs to a region where small animals are located. The value can be set in advance according to actual business requirements, and the present application does not make specific limitations.

[0035] The target background image refers to a background grayscale image in the target cable trench at the current time. The target animal judgment threshold refers to the animal judgment threshold corresponding to the pixel point at the current time.

[0036] Specifically, the at least two historical images in the target cable trench can be processed to obtain at least two historical grayscale images. The historical grayscale images and the initial background grayscale image are input into a background image updating model to obtain the target background image corresponding to the target image. Similarly, the historical grayscale images and the initial animal judgment threshold are input into an animal judgment threshold updating model to obtain the target animal judgment threshold corresponding to the target image. The historical grayscale image refers to an image obtained by performing grayscale processing on the historical image.

[0037] It should be noted that the background image updating model can be pre-set according to actual business requirements, for example, the background image updating model is an adaptive background difference model, and for example, the background image updating model is an adaptive background approximation model based on optical flow field technology, and the embodiments of the present application do not make specific limitations.

[0038] It should be noted that the animal judgment threshold updating model can be pre-set according to actual business requirements, for example, the animal judgment threshold updating model is an animal judgment threshold updating model based on a dynamic second-order difference threshold algorithm, and for example, the animal judgment threshold updating model is an animal judgment threshold updating model based on a neural network, and the embodiments of the present application do not make specific limitations.

[0039] S103, determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold.

[0040] Specifically, the target image can be grayed to obtain a gray image of the target image as a target gray image; the gray values of the pixel points at the same positions of the target gray image and the target background image are differentially processed to obtain a differential gray image as a target differential gray image; for each pixel point in the target differential gray image, if the gray value of the pixel point is greater than the target animal judgment threshold corresponding to the pixel point, the pixel point is taken as a pixel point in an animal region, recorded as a foreground point; otherwise, the pixel point is taken as a pixel point in a non-animal region, recorded as a background point. Similarly, other foreground points and other background points can be obtained, and all the foreground points are connected based on a pre-set foreground point connection rule to obtain a foreground region, i.e., an animal region, so that it can be determined that there is an animal in the target cable trench; if there is no foreground point in the target differential gray image, all are background points, it is determined that there is no animal in the target cable trench. It should be noted that the pre-set foreground point connection rule can be artificially randomly specified or pre-set according to actual business requirements, and the embodiments of the present application do not make specific limitations.

[0041] Optionally, the target image can be grayed to obtain a target gray image; for each pixel point, a target gray difference value of the pixel point is determined according to a first gray value of the pixel point in the target background image and a second gray value of the pixel point in the target gray image; whether there is an animal in the target cable trench is determined according to the target gray difference values of the pixel points and the target animal judgment thresholds corresponding to the pixel points.

[0042] The target gray image refers to an image obtained by performing a gray processing on the target image. The pixel point refers to a pixel point corresponding to the same position in the target background image and the target gray image. The first gray value refers to a gray value of the pixel point in the target background image. The second gray value refers to a gray value of the pixel point in the target gray image. The target gray difference value refers to a gray value variation between the first gray value and the second gray value of the pixel point.

[0043] Specifically, the target image is subjected to a gray processing to obtain a target gray image. For each pixel point, a gray value variation between a first gray value of the pixel point in the target background image and a second gray value of the pixel point in the target gray image is calculated, and the gray value variation is taken as a target gray difference value of the pixel point. The target gray difference value of the pixel point can be determined by the following formula:

[0044] D(x, y) = |f(x, y) - B(x, y)|

[0045] wherein D(x, y) is the target gray difference value of the pixel point, B(x, y) is the first gray value of the pixel point in the target background image, and f(x, y) is the second gray value of the pixel point in the target gray image.

[0046] Further, the target gray difference value D(x, y) of the pixel point is compared with a target animal judgment threshold value (denoted as T(x, y)) corresponding to the pixel point. If D(x, y) > T(x, y), it is determined that there is an animal in the target cable trench. Otherwise, other pixel points are selected, and the above process is continuously performed until all the pixel points are traversed. If the target gray difference values of all the pixel points are less than or equal to the target animal judgment threshold values corresponding thereto, it is determined that there is no animal in the target cable trench.

[0047] It can be understood that the target image is subjected to a gray processing to obtain a target gray image. Further, whether there is an animal trace in the target image is determined by comparing the differences between the pixel points of the target gray image and the target background image, that is, whether there is an animal in the target cable trench is determined, so that the detection of small animals in the target cable trench is more accurate, thereby improving the inspection quality of small animals in the cable trench.

[0048] The technical scheme of the embodiment of the present application comprises the following steps: obtaining a target image and at least two historical images in a target cable trench; determining a target background image corresponding to the target image and a target animal judgment threshold according to the historical images, an initial background grayscale image and an initial animal judgment threshold; and determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold. According to the historical images in the target cable trench, the initial background grayscale image and the initial animal judgment threshold, the target background image corresponding to the target image and the target animal judgment threshold are determined, so that the real-time updating of the background image and the animal judgment threshold is realized. At the same time, according to the updated background image and the animal judgment threshold, it is monitored whether there is a small animal in the target image, that is, whether there is a small animal in the target cable trench, so that the obtained animal monitoring result is more accurate, the position of the small animal in the cable trench can be accurately located by the operating personnel of the substation, and the small animal in the cable trench can be processed in time, thereby improving the inspection quality and efficiency of the small animal in the cable trench and ensuring the safe operation of the live equipment in the cable trench.

[0049] On the basis of the above-mentioned embodiment, as an optional mode of the embodiment of the present application, the alarm information can also be generated according to the area where the animal is located and / or the number of animals in the case of identifying that there is an animal in the target cable trench.

[0050] The alarm information can comprise an alarm level and an alarm form corresponding to the alarm level. The alarm level is determined according to the area where the animal is located in the target cable trench and / or the number of animals. For example, if the area where the animal is located in the target cable trench is a preset risk area, the alarm level is a first-level alarm, and the alarm form corresponding to the alarm level is that an alarm sound is generated and an alarm prompt light flashes continuously. For another example, if the area where the animal is located in the target cable trench is a preset non-risk area, the alarm level is a second-level alarm, and the alarm form corresponding to the alarm level is that an alarm sound is generated. It should be noted that the alarm level of the first-level alarm is higher than that of the second-level alarm, and the first-level alarm means that the situation is urgent and the operating personnel need to process the animal in the target cable trench immediately.

[0051] Specifically, the alarm information can be generated according to the importance of the area where the animal is located in the case of identifying that there is an animal in the target cable trench. The alarm information can be generated according to the number of animals in the case of identifying that there is an animal in the target cable trench. The alarm information can also be generated according to the importance of the area where the animal is located in the target cable trench and the number of animals in the target cable trench in the case of identifying that there is an animal in the target cable trench.

[0052] It can be understood that, in the case that the animals in the target cable trench are identified, according to the area where the animals in the target cable trench are located, and / or the number of the animals, the influence degree of the animals on the live equipment in the target cable trench is determined, and then the alarm information is generated, so that the alarm information is more accurate, the invalid inspection of the operation personnel is avoided, the human resources are saved, and the inspection efficiency of the small animals in the cable trench is improved.

[0053] Optionally, if the area where the animals are located is in the preset area, the alarm information is generated; and / or, if the number of the animals is greater than or equal to the preset number, the alarm information is generated.

[0054] The preset area can be set in advance according to an actual business scenario, and can include a risk area and a non-risk area. The preset number can be obtained through repeated experiments, can be randomly set, or can be set in advance according to an actual business demand, and embodiments of the present application do not make specific limitations.

[0055] For example, if the area where the animals in the target cable trench are located is a risk area, first-level alarm information is generated, the alarm prompt light flashes continuously while the alarm sound is emitted, to remind the operation personnel to immediately process the animals in the target cable trench; if the area where the animals in the target cable trench are located is a non-risk area, second-level alarm information is generated, and only the alarm sound is emitted to inform the operation personnel that small animals appear in the target cable trench.

[0056] For example, assuming that the preset number is 3, if the number of the animals in the target cable trench is 1, second-level alarm information is generated, and only the alarm sound is emitted to inform the operation personnel that small animals appear in the target cable trench; if the number of the animals in the target cable trench is 4, first-level alarm information is generated, the alarm prompt light flashes continuously while the alarm sound is emitted, to remind the operation personnel to immediately process the animals in the target cable trench.

[0057] For example, assuming that the preset number is 3, if the area where the animals in the target cable trench are located is a non-risk area, and the number of the animals in the target cable trench is 4, first-level alarm information is generated, the alarm prompt light flashes continuously while the alarm sound is emitted, to remind the operation personnel to immediately process the animals in the target cable trench.

[0058] It can be understood that, in the case that the animals in the target cable trench are identified, according to the area where the animals are located, and / or the number of the animals, different levels of alarm information are generated, so as to facilitate the operation personnel to reasonably arrange the inspection work of the small animals in the cable trench, and process the small animals in the cable trench in time while ensuring the safe operation of the live equipment in the cable trench.

[0059] Embodiment Two

[0060] Figure 2 A flow chart of an animal monitoring method provided for the second embodiment of the present application, the embodiment is based on the above-mentioned embodiments, further optimizes the "determining the target background image and the target animal judgment threshold corresponding to the target image according to the historical image, the initial background gray image and the initial animal judgment threshold", and provides an optional implementation scheme. It should be noted that the parts not described in detail in the embodiments of the present application can refer to the relevant descriptions of other embodiments. As shown in the following table, the method comprises: Figure 2

[0061] S201, obtaining a target image and at least two historical images in a target cable trench.

[0062] S202, determining a historical image feature of the historical image according to the historical image.

[0063] The historical image feature refers to the feature of the historical image; optionally, the historical image feature includes a historical pixel gray mean value and a historical pixel gray variance. The historical pixel gray mean value refers to the mean value of the gray values of the pixel points in different historical images; correspondingly, the historical pixel gray variance refers to the variance of the gray values of the pixel points in different historical images. It should be noted that the pixel points refer to the pixel points corresponding to the same position in different historical images.

[0064] Specifically, the historical image can be input into a neural network feature extraction model to obtain the historical image feature of the historical image. The neural network feature extraction model can be pre-set according to actual business requirements, for example, a BP (backpropagation) neural network feature extraction model, which is not limited in the embodiments of the present application.

[0065] Optionally, the historical image can be subjected to gray processing to obtain a historical gray image; for each pixel point, the historical pixel gray value of the pixel point in at least two historical gray images is determined; and the historical pixel gray mean value and the historical pixel gray variance of the pixel point are determined according to the historical pixel gray value.

[0066] The pixel points refer to the pixel points corresponding to the same position in different historical gray images. The historical pixel gray value refers to the gray value of the pixel point in the historical gray image. The historical pixel gray mean value refers to the mean value of the historical pixel gray values of the pixel points in different historical gray images; and the historical pixel gray variance refers to the variance of the historical pixel gray values of the pixel points in different historical gray images.

[0067] ​Specifically, the historical images are subjected to a gray-scale processing to obtain historical gray-scale images; for each pixel point, historical pixel gray-scale values of the pixel point in at least two historical gray-scale images are determined; a mean value of the historical pixel gray-scale values is taken as a historical pixel gray-scale mean value of the pixel point; and a variance of the historical pixel gray-scale values is calculated as a historical pixel gray-scale variance of the pixel point according to the historical pixel gray-scale mean value of the pixel point.

[0068] For example, assuming that there are three historical images, namely historical image A, historical image B and historical image C; the historical image A, the historical image B and the historical image C are subjected to a gray-scale processing to obtain historical gray-scale image A1, historical gray-scale image B1 and historical gray-scale image C1; for each pixel point, a historical pixel gray-scale value of the pixel point in the historical gray-scale image A1 is determined as x1, a historical pixel gray-scale value of the pixel point in the historical gray-scale image B1 is determined as x2, and a historical pixel gray-scale value of the pixel point in the historical gray-scale image C1 is determined as x3; a mean value between x1, x2 and x3 is calculated as a historical pixel gray-scale mean value of the pixel point; and the historical pixel gray-scale mean value of the pixel point can be determined by the following formula:

[0069]

[0070] wherein K is the historical pixel gray-scale mean value of the pixel point, n is a total number of the historical images, i.e. a total number of the historical gray-scale images, xi is the historical pixel gray-scale value of the pixel point in the i-th historical gray-scale image. i

[0071] Then, a variance between x1, x2 and x3 is calculated as a historical pixel gray-scale variance of the pixel point according to the historical pixel gray-scale mean value K of the pixel point; and the historical pixel gray-scale variance of the pixel point can be determined by the following formula:

[0072]

[0073] wherein S is the historical pixel gray-scale variance of the pixel point, K is the historical pixel gray-scale mean value of the pixel point, n is a total number of the historical images, i.e. a total number of the historical gray-scale images, xi is the historical pixel gray-scale value of the pixel point in the i-th historical gray-scale image. i

[0074] ​​It can be understood that the historical image is grayed to obtain a historical gray image, so that the types of the historical image and the initial background gray image are ensured to be the same, the influence of the type of the historical image on the subsequent determination of the target background image and the target animal judgment threshold is avoided, and the accuracy of the determination of the target background image and the target animal judgment threshold is improved. Meanwhile, a method for determining a historical image feature of a historical image according to a feature of a pixel point in the historical image is provided.

[0075] In S203, a target background image and a target animal judgment threshold corresponding to the target image are determined according to the historical image feature, the initial background gray image and the initial animal judgment threshold.

[0076] The initial background gray image refers to an image obtained by performing gray processing on the initial background image. The initial background image refers to an image without small animals that is set in advance. The image can be any image without small animals collected by an infrared camera in the target cable trench. For each pixel point in the initial background gray image, the initial animal judgment threshold refers to an animal judgment threshold corresponding to the pixel point. The animal judgment threshold refers to a value used to determine whether a pixel point in the target image belongs to a pixel point in a small animal region. The value can be set in advance according to actual business requirements, and embodiments of the present application do not make specific limitations.

[0077] The target background image refers to a background gray image in the target cable trench at the current moment. The target animal judgment threshold refers to an animal judgment threshold corresponding to the pixel point at the current moment.

[0078] Specifically, the historical image feature and the initial background gray image can be input into a background image updating model to obtain a target background image corresponding to the target image. Similarly, the historical image feature and the initial animal judgment threshold can be input into an animal judgment threshold updating model to obtain a target animal judgment threshold corresponding to the target image.

[0079] It should be noted that the background image updating model and the animal judgment threshold updating model can be set in advance according to actual business requirements. For example, the background image updating model is a background image updating model based on a neural network model, and the animal judgment threshold updating model is an animal judgment threshold updating model based on a neural network model. Embodiments of the present application do not make specific limitations.

[0080] Optionally, for each pixel point, a target background gray value of the pixel point is determined according to an initial pixel gray value of the pixel point in the initial background gray image and a historical pixel gray mean value of the pixel point. A target background image corresponding to the target image is determined according to target background gray values of the pixel points. A target animal judgment threshold corresponding to the pixel point is determined according to a historical pixel gray variance of the pixel point and an initial animal judgment threshold corresponding to the pixel point.

[0081] wherein, the pixel point refers to a pixel point corresponding to a same position in the initial background gray image and the historical gray image. The initial pixel gray value refers to a gray value of the pixel point in the initial background gray image. The target background gray value refers to a gray value of the pixel point at a current moment. It should be noted that the initial background gray image, the historical gray image and the target background image are equal in size, that is, the initial background gray image, the historical gray image and the target background image contain the same number of pixel points.

[0082] Specifically, for each pixel point, the target background gray value of the pixel point is determined according to the initial pixel gray value of the pixel point in the initial background gray image and the historical pixel gray mean value of the pixel point by the following formula:

[0083] Y1 = (1 - a) · Y + a · K

[0084] wherein, Y1 is the target background gray value of the pixel point, Y is the initial pixel gray value of the pixel point in the initial background gray image, K is the historical pixel gray mean value of the pixel point, and a is the moving average coefficient. It should be noted that a can be pre-set according to actual business requirements, and is used to determine the update speed of the background image. The greater the value of a is, the faster the update speed of the background image is, and correspondingly, the background image is less stable.

[0085] Then, the initial pixel gray value of each pixel point in the initial background gray image is replaced by the target background gray value thereof, so as to obtain the target background image corresponding to the target image.

[0086] Further, for each pixel point, the sum between the historical pixel gray variance of the pixel point and the initial animal judgment threshold value corresponding to the pixel point is calculated as the target animal judgment threshold value corresponding to the pixel point. The target animal judgment threshold value corresponding to the pixel point can be determined by the following formula:

[0087] T1 = S + T

[0088] wherein, T1 is the target animal judgment threshold value corresponding to the pixel point, S is the historical pixel gray variance of the pixel point, and T is the initial animal judgment threshold value corresponding to the pixel point. Through the above method, the target animal judgment threshold value of each pixel point can be obtained.

[0089] It should be noted that there is no order between the determination of the target background image and the determination of the target animal judgment threshold value.

[0090] It can be understood that the target background image is obtained by updating the gray value of each pixel point in the initial background gray image, the accuracy of determining the target background image is improved, and the obtained target background image is more accurate. Meanwhile, the initial animal judgment threshold corresponding to each pixel point is updated according to the historical image features of each pixel point in the historical image to obtain the target animal judgment threshold corresponding to each pixel point, the influence of the historical image features of each pixel point in the historical image on the animal judgment threshold is fully considered, the accuracy of determining the target animal judgment threshold is improved, and the obtained target animal judgment threshold is more accurate, so that the subsequent animal monitoring result is more accurate.

[0091] S204, determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold.

[0092] The technical scheme of the embodiment of the application determines the target background image and the target animal judgment threshold corresponding to the target image according to the historical image features of the historical image, the initial background gray image and the initial animal judgment threshold, fully considers the correlation between the background image and the animal judgment threshold and the historical image features, and makes the obtained target background image and target animal judgment threshold more scientific and reasonable.

[0093] Embodiment three

[0094] Figure 3 A structural schematic diagram of an animal monitoring device provided by the third embodiment of the application, the embodiment can be applicable to the case of monitoring animals in a cable trench of a high-voltage distribution room. The device can be realized in the form of hardware and / or software, and can be configured in an electronic device, which can be a workstation or a server. As shown in the figure, the device comprises: Figure 3

[0095] An image acquisition module 301 is configured to acquire a target image in a target cable trench and at least two historical images.

[0096] A first determination module 302 is configured to determine a target background image and a target animal judgment threshold corresponding to the target image according to the historical image, the initial background gray image and the initial animal judgment threshold.

[0097] A second determination module 303 is configured to determine whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold.

[0098] ​The technical scheme of the embodiment of the present application comprises the following steps: obtaining a target image and at least two historical images in a target cable trench; determining a target background image corresponding to the target image and a target animal judgment threshold according to the historical images, an initial background gray image and an initial animal judgment threshold; and determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold. According to the historical images in the target cable trench, the initial background gray image and the initial animal judgment threshold, the target background image corresponding to the target image and the target animal judgment threshold are determined, so that the real-time updating of the background image and the animal judgment threshold is realized. Meanwhile, according to the updated background image and the animal judgment threshold, it is monitored whether there is a small animal in the target image, that is, whether there is a small animal in the target cable trench, so that the obtained animal monitoring result is more accurate, the position of the small animal in the cable trench can be accurately positioned by the operation personnel, and the small animal in the cable trench can be processed in time, thereby improving the inspection quality and efficiency of the small animal in the cable trench and ensuring the safe operation of the live equipment in the cable trench.

[0099] Optionally, the first determining module 302 comprises:

[0100] The first determining unit is configured to determine a historical image feature of the historical image according to the historical image, and the historical image feature comprises a historical pixel gray mean value and a historical pixel gray variance.

[0101] The second determining unit is configured to determine a target background image corresponding to the target image and a target animal judgment threshold according to the historical image feature, the initial background gray image and the initial animal judgment threshold.

[0102] Optionally, the first determining unit is specifically configured to:

[0103] perform gray processing on the historical image to obtain a historical gray image;

[0104] determine, for each pixel point, a historical pixel gray value of the pixel point in the at least two historical gray images;

[0105] determine, according to the historical pixel gray value, a historical pixel gray mean value and a historical pixel gray variance of the pixel point.

[0106] Optionally, the second determining unit is specifically configured to:

[0107] determine, for each pixel point, a target background gray value of the pixel point according to an initial pixel gray value of the pixel point in the initial background gray image and the historical pixel gray mean value of the pixel point;

[0108] determine the target background image corresponding to the target image according to the target background gray value of each pixel point;

[0109] According to the historical pixel gray variance of the pixel point and the initial animal judgment threshold corresponding to the pixel point, a target animal judgment threshold corresponding to the pixel point is determined.

[0110] Optionally, the second determining module 303 is specifically used for:

[0111] The target image is subjected to a gray processing to obtain a target gray image.

[0112] For each pixel point, according to a first gray value of the pixel point in the target background image and a second gray value of the pixel point in the target gray image, a target gray difference value of the pixel point is determined.

[0113] According to the target gray difference values of the pixel points and the target animal judgment thresholds corresponding to the pixel points, it is determined whether there is an animal in the target cable trench.

[0114] Optionally, the device further comprises:

[0115] The alarm information generating module is configured to generate alarm information according to the region where the animal is located and / or the number of the animals in the case that it is identified that there is an animal in the target cable trench.

[0116] Optionally, the alarm information generating module is specifically used for:

[0117] If the region where the animal is located is located in a preset region, the alarm information is generated; and / or,

[0118] If the number of the animals is greater than or equal to a preset number, the alarm information is generated.

[0119] The animal monitoring device provided in the embodiments can execute the animal monitoring method provided in any of the embodiments, and has the corresponding function modules and beneficial effects of executing each animal monitoring method.

[0120] Embodiment four

[0121] Figure 4 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the applications described and / or claimed in this document.

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

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

[0124] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the animal monitoring method.

[0125] In some embodiments, the animal monitoring method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the animal monitoring method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the animal monitoring method by any other appropriate means, such as by means of firmware.

[0126] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0127] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.

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

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

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

[0131] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0132] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.

[0133] The specific embodiments described hereinabove are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and scope of the disclosure. Any further modifications, equivalents and / or alternatives thereof are also encompassed within the scope of the present disclosure.

Claims

1. An animal monitoring method, characterized by, The method comprises: acquiring a target image and at least two historical images in a target cable trench; determining a target background image and a target animal judgment threshold corresponding to the target image according to the historical images, an initial background gray image and an initial animal judgment threshold; determining whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold; generating alarm information according to the area where the animal is located and / or the number of the animal if it is identified that there is an animal in the target cable trench; wherein the determining of the target background image and the target animal judgment threshold corresponding to the target image according to the historical images, the initial background gray image and the initial animal judgment threshold comprises: determining historical image features of the historical images according to the historical images; the historical image features comprise a historical pixel gray mean value and a historical pixel gray variance value; for each pixel point, determining a target background gray value of the pixel point according to an initial pixel gray value of the pixel point in the initial background gray image and the historical pixel gray mean value of the pixel point through the following formula: ; wherein, is a target background gray value of the pixel point, is an initial pixel gray value of the pixel point in an initial background gray image, and K is a historical pixel gray mean value of the pixel point, is a moving average coefficient; wherein the initial background gray image is an image obtained by performing a gray processing on an initial background image; and the initial background image is any image without small animals collected by the infrared camera in the target cable trench before the current moment. determining the target background image corresponding to the target image according to the target background gray values of the pixel points comprises: replacing the initial pixel gray values of the pixel points in the initial background gray image with the target background gray values of the pixel points to obtain the target background image corresponding to the target image; determining the target animal judgment threshold corresponding to the pixel point according to the historical pixel gray variance value of the pixel point and the initial animal judgment threshold corresponding to the pixel point comprises: calculating a sum of the historical pixel gray variance value of the pixel point and the initial animal judgment threshold corresponding to the pixel point, and taking the sum as the target animal judgment threshold corresponding to the pixel point.

2. The method of claim 1, wherein, The determining of the historical image features of the historical images according to the historical images comprises: performing gray processing on the historical images to obtain historical gray images; for each pixel point, determining historical pixel gray values of the pixel point in the at least two historical gray images; determining the historical pixel gray mean value and the historical pixel gray variance value of the pixel point according to the historical pixel gray values.

3. The method of claim 1, wherein, The determining of whether there is an animal in the target cable trench according to the target image, the target background image and the target animal judgment threshold comprises: performing gray processing on the target image to obtain a target gray image; for each pixel point, determining a target gray difference value of the pixel point according to a first gray value of the pixel point in the target background image and a second gray value of the pixel point in the target gray image; determining whether there is an animal in the target cable trench according to the target gray difference values of the pixel points and the target animal judgment thresholds corresponding to the pixel points.

4. The method of claim 1, wherein, The generating of the alarm information according to the area where the animal is located and / or the number of the animal if it is identified that there is an animal in the target cable trench comprises: generating the alarm information if the area where the animal is located is in a preset area; and / or generating the alarm information if the number of the animal is greater than or equal to a preset number.

5. An animal monitoring apparatus, characterized by, The method comprises: The image acquisition module is configured to acquire a target image and at least two historical images in a target cable trench; The first determination module is configured to determine a target background image corresponding to the target image and a target animal judgment threshold according to the historical images, an initial background gray image, and an initial animal judgment threshold; The second determination module is configured to determine whether an animal exists in the target cable trench according to the target image, the target background image, and the target animal judgment threshold; The alarm information generation module is configured to generate alarm information according to a region where the animal is located and / or a number of the animal when it is identified that the animal exists in the target cable trench. The first determination module includes: The first determination unit is configured to determine a historical image feature of the historical images according to the historical images; the historical image feature includes a historical pixel gray mean value and a historical pixel gray variance. The second determination unit is configured to determine, for each pixel point, a target background gray value of the pixel point according to an initial pixel gray value of the pixel point in the initial background gray image and the historical pixel gray mean value of the pixel point by using the following formula: ; wherein, is a target background gray value of the pixel point, is an initial pixel gray value of the pixel point in an initial background gray image, and K is a historical pixel gray mean value of the pixel point, is a moving average coefficient; wherein the initial background gray image is an image obtained by performing a gray processing on an initial background image; and the initial background image is any image without small animals collected by the infrared camera in the target cable trench before the current moment. The target background image corresponding to the target image is determined according to the target background gray values of the pixel points, including: replacing the initial pixel gray values of the pixel points in the initial background gray image with the target background gray values of the pixel points to obtain the target background image corresponding to the target image. The target animal judgment threshold corresponding to the pixel point is determined according to the historical pixel gray variance of the pixel point and the initial animal judgment threshold corresponding to the pixel point, including: calculating a sum of the historical pixel gray variance of the pixel point and the initial animal judgment threshold corresponding to the pixel point, and taking the sum as the target animal judgment threshold corresponding to the pixel point.

6. An electronic device, comprising: The electronic device includes: at least one processor; and a memory connected with the at least one processor in communication; wherein The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the animal monitoring method in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the animal monitoring method in any one of claims 1-4 when executed.

Citation Information

Patent Citations

  • Moving target detection method and device, equipment and storage medium

    CN115083008A