Method, device, terminal and storage medium for warning collision between mobile target and power line
By acquiring two sets of images of the power protection zone, performing pattern processing from different perspectives, and extracting the features of moving targets, the problem of complex models of different moving objects around power lines in existing technologies is solved, and efficient power line collision warning is achieved.
Patent Information
- Application Number
- CN202210331404.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In the existing technology, it is difficult to build a model to identify different moving objects around power lines. The number of training samples is large and the model structure is complex, resulting in low protection efficiency of the power line protection zone.
By acquiring two sets of images of the power protection zone, pattern processing is performed from different perspectives, the features of the moving target are extracted, and the recognition model is used to determine whether there is a collision hazard, simplifying the training process and reducing the data processing burden.
The collision risk of moving targets around power lines can be effectively identified without a large number of training samples and tedious steps, reducing hardware technology costs and improving protection efficiency.
Smart Images

Figure CN114708305B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power line protection, and in particular to a method, device, terminal and storage medium for early warning of collision between a mobile target and a power line. Background Art
[0002] The power line protection zone refers to the protection area planned to ensure the safety of the power supply line.
[0003] Taking China as an example, to ensure smooth power production and construction and effectively safeguard public and personal safety around power lines, in accordance with Article 10 of the "Regulations on the Protection of Electric Power Facilities," regarding power line protection zones, the extension distances for conductors of various voltage levels in general areas, defined as the area within two parallel planes formed by the horizontal extension of the conductor edge and perpendicular to the ground, are as follows: 5 meters for 1-10 kV, 10 meters for 35-110 kV, 15 meters for 154-330 kV, and 20 meters for 500 kV. In densely populated areas such as factories, mines, and towns, the protection zones for overhead power lines may be slightly smaller than these regulations. However, the extension distance for conductors of various voltage levels must not be less than the sum of the horizontal distance from the conductor edge after maximum calculated sag and maximum calculated windage, and the safe distance from buildings after windage.
[0004] In existing technologies, power lines are not only subject to interference from flying objects such as drones and birds, but also from construction equipment used in engineering projects, such as tower cranes and lifting equipment. One implementation method for protecting power line protection zones is to use image recognition technology to identify objects in the area surrounding the power lines, and then analyze potential safety hazards based on the characteristics of the objects. However, a key step in image recognition technology is the training of the image recognition model, which requires a large number of samples. For example, for drone recognition, it may be necessary to obtain tens of thousands of images and train the image recognition model for several hours before the model can be stabilized. The cost is self-evident.
[0005] However, if recognition models are constructed for different objects that may come out of the power lines, the number of samples used to train the models may reach tens of millions, the model structure used to identify different objects will become very complex, and the training time will be immeasurable.
[0006] Based on this, it is necessary to develop and design a method for warning collisions between mobile targets and power lines to solve the drawback of the existing technology that it is difficult to build a model to identify different moving objects around power lines. Summary of the Invention
[0007] The embodiments of the present invention provide a method, device, terminal and storage medium for early warning of collision between a mobile target and a power line, which are used to solve the problem in the prior art that it is difficult to determine the minimum distance relative to the power line during operation of the hoisting equipment.
[0008] In a first aspect, an embodiment of the present invention provides a method for early warning of collision between a mobile target and a power line, comprising:
[0009] Acquire two sets of images of the power line protection zone, the two sets of images being generated from two different perspectives, each set of images including at least two images containing the power line protection zone;
[0010] performing patterning processing on the two groups of images, wherein the patterning processing is used to adjust each image in the two groups of images to a predetermined format;
[0011] Identifying moving target features by inputting the two sets of images into a recognition model respectively;
[0012] It is determined whether there is a hidden danger of collision between the mobile object and the power line according to the latest image in the two groups of images and the mobile object characteristics.
[0013] In a possible implementation, the patterning of the two groups of images includes:
[0014] For each image, perform the following steps:
[0015] Adjusting the size and resolution of the image according to a preset specification, wherein the preset specification is used to represent a predetermined format of the image;
[0016] Decolorize the image to form a grayscale image;
[0017] Get the brightest and darkest points of a grayscale image;
[0018] According to the preset specification, the brightness curve of the grayscale image is adjusted so that the brightest point and the darkest point correspond to preset values of the preset specification.
[0019] In one possible implementation, the preset values of the preset specification include: a brightest setting and a darkest setting, and adjusting the brightness curve of the grayscale image according to the preset specification so that the brightest point and the darkest point correspond to the preset values of the preset specification includes:
[0020] Calculating the difference between the darkest point and the darkest setting as the darkest difference;
[0021] calculating a difference between the brightest point and the darkest point, and calculating a difference between the brightest setting and the darkest setting;
[0022] For each pixel of the grayscale image, adjustment is performed according to a first formula, where the first formula is:
[0023]
[0024] Wherein, Po is the pixel after adjustment, Pin is the pixel before adjustment, Δact is the difference between the brightest point and the darkest point, Δset is the difference between the brightest setting and the darkest setting, and Δdark is the darkest difference.
[0025] In one possible implementation, when the recognition model recognizes the moving target feature, the following steps are performed:
[0026] Obtain two identical imaging modules, where the imaging module is a matrix having multiple rows and columns;
[0027] Place the two imaging modules at the same position in the two images;
[0028] First imaging step: obtaining data of the positions of the two imaging modules in two images through the two imaging modules;
[0029] Calculating the difference between the two imaging modes;
[0030] If the difference between the two imaging modules is less than a threshold, the two imaging modules are respectively moved a preset distance, and the process jumps to the first imaging step;
[0031] If the difference between the two imaging modes is greater than or equal to a threshold, the features of the moving target are extracted by background comparison.
[0032] In one possible implementation, extracting the features of the moving target by background comparison includes:
[0033] Obtaining an intermediate mold, the intermediate mold being identical to the two imaging molds;
[0034] For each of the two images, perform the following steps:
[0035] copying a first imaging mold of the two imaging molds to the intermediate mold, wherein the first imaging mold is the imaging mold of the first image of the two images;
[0036] For the second of the two images, perform the following steps:
[0037] placing the first imaging module at a preset position on the second image;
[0038] Second imaging step: acquiring data of a preset position of the second image;
[0039] Calculating a difference between the first imaging mold and the intermediate mold;
[0040] If the difference between the first image-capturing model and the intermediate model is less than a threshold, the intermediate model is used as a feature of the moving object;
[0041] If the difference between the first imaging mold and the intermediate mold is greater than or equal to a threshold, the first imaging mold is moved a preset distance and the process jumps to the second imaging step.
[0042] In one possible implementation, determining whether the mobile target has a potential collision risk with the power line based on the latest image in the two sets of images and the mobile target features includes:
[0043] For each of the two sets of images, perform the following steps:
[0044] Inputting the latest image into a power line recognition model to extract features of the power lines, wherein the power line recognition model is a trained image recognition model;
[0045] In the latest image, determining a distance between the mobile object and the power line according to characteristics of the power line and characteristics of the mobile object;
[0046] If the distances between the moving target and the power line determined based on the two sets of images are both smaller than a threshold, there is a potential collision risk with the moving target.
[0047] In a possible implementation, determining the distance between the moving target and the power line according to the characteristics of the power line and the characteristics of the moving target in the latest image includes:
[0048] constructing an identifier of the power line and an identifier of the moving target in the latest image according to the features of the power line and the features of the moving target, wherein the identifier of the power line is a frame surrounding the power line, and the identifier of the moving target is a frame surrounding the moving target;
[0049] The minimum pixel distance between the identifier of the power line and the identifier of the mobile target is calculated as the distance between the mobile target and the power line, and the minimum pixel distance is determined by calculating the number of pixels passed by the shortest connection line between the identifier of the power line and the identifier of the mobile target.
[0050] In a second aspect, an embodiment of the present invention provides a mobile target and power line collision warning device, comprising:
[0051] An image acquisition module is used to acquire two sets of images of the power line protection zone, wherein the two sets of images are generated from two different perspectives, and each set of images includes at least two images containing the power line protection zone;
[0052] an image processing module, configured to perform pattern processing on the two groups of images, wherein the pattern processing is configured to adjust each image in the two groups of images to a predetermined format;
[0053] A moving target extraction module, configured to identify moving target features by inputting the two sets of images into a recognition model respectively;
[0054] as well as,
[0055] The collision warning module is used to determine whether the mobile target has a hidden danger of colliding with the power line based on the latest image in the two groups of images and the characteristics of the mobile target.
[0056] In a third aspect, an embodiment of the present invention provides a terminal comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, it implements the steps of the method described in the first aspect or any possible implementation of the first aspect.
[0057] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect or any possible implementation of the first aspect.
[0058] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0059] The embodiment of the present invention discloses a method for early warning of collisions between mobile targets and power lines. The method first obtains two sets of images of the power protection zone, the two sets of images coming from different perspectives, and then performs pattern processing on the images to improve the ability of feature extraction and reduce the burden of data processing. The images are then input into a recognition model to extract the features of the mobile target. Then, based on the features of the mobile target and the features of the power line, it is determined whether there is a safety hazard between the mobile target and the power line. The above processing method obtains the features of the mobile target based on mobile target analysis, and then analyzes the distance between the two in the image based on the features of the mobile target and the features of the power line, and finally gives a conclusion on the potential collision hazard. The method of the present invention is based on extracting features from the mobile target, does not require a large number of training samples, and does not require tedious training steps. It analyzes the potential collision hazard through image analysis, and the hardware technology cost is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0061] Figure 1 This is a flow chart of a method for early warning of collision between a mobile target and a power line provided by an embodiment of the present invention;
[0062] Figure 2 This is a schematic diagram of the image taking process provided by an embodiment of the present invention;
[0063] Figure 3 This is a schematic diagram of a moving target feature extraction principle provided by an embodiment of the present invention;
[0064] Figure 4 This is a schematic diagram of the principle of determining the distance between a moving target and a power line provided by an embodiment of the present invention;
[0065] Figure 5 This is a functional block diagram of a mobile target and power line collision warning device provided by an embodiment of the present invention;
[0066] Figure 6 This is a functional block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in alternative embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
[0068] In order to make the objectives, technical solutions and advantages of the present invention more clear, the following will be described through specific implementation methods in conjunction with the accompanying drawings.
[0069] The following is a detailed description of an embodiment of the present invention. This example is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiment.
[0070] Figure 1 This is a flow chart of a method for early warning of collision between a mobile target and a power line provided by an embodiment of the present invention.
[0071] like Figure 1 As shown, it shows a flowchart of the implementation of the mobile target and power line collision warning method provided by an embodiment of the present invention, which is detailed as follows:
[0072] In step 101 , two sets of images of a power line protection zone are acquired. The two sets of images are generated from two different viewing angles, and each set of images includes at least two images containing the power line protection zone.
[0073] Exemplarily, the two sets of images come from image acquisition terminals with two different perspectives, and the directions of the two perspectives are different. For example, in one application scenario, one set of images comes from a first camera device, and the perspective direction of the device is south, and the other set of images comes from a second camera device, and the perspective direction of the device is east. Based on the two different perspectives, it can be determined whether there is a moving object approaching in the image and causing a potential collision.
[0074] For each set of images, there are at least two images. As we know, by comparing two images, we can find the difference between the images, and based on the difference, we can tell whether there is a moving object.
[0075] In step 102, the two groups of images are subjected to patterning processing, wherein the patterning processing is used to adjust each image in the two groups of images to a predetermined format.
[0076] In some embodiments, step 102 includes:
[0077] For each image, perform the following steps:
[0078] Adjusting the size and resolution of the image according to a preset specification, wherein the preset specification is used to represent a predetermined format of the image;
[0079] Decolorize the image to form a grayscale image;
[0080] Get the brightest and darkest points of a grayscale image;
[0081] According to the preset specification, the brightness curve of the grayscale image is adjusted so that the brightest point and the darkest point correspond to preset values of the preset specification.
[0082] In some embodiments, the preset values of the preset specification include: a brightest setting and a darkest setting, and adjusting the brightness curve of the grayscale image according to the preset specification so that the brightest point and the darkest point correspond to the preset values of the preset specification includes:
[0083] Calculating the difference between the darkest point and the darkest setting as the darkest difference;
[0084] calculating a difference between the brightest point and the darkest point, and calculating a difference between the brightest setting and the darkest setting;
[0085] For each pixel of the grayscale image, adjustment is performed according to a first formula, where the first formula is:
[0086]
[0087] Wherein, Po is the pixel after adjustment, Pin is the pixel before adjustment, Δact is the difference between the brightest point and the darkest point, Δset is the difference between the brightest setting and the darkest setting, and Δdark is the darkest difference.
[0088] For example, if the acquired image is directly recognized, the processing burden will be too heavy due to issues such as image size, clarity, contrast, etc., and the recognition accuracy will be affected. Therefore, some necessary preprocessing steps are indispensable.
[0089] For example, in some application scenarios, the image size and resolution are first compressed, and different images are uniformly processed to the same size and resolution, which is conducive to unified processing methods. The compressed data becomes smaller, reducing unnecessary data processing burden.
[0090] Then, the image is decolorized to obtain a grayscale image.
[0091] Since grayscale images are affected by the brightness of the environment and the image acquisition device itself, there is a certain deviation in the image expression. Therefore, the grayscale images must be uniformly adjusted to a predetermined brightness range.
[0092] One method is to first offset the brightness value based on the darkest point to the minimum value of a preset brightness range. Offsetting means that an offset is added to each pixel of the image.
[0093] Then, the brightness width of the grayscale image is adjusted to the width of the predetermined brightness range by scaling.
[0094] The above process can be expressed by the first formula:
[0095]
[0096] Wherein, Po is the pixel after adjustment, Pin is the pixel before adjustment, Δact is the difference between the brightest point and the darkest point, Δset is the difference between the brightest setting and the darkest setting, and Δdark is the darkest difference.
[0097] In step 103, the two sets of images are input into a recognition model respectively to identify the features of the moving object.
[0098] In some embodiments, when the recognition model identifies the moving target feature, the following steps are performed:
[0099] Obtain two identical imaging modules, where the imaging module is a matrix having multiple rows and columns;
[0100] Place the two imaging modules at the same position in the two images;
[0101] First imaging step: obtaining data of the positions of the two imaging modules in two images through the two imaging modules;
[0102] Calculating the difference between the two imaging modes;
[0103] If the difference between the two imaging modules is less than a threshold, the two imaging modules are respectively moved a preset distance, and the process jumps to the first imaging step;
[0104] If the difference between the two imaging modes is greater than or equal to a threshold, the features of the moving target are extracted by background comparison.
[0105] In some embodiments, extracting features of a moving target by background comparison includes:
[0106] Obtaining an intermediate mold, the intermediate mold being identical to the two imaging molds;
[0107] For each of the two images, perform the following steps:
[0108] copying a first imaging mold of the two imaging molds to the intermediate mold, wherein the first imaging mold is the imaging mold of the first image of the two images;
[0109] For the second of the two images, perform the following steps:
[0110] placing the first imaging module at a preset position on the second image;
[0111] Second imaging step: acquiring data of a preset position of the second image;
[0112] Calculating a difference between the first imaging mold and the intermediate mold;
[0113] If the difference between the first image-capturing model and the intermediate model is less than a threshold, the intermediate model is used as a feature of the moving object;
[0114] If the difference between the first imaging mold and the intermediate mold is greater than or equal to a threshold, the first imaging mold is moved a preset distance and the process jumps to the second imaging step.
[0115] For example, the extraction of moving target features is a prerequisite for realizing the recognition and judgment of collision warning.
[0116] In one application scenario, such as Figure 2As shown in the figure, the first image 201 and the second image 202 are images of the same group. Then, two identical image acquisition modules are obtained and two identical image blocks are taken from the same position of the two images, namely the first image block 203 and the second image block 204. If the first image block 203 and the second image block 204 are background images, they can be compared by comparison, for example, after subtracting the data of the two images, the absolute value is taken. If the value is smaller, it means that the two image blocks have a high degree of similarity. Then, according to Figure 2 The process indicated by the arrow moves the imaging module a predetermined distance. If the absolute value of the difference between the two image blocks is large, it means that one of the two image blocks contains the characteristics of the moving target (such as the part surrounded by the thick line in the lower left image in the figure).
[0117] For example Figure 2 The first pixel 202 is part of the background pixel, and the second pixel 206 is part of the moving target pixel. If the imaging module moves to a position including the moving target, it can be seen that the absolute value of the difference between the two image blocks is relatively large. By comparing the background of the two image blocks, the image block of the moving target can be obtained. The image block of the moving target is the feature of the moving target.
[0118] like Figure 3 As shown, in one application scenario, one background comparison method is to copy the data of the imaging module of the first image to the intermediate module 302. Then, the imaging module of the first image is used to extract image blocks from the second image. If an image block similar to the intermediate module 302 is obtained, it indicates that the image block in the intermediate module 302 is the extracted feature of the moving target. If no image block similar to the intermediate module 302 is found after traversing the entire second image, it indicates that the imaging module of the second image is the feature of the moving target. Of course, generally, for further confirmation, after traversing the first image and failing to obtain the moving target feature, the imaging module of the second image is usually copied to the intermediate module 302, and then the first image is traversed again. Usually, an image block similar to the intermediate module 302 is found. If no image block is found, it indicates that there is a processing error in step 101 or step 102.
[0119] In step 104, it is determined whether the moving object has a potential collision with the power line based on the latest image in the two sets of images and the moving object features.
[0120] In some embodiments, step 104 includes:
[0121] For each of the two sets of images, perform the following steps:
[0122] Inputting the latest image into a power line recognition model to extract features of the power lines, wherein the power line recognition model is a trained image recognition model;
[0123] In the latest image, determining a distance between the mobile object and the power line according to characteristics of the power line and characteristics of the mobile object;
[0124] If the distances between the moving target and the power line determined based on the two sets of images are both smaller than a threshold, there is a potential collision risk with the moving target.
[0125] In some embodiments, determining the distance between the moving target and the power line according to the characteristics of the power line and the characteristics of the moving target in the latest image includes:
[0126] constructing an identifier of the power line and an identifier of the moving target in the latest image according to the features of the power line and the features of the moving target, wherein the identifier of the power line is a frame surrounding the power line, and the identifier of the moving target is a frame surrounding the moving target;
[0127] The minimum pixel distance between the identifier of the power line and the identifier of the mobile target is calculated as the distance between the mobile target and the power line, and the minimum pixel distance is determined by calculating the number of pixels passed by the shortest connection line between the identifier of the power line and the identifier of the mobile target.
[0128] For example, after acquiring the features of the moving object, it is also necessary to acquire the features of the power lines. A simple and easy way to identify the features of the power lines is to use an image recognition model to output image blocks of the power line features. For example, OpenCV can identify the features of the power lines and frame the area where the power lines are located in the latest image.
[0129] Similarly, the image features of the moving target can be framed and identified in the latest image. Figure 4 As shown, in the latest image 401, image block 402 corresponds to the characteristics of the moving target, and image block 403 corresponds to the characteristics of the power line. By finding the shortest connection between the two blocks and the number of pixels passed by the shortest connection, the distance between the power line and the moving target can be obtained ( Figure 4 (Note that this distance represents the distance between the power line and the moving target in the viewing direction, such as the south viewing angle mentioned above.) If the viewing distance in both directions is less than the threshold, there is a risk of collision.
[0130] The implementation method of the mobile target and power line collision warning method of the present invention first obtains two sets of images of the power protection area, the two sets of images are from different perspectives, and then the images are patterned to improve the ability of feature extraction and reduce the burden of data processing. The images are then input into the recognition model to extract the features of the mobile target, and then, based on the features of the mobile target and the features of the power line, it is determined whether there is a safety hazard between the mobile target and the power line. The above processing method obtains the features of the mobile target based on the mobile target analysis, and then analyzes the distance between the two in the image based on the features of the mobile target and the features of the power line, and finally gives a conclusion on the collision hazard. The method of the present invention is based on the extraction of features of the mobile target, does not require a large number of training samples, and does not require tedious training steps. The collision hazard is analyzed through image analysis, and the hardware technology cost is low.
[0131] It should be understood that the size of the serial numbers of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0132] The following is an embodiment of the device of the present invention. For details not described in detail, please refer to the corresponding method embodiment described above.
[0133] Figure 5 This is a functional block diagram of a mobile target and power line collision warning device provided by an embodiment of the present invention, referring to Figure 5 The mobile target and power line collision warning device 5 includes: an image acquisition module 501 , an image processing module 502 , a mobile target extraction module 503 and a collision warning module 504 .
[0134] An image acquisition module 501 is configured to acquire two sets of images of the power line protection zone, wherein the two sets of images are generated from two different perspectives, and each set of images includes at least two images containing the power line protection zone;
[0135] An image processing module 502 is configured to perform pattern processing on the two groups of images, wherein the pattern processing is configured to adjust each image in the two groups of images to a predetermined format;
[0136] A moving target extraction module 503 is configured to identify moving target features by inputting the two sets of images into a recognition model respectively;
[0137] as well as,
[0138] The collision warning module 504 is configured to determine whether the moving target has a potential collision with the power line based on the latest image in the two sets of images and the moving target features.
[0139] Figure 6This is a functional block diagram of a terminal provided by an embodiment of the present invention. Figure 6 As shown, the terminal 6 of this embodiment includes: a processor 600 and a memory 601, wherein the memory 601 stores a computer program 602 that can be run on the processor 600. When the processor 600 executes the computer program 602, the steps in the above-mentioned mobile target and power line collision warning method and embodiment are implemented, such as Figure 1 Steps 101 to 104 are shown.
[0140] Illustratively, the computer program 602 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 601 and executed by the processor 600 to implement the present invention.
[0141] The terminal 6 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 6 can include, but is not limited to, a processor 600 and a memory 601. Those skilled in the art will understand that Figure 6 It is only an example of terminal 6 and does not constitute a limitation on terminal 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0142] The processor 600 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0143] The memory 601 may be an internal storage unit of the terminal 6, such as a hard disk or memory of the terminal 6. The memory 601 may also be an external storage device of the terminal 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 6. Furthermore, the memory 601 may include both an internal storage unit of the terminal 6 and an external storage device. The memory 601 is used to store the computer program and other programs and data required by the terminal. The memory 601 may also be used to temporarily store data that has been output or is about to be output.
[0144] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the implementation method can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method implementation method, and will not be repeated here.
[0145] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0146] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0147] In the embodiments provided herein, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components being combined or integrated into another system, or some features being ignored or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interface, or the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0148] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
[0149] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0150] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the above-mentioned mobile target and power line collision warning method and mobile target and power line collision warning device embodiment. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0151] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for early warning of collision between a mobile target and a power line, characterized in that: include: Acquire two sets of images of the power line protection zone, the two sets of images being generated from two different perspectives, each set of images including at least two images containing the power line protection zone; performing patterning processing on the two groups of images, wherein the patterning processing is used to adjust each image in the two groups of images to a predetermined format; Identifying moving target features by inputting the two sets of images into a recognition model respectively; determining, based on the latest image in the two sets of images and the characteristics of the moving target, whether the moving target has a potential collision risk with the power line; in, When the recognition model recognizes the characteristics of a moving target, the following steps are performed: Obtain two identical imaging modules, where the imaging module is a matrix having multiple rows and columns; Place the two imaging modules at the same position in the two images; First imaging step: obtaining data of the positions of the two imaging modules in two images through the two imaging modules; Calculating the difference between the two imaging modes; If the difference between the two imaging modules is less than a threshold, the two imaging modules are respectively moved a preset distance, and the process jumps to the first imaging step; If the difference between the two image modes is greater than or equal to a threshold, the features of the moving target are extracted by background comparison; in, The feature extraction of the moving target by background comparison includes: Obtaining an intermediate mold, the intermediate mold being identical to the two imaging molds; For each of the two images, perform the following steps: copying a first imaging mold of the two imaging molds to the intermediate mold, wherein the first imaging mold is the imaging mold of the first image of the two images; For the second of the two images, perform the following steps: placing the first imaging module at a preset position on the second image; Second imaging step: acquiring data of a preset position of the second image; Calculating a difference between the first imaging mold and the intermediate mold; If the difference between the first image-capturing model and the intermediate model is less than a threshold, the intermediate model is used as a feature of the moving object; If the difference between the first imaging mold and the intermediate mold is greater than or equal to a threshold, the first imaging mold is moved a preset distance and the process jumps to the second imaging step.
2. The mobile target and power line collision warning method according to claim 1, characterized in that: The patterning of the two groups of images includes: For each image, perform the following steps: Adjusting the size and resolution of the image according to a preset specification, wherein the preset specification is used to represent a predetermined format of the image; Decolorize the image to form a grayscale image; Get the brightest and darkest points of a grayscale image; According to the preset specification, the brightness curve of the grayscale image is adjusted so that the brightest point and the darkest point correspond to preset values of the preset specification.
3. The mobile target and power line collision warning method according to claim 2, characterized in that: The preset values of the preset specification include: a brightest setting and a darkest setting. Adjusting the brightness curve of the grayscale image according to the preset specification so that the brightest point and the darkest point correspond to the preset values of the preset specification includes: Calculating the difference between the darkest point and the darkest setting as the darkest difference; calculating a difference between the brightest point and the darkest point, and calculating a difference between the brightest setting and the darkest setting; For each pixel of the grayscale image, adjustment is performed according to a first formula, where the first formula is: Where, is the adjusted pixel point, is the pixel before adjustment, is the difference between the brightest point and the darkest point, is the difference between the brightest setting and the darkest setting, The darkest difference.
4. The mobile target and power line collision warning method according to any one of claims 1 to 3, characterized in that: The determining, based on the latest image in the two groups of images and the characteristics of the moving target, whether the moving target has a potential collision risk with the power line includes: For each of the two sets of images, perform the following steps: Inputting the latest image into a power line recognition model to extract features of the power lines, wherein the power line recognition model is a trained image recognition model; In the latest image, determining a distance between the mobile object and the power line according to characteristics of the power line and characteristics of the mobile object; If the distances between the moving target and the power line determined based on the two sets of images are both smaller than a threshold, there is a potential collision risk with the moving target.
5. The mobile target and power line collision warning method according to claim 4, characterized in that: Determining the distance between the moving target and the power line according to the characteristics of the power line and the characteristics of the moving target in the latest image includes: constructing an identifier of the power line and an identifier of the moving target in the latest image according to the features of the power line and the features of the moving target, wherein the identifier of the power line is a frame surrounding the power line, and the identifier of the moving target is a frame surrounding the moving target; The minimum pixel distance between the identifier of the power line and the identifier of the mobile target is calculated as the distance between the mobile target and the power line, and the minimum pixel distance is determined by calculating the number of pixels passed by the shortest connection line between the identifier of the power line and the identifier of the mobile target.
6. A mobile target and power line collision warning device, characterized in that: For implementing the mobile target and power line collision warning method according to any one of claims 1 to 5, the mobile target and power line collision warning device comprises: An image acquisition module is used to acquire two sets of images of the power line protection zone, wherein the two sets of images are generated from two different perspectives, and each set of images includes at least two images containing the power line protection zone; an image processing module, configured to perform pattern processing on the two groups of images, wherein the pattern processing is configured to adjust each image in the two groups of images to a predetermined format; A moving target extraction module, configured to identify moving target features by inputting the two sets of images into a recognition model respectively; as well as, The collision warning module is used to determine whether the mobile target has a hidden danger of colliding with the power line based on the latest image in the two groups of images and the characteristics of the mobile target.
7. A terminal comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Traffic collision pre-warning technique and system based on images
CN105761547A
Vehicle anti-collision early warning method and device, terminal equipment and storage medium
CN112634359A