Image processing method and device, computer equipment, readable storage medium and program product
By acquiring and processing image data of multiple cameras in real time during power grid inspection, and quickly positioning and displaying target images based on the request of user terminals, the problem of low data selection in the prior art is solved, and more efficient and accurate data acquisition is achieved.
Patent Information
- Application Number
- CN202510429228.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, manually selecting the required data from the massive data generated by drone inspection is very low in efficiency and it is difficult to meet the requirements for efficiency, accuracy and safety during power grid inspection.
An image processing method is provided. When the inspection device inspects the distribution network, it acquires the metadata of images and images taken by a variety of cameras in real time, receives image display requests sent by the user terminal, and determines the target image from multiple images based on the latitude and longitude information of the power equipment and the target latitude and longitude information, and displays the metadata of the target image and the target image in the display screen of the user terminal.
It effectively improves the efficiency and accuracy of data acquisition, can quickly locate and display target images, and meets the requirements for efficiency and accuracy during power grid inspection.
Smart Images

Figure CN119938975A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power grid technology, and in particular to an image processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] As the scale of power grids continues to expand, traditional manual inspection methods can no longer meet the requirements for efficiency, accuracy, and safety during power grid inspections. The rapid development of drone technology can solve these problems in manual inspections. In the process of drone inspections of power grids, a large amount of inspection data will be generated. In the existing technology, the required data is manually selected from the inspection data, but this method is very inefficient. Summary of the invention
[0003] Based on this, it is necessary to provide an image processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve data acquisition efficiency in response to the above technical problems.
[0004] In a first aspect, the present application provides an image processing method, the method comprising:
[0005] In the process of the inspection equipment inspecting the distribution network, multiple images of the distribution network taken by multiple cameras and metadata of the images are obtained in real time; wherein the metadata includes the latitude and longitude information of the power equipment in the image, the time point when the image was taken, and the type of camera that took the image;
[0006] receiving an image display request sent by a user terminal, the image display request including target latitude and longitude information of a target location;
[0007] Determine a target image from a plurality of images based on the latitude and longitude information of the power equipment and the latitude and longitude information of the target;
[0008] On the display screen of the user terminal, the target image and metadata of the target image are displayed.
[0009] In one embodiment, determining a target image from a plurality of images based on the latitude and longitude information of the power equipment and the latitude and longitude information of the target includes:
[0010] Based on the longitude and latitude information of the power equipment and the longitude and latitude information of the target, obtaining the distance between each power equipment in the plurality of images and the target location;
[0011] The electric device with the smallest corresponding distance is determined as the target electric device, and the image including the target electric device is determined as the target image.
[0012] In one embodiment, the method further comprises:
[0013] For visible light images taken by a visible light camera among the multiple images, preprocessing the visible light images is performed, and various feature information of the power equipment is extracted from the preprocessed images; wherein the preprocessing includes image denoising and edge detection;
[0014] Based on multiple feature information, determine the number range of the number of cluster centers, and select the number of cluster centers from the number range based on the elbow rule;
[0015] Based on the number of cluster centers and multiple feature information, the power equipment in the visible light image is clustered to obtain the cluster labels of the power equipment.
[0016] In one embodiment, the method further comprises:
[0017] Acquire multiple historical infrared images taken by infrared cameras;
[0018] For multiple pixel points with the same position coordinates in multiple historical infrared images, pixel values of the multiple pixel points are integrated to obtain integrated pixel values, and a background infrared image is generated based on the integrated pixel values;
[0019] Determine an image captured by an infrared camera among the multiple images as a current infrared image, and determine a pixel point in the current infrared image as a current pixel point;
[0020] For each current pixel, based on the position coordinates of the current pixel, determine the background pixel corresponding to the current pixel in the background infrared image, and obtain the pixel value difference between the pixel value of the current pixel and the pixel value of the background pixel;
[0021] A difference image is generated based on the pixel value difference, and a contour of the electric power equipment is acquired based on the difference image.
[0022] In one embodiment, obtaining a profile of the power equipment based on the difference image includes:
[0023] Obtaining a pixel value threshold based on the pixel value of the pixel point in the difference image;
[0024] Based on the pixel values of the pixels in the difference image and the pixel value threshold, a binary image corresponding to the difference image is generated;
[0025] A target pixel region in a binary image is obtained, and the outline of the target pixel region is determined as the outline of the electric power equipment; wherein the target pixel region is a region composed of a plurality of pixel points having the same pixel value.
[0026] In one embodiment, generating a binary image corresponding to the difference image based on the pixel values of the pixels in the difference image and the pixel value threshold comprises:
[0027] For each pixel in the difference image, when the pixel value of the pixel is not less than the pixel value threshold, the pixel value corresponding to white is determined as the target pixel value of the pixel; when the pixel value of the pixel is less than the pixel value threshold, the pixel value corresponding to black is determined as the target pixel value of the pixel;
[0028] Based on the target pixel value, a binary image corresponding to the difference image is generated.
[0029] In a second aspect, the present application further provides an image processing device, the device comprising:
[0030] An acquisition module is used to acquire multiple images of the distribution network taken by multiple cameras and metadata of the images in real time during the process of the inspection equipment inspecting the distribution network; wherein the metadata includes the latitude and longitude information of the power equipment in the image, the time point when the image was taken, and the type of camera that took the image;
[0031] A receiving module, used for receiving an image display request sent by a user terminal, wherein the image display request includes target latitude and longitude information of a target location;
[0032] A determination module, used for determining a target image from a plurality of images based on the latitude and longitude information of the power equipment and the latitude and longitude information of the target;
[0033] The display module is used to display the target image and metadata of the target image on the display screen of the user terminal.
[0034] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0036] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0037] The above-mentioned image processing method, device, computer equipment, computer-readable storage medium and computer program product, in the process of the inspection equipment inspecting the distribution network, obtains multiple images of the distribution network taken by multiple cameras and metadata of the images in real time; wherein the metadata includes the longitude and latitude information of the power equipment in the image, the time point of the image shooting, and the type of camera that shot the image; receives an image display request sent by a user terminal, the image display request includes the target longitude and latitude information of the target location; determines the target image from multiple images based on the longitude and latitude information of the power equipment and the target longitude and latitude information; displays the target image and metadata of the target image on the display screen of the user terminal. The method provided by the present application can effectively improve the efficiency and accuracy of metadata acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 is a schematic flow chart of an image processing method in one embodiment;
[0040] Figure 2 is a schematic flow chart of a method for determining a target image in one embodiment;
[0041] Figure 3 is a structural block diagram of an image processing device in one embodiment;
[0042] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] In one embodiment, Figure 1 As shown, an image processing method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0045] S102. During the inspection of the distribution network by the inspection equipment, multiple images of the distribution network taken by multiple cameras and metadata of the images are obtained in real time; wherein the metadata includes the latitude and longitude information of the power equipment in the image, the time point when the image was taken, and the type of camera that took the image.
[0046] Optionally, the inspection equipment may be, but is not limited to, a drone, and the multiple cameras may include, but are not limited to, visible light cameras and infrared cameras.
[0047] S104: Receive an image display request sent by a user terminal, where the image display request includes target longitude and latitude information of a target location.
[0048] Optionally, after the metadata of the image is acquired, the metadata is stored in a database. After receiving an image display request sent by a user terminal, the image display request is converted into a database query statement.
[0049] S106 : Determine a target image from multiple images based on the longitude and latitude information of the power equipment and the longitude and latitude information of the target.
[0050] Optionally, based on the longitude and latitude information of the power device and the target longitude and latitude information, a spatial query algorithm can be used to retrieve the power device closest to the target location in the database and determine the target image where the power device is located, wherein the spatial query algorithm can be but is not limited to a geographic space query algorithm or a spatial index query algorithm.
[0051] S108: Display the target image and metadata of the target image on a display screen of the user terminal.
[0052] Optionally, the target image and metadata of the target image may be displayed at corresponding positions on the display screen in a preset form based on a display rule of the display screen.
[0053] In the above-mentioned image processing method, in the process of the inspection equipment inspecting the distribution network, multiple images of the distribution network taken by multiple cameras and metadata of the images are obtained in real time; wherein the metadata includes the longitude and latitude information of the power equipment in the image, the time point of the image shooting, and the type of camera that shot the image; an image display request sent by a user terminal is received, and the image display request includes the target longitude and latitude information of the target location; based on the longitude and latitude information of the power equipment and the target longitude and latitude information, a target image is determined from multiple images; and the target image and metadata of the target image are displayed on the display screen of the user terminal. The method provided by the present application can effectively improve the efficiency and accuracy of metadata acquisition.
[0054] In some embodiments, Figure 2As shown, based on the longitude and latitude information of the power equipment and the longitude and latitude information of the target, a target image is determined from multiple images, including:
[0055] S202: Based on the longitude and latitude information of the power equipment and the longitude and latitude information of the target, obtain the distance between each power equipment in the multiple images and the target location.
[0056] S204: Determine the electric power device with the smallest corresponding distance as the target electric power device, and determine the image including the target electric power device as the target image.
[0057] Optionally, the distance between the power device and the target location may be calculated based on the Haversine formula, wherein the Haversine formula is used to calculate the great circle distance between two points on the surface of the earth, that is, the shortest path between the two points.
[0058] In this embodiment, the electric device with the smallest corresponding distance is determined as the target electric device, and the image including the target electric device is determined as the target image. The target image determined in this way better meets the needs of the user.
[0059] In some embodiments, the method also includes: preprocessing the visible light images taken by the visible light camera in the multiple images, and extracting various feature information of the power equipment from the preprocessed images; wherein the preprocessing includes image denoising and edge detection; based on the various feature information, determining the number range of the number of cluster centers, and based on the elbow rule, selecting the number of cluster centers from the number range; based on the number of cluster centers and the various feature information, clustering the power equipment in the visible light images to obtain cluster labels of the power equipment.
[0060] Among them, image denoising refers to the process of restoring the original image from an image contaminated by noise. Noise is usually introduced during image acquisition, transmission or storage, which will have an adverse effect on the image quality and subsequent processing tasks (such as image segmentation, feature extraction, target recognition, etc.); edge detection is a basic technology in image processing and computer vision, which is used to identify areas with significant brightness changes in digital images. These areas usually correspond to the boundaries of objects. The goal of edge detection is to extract important structural information from the image to provide support for subsequent image analysis and processing tasks (such as image segmentation, feature extraction, object recognition, etc.).
[0061] Optionally, the clustering method for clustering power equipment can be but is not limited to the K-means clustering algorithm, which is an unsupervised learning method; the Elbow Method is a commonly used method for determining the optimal number of clusters (i.e., the k value) in the K-means clustering algorithm. The basic idea of this method is to calculate the clustering cost under different k values (usually using the sum of the squares of the distances from all points to the center of their clusters as the cost function), and plot a curve of the cost function as the k value increases. On the curve, the rate of decrease of the cost function will slow down significantly after a certain k value, forming an "elbow" shape, and this point is generally considered to be the optimal k value.
[0062] Optionally, the various characteristic information of the power equipment may include, but is not limited to, the type, longitude and latitude information, size, material, shape, service life and maintenance record of the power equipment.
[0063] In this embodiment, clustering labels of the power equipment are determined by a clustering algorithm, so as to facilitate subsequent analysis of the corresponding inspection data of the power equipment.
[0064] In some embodiments, the method also includes: acquiring multiple historical infrared images taken by an infrared camera; integrating the pixel values of multiple pixel points with the same position coordinates in the multiple historical infrared images to obtain integrated pixel values, and generating a background infrared image based on the integrated pixel values; determining an image taken by the infrared camera in the multiple images as the current infrared image, and determining a pixel point in the current infrared image as the current pixel point; for each current pixel point, determining the background pixel point corresponding to the current pixel point in the background infrared image based on the position coordinates of the current pixel point, and obtaining the pixel value difference between the pixel value of the current pixel point and the pixel value of the background pixel point; generating a difference image based on the pixel value difference, and obtaining the outline of the power equipment based on the difference image.
[0065] Optionally, the integrated pixel value may be, but is not limited to, an average value, a median value, or a standard deviation of the pixel value; the pixel value of a pixel point in the infrared image may be, but is not limited to, characterizing the temperature, radiation intensity, and emissivity of the pixel point.
[0066] Optionally, after the current infrared image and the historical infrared image are acquired, the acquired infrared image may be preprocessed to improve the image quality; wherein the image preprocessing process may include, but is not limited to, image denoising.
[0067] Optionally, the pixel value of a pixel point in the difference image is the corresponding pixel value difference.
[0068] In this embodiment, a difference image is generated based on the pixel value difference, and the contour of the electric power equipment is obtained based on the difference image, so that the contour of the electric power equipment obtained is more accurate.
[0069] In some embodiments, the outline of the power equipment is obtained based on the difference image, including: obtaining a pixel value threshold based on the pixel value of the pixel point in the difference image; generating a binary image corresponding to the difference image based on the pixel value of the pixel point in the difference image and the pixel value threshold; obtaining a target pixel area in the binary image, and determining the outline of the target pixel area as the outline of the power equipment; wherein the target pixel area is an area composed of multiple pixel points with the same pixel value.
[0070] Optionally, the average value or standard deviation of the pixel values of the pixels in the difference image can be determined as the pixel value threshold but is not limited to; a binary image, also called a binary image or a black and white image, is a digital image in which each pixel has only two possible values.
[0071] Optionally, after the binary image is generated, small noise points in the binary image are removed, and small holes in the binary image are filled.
[0072] Optionally, connected components in the binary image are identified and marked to distinguish different power devices, and the outline of the power device is extracted from the binary image.
[0073] In this embodiment, based on the pixel values and pixel value thresholds of the pixel points in the difference image, a binary image corresponding to the difference image is generated, the target pixel area in the binary image is obtained, and the outline of the target pixel area is determined as the outline of the power equipment, so that the outline of the power equipment obtained is more accurate.
[0074] In some embodiments, based on the pixel values of the pixels in the difference image and a pixel value threshold, a binary image corresponding to the difference image is generated, including: for each pixel in the difference image, when the pixel value of the pixel is not less than the pixel value threshold, the pixel value corresponding to white is determined as the target pixel value of the pixel; when the pixel value of the pixel is less than the pixel value threshold, the pixel value corresponding to black is determined as the target pixel value of the pixel; based on the target pixel value, a binary image corresponding to the difference image is generated.
[0075] Optionally, the pixel value corresponding to white is 1, and the pixel value corresponding to black is 0.
[0076] In this embodiment, by comparing the pixel value of the pixel point with the pixel value threshold, the pixel value corresponding to white or the pixel value corresponding to black is determined as the target pixel value, so that the binary image generated based on the target pixel value is more accurate.
[0077] In one embodiment, another image processing method is provided, the method comprising the following contents:
[0078] Module 1: k-means algorithm to generate image labels
[0079] (1) Image acquisition: The high-resolution camera carried by the drone continuously takes photos of the distribution network line equipment.
[0080] (2) Preprocessing: Preprocess the photos collected in real time, including image denoising, edge detection, etc., to improve the photo quality.
[0081] (3) Feature extraction: Extract the features of the tower from the preprocessed image, such as the location coordinates, height, shape, etc. of the tower.
[0082] (4) Feature vector construction: The extracted features are converted into feature vectors, each of which represents a tower pole.
[0083] (5) Apply the k-means algorithm for clustering: Determine the number of transmission towers to be divided according to actual needs, that is, the K value (number of clusters). The Elbow Method can be used to assist in determining the optimal K value, and automatically generate a label for each transmission tower based on the K-means clustering results.
[0084] Module 2: Retrieve patrol images by latitude and longitude
[0085] (1) Data collection: The drone is equipped with a high-definition camera and an infrared camera. During the shooting process, the GPS module on the drone will record the shooting location (latitude and longitude) and timestamp of each photo. After the shooting is completed, the visible light photos and infrared photos are associated with the GPS data to form a photo database with location information.
[0086] (2) Image database establishment: The image data is stored in the database. The metadata of each photo includes latitude and longitude, shooting time, photo type (visible light or infrared light), etc.
[0087] (3) Location information input and processing: The user inputs the latitude and longitude information required for query through the front-end interface. The back-end server receives the location information entered by the user and converts it into a database query statement.
[0088] (4) Spatial query and retrieval: Use spatial query algorithms (such as geospatial query or spatial index query) to retrieve photo records closest to the input location information in the database.
[0089] (5) Result output and display: The system extracts relevant photos based on the query results and outputs them to the front-end interface.
[0090] Module 3: Continuous pixel infrared imaging recognition technology
[0091] (1) Background modeling: In the absence of any target object, multiple frames of infrared images are collected, and the background model is initialized by the average or median of these images, which is updated regularly to adapt to environmental changes.
[0092] (2) Image preprocessing: Preprocess the infrared photos collected in real time, including image denoising, to improve the photo quality. Subtract the background model from the infrared image to obtain a difference image.
[0093] (3) Thresholding: One or more thresholds are determined based on the statistical characteristics of the difference image, such as the mean and standard deviation, and the difference image is thresholded to generate a binary image, in which the foreground object is usually white (pixel value is 1) and the background is black (pixel value is 0).
[0094] (4) Morphological processing: remove small noise points and fill small holes in foreground objects.
[0095] (5) Foreground extraction: Identify and mark the connected components in the binary image, distinguish different foreground objects, and extract the contours of the foreground objects from the binary image.
[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Based on the same inventive concept, the embodiment of the present application also provides an image processing device for implementing the above-mentioned image processing method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image processing device embodiments provided below can refer to the limitations on the image processing method above, and will not be repeated here.
[0098] In an exemplary embodiment, Figure 3 As shown, an image processing device 300 is provided, comprising: a first acquisition module 301, a receiving module 302, a first determination module 303 and a display module 304, wherein:
[0099] The first acquisition module 301 is used to acquire multiple images of the distribution network taken by multiple cameras and metadata of the images in real time during the process of the inspection equipment inspecting the distribution network; wherein the metadata includes the latitude and longitude information of the power equipment in the image, the shooting time of the image, and the type of camera that took the image.
[0100] The receiving module 302 is used to receive an image display request sent by a user terminal, where the image display request includes target longitude and latitude information of a target location.
[0101] The first determining module 303 is used to determine a target image from multiple images based on the longitude and latitude information of the power equipment and the longitude and latitude information of the target.
[0102] The display module 304 is used to display the target image and metadata of the target image on the display screen of the user terminal.
[0103] In some embodiments, the first determination module 303 is also used to obtain the distance between each power device in multiple images and the target position based on the longitude and latitude information of the power device and the target longitude and latitude information; determine the power device with the smallest corresponding distance as the target power device, and determine the image including the target power device as the target image.
[0104] In some embodiments, the image processing device 300 is specifically used to preprocess the visible light images taken by a visible light camera among multiple images, and extract various feature information of the power equipment from the preprocessed images; wherein the preprocessing content includes image denoising and edge detection; based on various feature information, determine the number range of the number of cluster centers, and based on the elbow rule, select the number of cluster centers from the number range; based on the number of cluster centers and various feature information, cluster the power equipment in the visible light image to obtain cluster labels of the power equipment.
[0105] In some embodiments, the image processing apparatus 300 further includes:
[0106] The second acquisition module is used to acquire multiple historical infrared images taken by the infrared camera.
[0107] The integration module is used to integrate the pixel values of multiple pixel points with the same position coordinates in multiple historical infrared images to obtain integrated pixel values, and generate a background infrared image based on the integrated pixel values.
[0108] The second determination module is used to determine an image captured by the infrared camera among the multiple images as the current infrared image, and determine a pixel point in the current infrared image as the current pixel point.
[0109] The third determination module is used to determine the background pixel point corresponding to the current pixel point in the background infrared image based on the position coordinates of the current pixel point for each current pixel point, and obtain the pixel value difference between the pixel value of the current pixel point and the pixel value of the background pixel point.
[0110] The generating module is used to generate a difference image based on the pixel value difference, and obtain the outline of the electric power equipment based on the difference image.
[0111] In some embodiments, the generating module comprises:
[0112] The first acquisition unit is used to acquire a pixel value threshold based on the pixel value of the pixel point in the difference image.
[0113] The generating unit is used to generate a binary image corresponding to the difference image based on the pixel values of the pixels in the difference image and the pixel value threshold.
[0114] The second acquisition unit is used to acquire a target pixel area in the binary image and determine the outline of the target pixel area as the outline of the power equipment; wherein the target pixel area is an area composed of multiple pixel points with the same pixel value.
[0115] In some embodiments, the generating unit is also used to, for each pixel point in the difference image, determine the pixel value corresponding to white as the target pixel value of the pixel point when the pixel value of the pixel point is not less than the pixel value threshold, and determine the pixel value corresponding to black as the target pixel value of the pixel point when the pixel value of the pixel point is less than the pixel value threshold; based on the target pixel value, generate a binary image corresponding to the difference image.
[0116] Each module in the above image processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0117] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 4As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an image processing method is implemented.
[0118] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0119] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: in the process of the inspection device inspecting the distribution network, multiple images of the distribution network taken by multiple cameras and metadata of the images are acquired in real time; wherein the metadata includes longitude and latitude information of the power equipment in the image, the shooting time point of the image, and the type of camera that took the image; an image display request sent by a user terminal is received, wherein the image display request includes target longitude and latitude information of the target location; based on the longitude and latitude information of the power equipment and the target longitude and latitude information, a target image is determined from multiple images; and the target image and metadata of the target image are displayed on the display screen of the user terminal.
[0120] In one embodiment, the processor determines a target image from multiple images based on the longitude and latitude information of the power device and the target longitude and latitude information when executing a computer program, including: obtaining the distance between each power device in the multiple images and the target position based on the longitude and latitude information of the power device and the target longitude and latitude information; determining the power device with the smallest corresponding distance as the target power device, and determining the image including the target power device as the target image.
[0121] In one embodiment, the method implemented when the processor executes the computer program also includes: preprocessing the visible light images taken by the visible light camera among the multiple images, and extracting various feature information of the power equipment from the preprocessed images; wherein the preprocessing content includes image denoising and edge detection; based on the various feature information, determining the number range of the number of cluster centers, and based on the elbow rule, selecting the number of cluster centers from the number range; based on the number of cluster centers and the various feature information, clustering the power equipment in the visible light image to obtain cluster labels of the power equipment.
[0122] In one embodiment, the method implemented when the processor executes the computer program also includes: acquiring multiple historical infrared images taken by an infrared camera; for multiple pixel points with the same position coordinates in the multiple historical infrared images, integrating the pixel values of the multiple pixel points to obtain integrated pixel values, and generating a background infrared image based on the integrated pixel values; determining an image taken by the infrared camera in the multiple images as the current infrared image, and determining a pixel point in the current infrared image as the current pixel point; for each current pixel point, based on the position coordinates of the current pixel point, determining the background pixel point corresponding to the current pixel point in the background infrared image, and obtaining the pixel value difference between the pixel value of the current pixel point and the pixel value of the background pixel point; generating a difference image based on the pixel value difference, and obtaining the outline of the power equipment based on the difference image.
[0123] In one embodiment, the method of obtaining the outline of the power equipment based on the difference image implemented when the processor executes the computer program includes: obtaining a pixel value threshold based on the pixel value of the pixel point in the difference image; generating a binary image corresponding to the difference image based on the pixel value of the pixel point in the difference image and the pixel value threshold; obtaining a target pixel area in the binary image, and determining the outline of the target pixel area as the outline of the power equipment; wherein the target pixel area is an area composed of multiple pixel points with the same pixel value.
[0124] In one embodiment, the processor generates a binary image corresponding to the difference image based on the pixel values and pixel value thresholds of the pixel points in the difference image when executing a computer program, including: for each pixel point in the difference image, when the pixel value of the pixel point is not less than the pixel value threshold, determining the pixel value corresponding to white as the target pixel value of the pixel point, and when the pixel value of the pixel point is less than the pixel value threshold, determining the pixel value corresponding to black as the target pixel value of the pixel point; based on the target pixel value, generating a binary image corresponding to the difference image.
[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program implements the following steps when executed by a processor: in the process of inspection of the distribution network by the inspection equipment, multiple images of the distribution network taken by multiple cameras and metadata of the images are acquired in real time; wherein the metadata includes the longitude and latitude information of the power equipment in the image, the shooting time point of the image, and the type of camera that took the image; an image display request sent by a user terminal is received, the image display request includes the target longitude and latitude information of the target location; based on the longitude and latitude information of the power equipment and the target longitude and latitude information, a target image is determined from multiple images; and the target image and metadata of the target image are displayed on the display screen of the user terminal.
[0126] In one embodiment, a computer program implemented when executed by a processor determines a target image from multiple images based on the longitude and latitude information of the power device and the target longitude and latitude information, including: obtaining the distance between each power device in the multiple images and the target position based on the longitude and latitude information of the power device and the target longitude and latitude information; determining the power device with the smallest corresponding distance as the target power device, and determining the image including the target power device as the target image.
[0127] In one embodiment, the method implemented when the computer program is executed by the processor also includes: preprocessing the visible light images taken by the visible light camera among the multiple images, and extracting various feature information of the power equipment from the preprocessed images; wherein the preprocessing content includes image denoising and edge detection; based on the various feature information, determining the number range of the number of cluster centers, and based on the elbow rule, selecting the number of cluster centers from the number range; based on the number of cluster centers and the various feature information, clustering the power equipment in the visible light image to obtain cluster labels of the power equipment.
[0128] In one embodiment, the method implemented when the computer program is executed by the processor also includes: acquiring multiple historical infrared images taken by an infrared camera; for multiple pixel points with the same position coordinates in the multiple historical infrared images, integrating the pixel values of the multiple pixel points to obtain integrated pixel values, and generating a background infrared image based on the integrated pixel values; determining an image taken by the infrared camera in the multiple images as the current infrared image, and determining a pixel point in the current infrared image as the current pixel point; for each current pixel point, based on the position coordinates of the current pixel point, determining the background pixel point corresponding to the current pixel point in the background infrared image, and obtaining the pixel value difference between the pixel value of the current pixel point and the pixel value of the background pixel point; generating a difference image based on the pixel value difference, and obtaining the outline of the power equipment based on the difference image.
[0129] In one embodiment, the method implemented by a computer program when executed by a processor to obtain the outline of an electric power device based on a difference image includes: obtaining a pixel value threshold based on the pixel value of a pixel point in the difference image; generating a binary image corresponding to the difference image based on the pixel value of the pixel point in the difference image and the pixel value threshold; obtaining a target pixel area in the binary image, and determining the outline of the target pixel area as the outline of the electric power device; wherein the target pixel area is an area composed of multiple pixel points with the same pixel value.
[0130] In one embodiment, the computer program implemented when executed by a processor generates a binary image corresponding to the difference image based on the pixel values and pixel value thresholds of the pixel points in the difference image, including: for each pixel point in the difference image, when the pixel value of the pixel point is not less than the pixel value threshold, determining the pixel value corresponding to white as the target pixel value of the pixel point, and when the pixel value of the pixel point is less than the pixel value threshold, determining the pixel value corresponding to black as the target pixel value of the pixel point; based on the target pixel value, generating a binary image corresponding to the difference image.
[0131] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: in the process of inspection of the distribution network by inspection equipment, multiple images of the distribution network taken by multiple cameras and metadata of the images are acquired in real time; wherein the metadata includes longitude and latitude information of the power equipment in the image, the shooting time point of the image, and the type of camera that took the image; receiving an image display request sent by a user terminal, the image display request includes target longitude and latitude information of a target location; determining a target image from multiple images based on the longitude and latitude information of the power equipment and the target longitude and latitude information; and displaying the target image and metadata of the target image on a display screen of the user terminal.
[0132] In one embodiment, a computer program implemented when executed by a processor determines a target image from multiple images based on the longitude and latitude information of the power device and the target longitude and latitude information, including: obtaining the distance between each power device in the multiple images and the target position based on the longitude and latitude information of the power device and the target longitude and latitude information; determining the power device with the smallest corresponding distance as the target power device, and determining the image including the target power device as the target image.
[0133] In one embodiment, the method implemented when the computer program is executed by the processor also includes: preprocessing the visible light images taken by the visible light camera among the multiple images, and extracting various feature information of the power equipment from the preprocessed images; wherein the preprocessing content includes image denoising and edge detection; based on the various feature information, determining the number range of the number of cluster centers, and based on the elbow rule, selecting the number of cluster centers from the number range; based on the number of cluster centers and the various feature information, clustering the power equipment in the visible light image to obtain cluster labels of the power equipment.
[0134] In one embodiment, the method implemented when the computer program is executed by the processor also includes: acquiring multiple historical infrared images taken by an infrared camera; for multiple pixel points with the same position coordinates in the multiple historical infrared images, integrating the pixel values of the multiple pixel points to obtain integrated pixel values, and generating a background infrared image based on the integrated pixel values; determining an image taken by the infrared camera in the multiple images as the current infrared image, and determining a pixel point in the current infrared image as the current pixel point; for each current pixel point, based on the position coordinates of the current pixel point, determining the background pixel point corresponding to the current pixel point in the background infrared image, and obtaining the pixel value difference between the pixel value of the current pixel point and the pixel value of the background pixel point; generating a difference image based on the pixel value difference, and obtaining the outline of the power equipment based on the difference image.
[0135] In one embodiment, the method implemented by a computer program when executed by a processor to obtain the outline of an electric power device based on a difference image includes: obtaining a pixel value threshold based on the pixel value of a pixel point in the difference image; generating a binary image corresponding to the difference image based on the pixel value of the pixel point in the difference image and the pixel value threshold; obtaining a target pixel area in the binary image, and determining the outline of the target pixel area as the outline of the electric power device; wherein the target pixel area is an area composed of multiple pixel points with the same pixel value.
[0136] In one embodiment, the computer program implemented when executed by a processor generates a binary image corresponding to the difference image based on the pixel values and pixel value thresholds of the pixel points in the difference image, including: for each pixel point in the difference image, when the pixel value of the pixel point is not less than the pixel value threshold, determining the pixel value corresponding to white as the target pixel value of the pixel point, and when the pixel value of the pixel point is less than the pixel value threshold, determining the pixel value corresponding to black as the target pixel value of the pixel point; based on the target pixel value, generating a binary image corresponding to the difference image.
[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0138] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0139] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0140] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An image processing method, characterized in that: The method comprises: In the process of the inspection equipment inspecting the distribution network, multiple images of the distribution network taken by multiple cameras and metadata of the images are obtained in real time; wherein the metadata includes the latitude and longitude information of the power equipment in the image, the shooting time of the image, and the type of the camera that took the image; receiving an image display request sent by a user terminal, wherein the image display request includes target latitude and longitude information of a target location; Determining a target image from the multiple images based on the latitude and longitude information of the power equipment and the latitude and longitude information of the target; The target image and metadata of the target image are displayed on a display screen of the user terminal.
2. The method according to claim 1, characterized in that The determining the target image from the multiple images based on the latitude and longitude information of the power equipment and the latitude and longitude information of the target includes: Based on the longitude and latitude information of the power device and the longitude and latitude information of the target, obtaining the distance between each power device in the plurality of images and the target location; The electric device with the smallest corresponding distance is determined as the target electric device, and the image including the target electric device is determined as the target image.
3. The method according to claim 1, characterized in that The method further comprises: For the visible light images taken by the visible light camera among the multiple images, preprocessing the visible light images, and extracting various feature information of the electric power equipment from the preprocessed images; wherein the preprocessing includes image denoising and edge detection; Based on the multiple feature information, determine a quantity range in which the number of cluster centers is located, and select the number of cluster centers from the quantity range based on the elbow rule; Based on the number of cluster centers and the multiple feature information, the power devices in the visible light image are clustered to obtain cluster labels of the power devices.
4. The method according to claim 1, characterized in that The method further comprises: Acquire multiple historical infrared images taken by infrared cameras; For a plurality of pixel points having the same position coordinates in the plurality of historical infrared images, pixel values of the plurality of pixel points are integrated to obtain integrated pixel values, and a background infrared image is generated based on the integrated pixel values; Determine an image captured by the infrared camera among the multiple images as a current infrared image, and determine a pixel point in the current infrared image as a current pixel point; For each current pixel, based on the position coordinates of the current pixel, determine the background pixel corresponding to the current pixel in the background infrared image, and obtain the pixel value difference between the pixel value of the current pixel and the pixel value of the background pixel; A difference image is generated based on the pixel value difference, and a contour of the electric power equipment is acquired based on the difference image.
5. The method according to claim 4, characterized in that The step of acquiring the profile of the electric power equipment based on the difference image comprises: Obtaining a pixel value threshold based on the pixel value of the pixel point in the difference image; Based on the pixel values of the pixels in the difference image and the pixel value threshold, generating a binary image corresponding to the difference image; A target pixel region in the binary image is acquired, and the outline of the target pixel region is determined as the outline of the electric power equipment; wherein the target pixel region is a region composed of a plurality of pixel points having the same pixel value.
6. The method according to claim 5, characterized in that The step of generating a binary image corresponding to the difference image based on the pixel values of the pixels in the difference image and the pixel value threshold comprises: For each pixel in the difference image, when the pixel value of the pixel is not less than the pixel value threshold, the pixel value corresponding to white is determined as the target pixel value of the pixel; when the pixel value of the pixel is less than the pixel value threshold, the pixel value corresponding to black is determined as the target pixel value of the pixel; Based on the target pixel value, a binary image corresponding to the difference image is generated.
7. An image processing device, characterized in that: The device comprises: A first acquisition module is used to acquire multiple images of the distribution network taken by multiple cameras and metadata of the images in real time during the process of the inspection equipment inspecting the distribution network; wherein the metadata includes the latitude and longitude information of the power equipment in the image, the shooting time of the image, and the type of the camera that took the image; A receiving module, configured to receive an image display request sent by a user terminal, wherein the image display request includes target latitude and longitude information of a target location; A first determining module, configured to determine a target image from the plurality of images based on the longitude and latitude information of the power equipment and the longitude and latitude information of the target; The display module is used to display the target image and metadata of the target image on a display screen of the user terminal.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, 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 6 are implemented.
10. A computer program product, comprising 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 6 are implemented.
Citation Information
Patent Citations
Unmanned aerial vehicle routing inspection image retrieval system and method based on electric transmission line and GIS
CN103839194A
Method and device for sorting inspection images of unmanned aerial vehicle equipment and computer equipment
CN115062178A
Multi-view infrared human body image gait recognition method based on multi-teacher mixed distillation algorithm
CN116824696A
Monitoring and warning method and device for power distribution network, storage medium and product
CN119727133A
Infrared image processing method, apparatus and device, and storage medium
WO2022000974A1