Image processing method and device
By obtaining feature point sets and feature vectors, calculating the interval length and similarity of the target objects, and using traditional image processing methods, the efficiency and accuracy issues of glass insulator self-explosion detection are solved, and rapid identification of insulator defects is achieved.
Patent Information
- Application Number
- CN202011373686.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2040-11-30
AI Technical Summary
In the existing technology, glass insulators deteriorate under the combined effects of long-term mechanical forces and power plants, leading to self-explosion, which may cause line tripping failures and affect the safe and stable operation of transmission lines. There is a lack of effective automatic detection methods.
By obtaining the feature point set and feature vector in the image to be processed, calculating the interval length of the target object, and using the similarity of the feature points for segmentation and matching, the defective area in the target object is identified. Traditional image processing methods are used instead of deep learning, saving training resources and labor costs.
It achieves fast and accurate detection of glass insulators, improves detection efficiency, avoids deep learning's dependence on large amounts of sample data, and ensures high efficiency and accuracy of detection.
Smart Images

Figure CN114581357B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to image processing methods. One or more embodiments of this specification also relate to an image processing apparatus, a computing device, and a computer-readable storage medium. Background Art
[0002] On power transmission towers, the long-term mechanical forces and the combined effects of power plants can cause glass insulator degradation. When degraded insulators are subjected to strong external impacts, the balance between the outer compressive stress and the internal tensile stress is disrupted. For example, the release of the internal tensile stress can cause the glass insulator to "explode." This spontaneous explosion can potentially cause a line trip, impacting the safe and stable operation of the transmission line.
[0003] Therefore, there is an urgent need to provide an image processing method that can automatically detect damaged insulators. Summary of the Invention
[0004] In view of this, the embodiments of this specification provide an image processing method. One or more embodiments of this specification also relate to an image processing apparatus, a computing device, and a computer-readable storage medium to address technical deficiencies in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a method for processing an image is provided, including:
[0006] Obtaining a set of feature points of a target object in a to-be-processed image, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the to-be-processed image;
[0007] Determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed;
[0008] Segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0009] A target sub-object in the target object is determined based on the similarities between the adjacent sub-objects.
[0010] According to a second aspect of the embodiments of this specification, a method for processing an image is provided, including:
[0011] Displaying a picture input interface for the user based on a user's call request, and receiving a picture to be processed sent by the user based on the picture input interface;
[0012] Obtaining a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed;
[0013] Determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed;
[0014] Segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0015] A target sub-object in the target object is determined based on the similarities between the adjacent sub-objects.
[0016] According to a third aspect of the embodiments of this specification, a method for processing an image is provided, including:
[0017] Receive a call request sent by a user, wherein the call request carries a picture to be processed;
[0018] Obtaining a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed;
[0019] Determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed;
[0020] Segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0021] A target sub-object in the target object is determined based on the similarities between the adjacent sub-objects.
[0022] According to a fourth aspect of the embodiments of this specification, there is provided an image processing apparatus, including:
[0023] A first acquisition module is configured to acquire a set of feature points of a target object in a to-be-processed image, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the to-be-processed image;
[0024] A first determining module is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed;
[0025] a first segmentation module configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0026] The second determining module is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0027] According to a fifth aspect of the embodiments of this specification, there is provided an image processing apparatus, including:
[0028] A picture receiving module is configured to display a picture input interface for the user based on a user's call request, and receive a picture to be processed sent by the user based on the picture input interface;
[0029] A second acquisition module is configured to acquire a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed;
[0030] A second determining module is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed;
[0031] a second segmentation module configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0032] The third determining module is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0033] According to a sixth aspect of the embodiments of this specification, there is provided an image processing apparatus, including:
[0034] A request receiving module is configured to receive a call request sent by a user, wherein the call request carries a picture to be processed;
[0035] A third acquisition module is configured to acquire a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed;
[0036] A fourth determining module is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed;
[0037] a third segmentation module, configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0038] The fifth determining module is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0039] According to a seventh aspect of the embodiments of this specification, a computing device is provided, including:
[0040] memory and processor;
[0041] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the instructions are executed by the processor, the steps of the image processing method are implemented.
[0042] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the image processing method are implemented.
[0043] One embodiment of the present specification implements an image processing method and apparatus, wherein the image processing method includes obtaining a set of feature points of a target object in an image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed; determining an interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed; segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; and determining a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0044] Specifically, the image processing method divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, which greatly improves the detection efficiency of the target sub-objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a picture of an insulator including a self-exploding insulator umbrella provided in one embodiment of this specification;
[0046] Figure 2 This is an example diagram of a specific application scenario of an image processing method provided by an embodiment of this specification;
[0047] Figure 3 This is a flowchart of a first image processing method provided by an embodiment of this specification;
[0048] Figure 4is a schematic diagram of feature points in a to-be-processed image in an image processing method provided in one embodiment of this specification;
[0049] Figure 5 This is a schematic diagram of feature descriptors corresponding to feature points in a to-be-processed image in an image processing method provided by one embodiment of this specification;
[0050] Figure 6 This is a schematic diagram of a picture to be processed and a target object in the picture to be processed after rotation in a picture processing method provided by one embodiment of this specification;
[0051] Figure 7 A vector diagram of a picture to be processed and a target object in the picture to be processed after rotation in a picture processing method provided by one embodiment of this specification;
[0052] Figure 8 This is a schematic diagram of a sub-object determined by feature points in a target object in an image processing method provided by one embodiment of this specification;
[0053] Figure 9 is a vector diagram of a sub-object in a target object in an image processing method provided by an embodiment of this specification;
[0054] Figure 10 This is an image processing method provided by an embodiment of this specification for use in the detection of damaged insulators in the power industry;
[0055] Figure 11 is a flowchart of a second image processing method provided by an embodiment of this specification;
[0056] Figure 12 This is a flowchart of a third image processing method provided by an embodiment of this specification;
[0057] Figure 13 This is a schematic diagram of the structure of a first image processing device provided by an embodiment of this specification;
[0058] Figure 14 This is a schematic diagram of the structure of a second image processing device provided by an embodiment of this specification;
[0059] Figure 15 This is a schematic diagram of the structure of a third image processing device provided by an embodiment of this specification;
[0060] Figure 16 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0061] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0062] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0063] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0064] First, the terms involved in one or more embodiments of this specification are explained.
[0065] Machine Learning: Machine learning is a multidisciplinary field that has emerged over the past 20 years, encompassing a wide range of disciplines, including probability theory, statistics, approximation theory, convex analysis, and computational complexity theory. Machine learning theory primarily involves the design and analysis of algorithms that enable computers to "learn" automatically. Machine learning algorithms can be further categorized into supervised learning, semi-supervised learning, weakly supervised learning, and unsupervised learning, depending on whether supervised label information is included during network training.
[0066] Computer vision: A branch of machine learning, computer vision studies how to teach machines to "see." Specifically, it involves using cameras and computers to replace the human eye in identifying, tracking, and measuring objects. As a scientific discipline, computer vision studies related theories and technologies, aiming to build artificial intelligence systems that can extract "information" from images or multidimensional data.
[0067] Feature point: A term used in computer vision, generally refers to a local area in the image with significant features, usually an edge point, a corner point, a dark spot in a bright area, or a bright spot in a dark area.
[0068] Insulators: Insulators are specialized insulating components that play a vital role in overhead transmission lines. Initially used on utility poles, they gradually evolved into high-voltage power lines. A series of disc-shaped insulators (also called insulator umbrellas) are hung on one end of a tower to increase creepage distance. These insulators are typically made of glass or ceramic and are called insulators.
[0069] SIFT: Scale-invariant feature transform (SIFT) is a description used in the field of image processing. This description has scale invariance and can detect key points in the image. It is a local feature descriptor.
[0070] SURF: Speeded Up Robust Features is a robust local feature point detection and description algorithm.
[0071] SuperPoint, a feature model based on convolutional neural networks: a feature point detection and descriptor extraction method based on self-supervised training.
[0072] In practical applications, the image processing method provided in the embodiments of this specification is applied to the power industry. For example, in the inspection images of transmission towers taken by drones, the insulators on the transmission towers are automatically detected through visual algorithms to detect insulators in the transmission towers that have exploded or been damaged by other means. However, the image processing method provided in the embodiments of this specification is not limited to application in the power industry, but can also be applied to any scenario where target objects with repetitive features in images are processed, such as scenarios for defect detection of radiators, springs, high-voltage coils, overlapping flanges, etc.
[0073] For ease of understanding, the embodiments of this specification are described in detail using the image processing method as applied to the power industry, but this does not affect the applicability of the image processing method to other application scenarios.
[0074] Taking the application of image processing methods in the power industry as an example, the image processing method is used to detect insulators on transmission towers in the power industry. Figure 1 , Figure 1 A picture of an insulator including a self-exploding insulator umbrella in one embodiment of this specification is shown. Figure 1 The area circled in the middle is the location of the insulator umbrella that has exploded. The image processing method provided in the embodiment of this specification is used to Figure 1 The self-exploding insulator umbrella in the insulator picture can be detected quickly and accurately.
[0075] This specification provides an image processing method. One or more embodiments of this specification also relate to an image processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments.
[0076] See also Figure 2 , Figure 2 An example diagram showing a specific application scenario of an image processing method provided by an embodiment of this specification is shown.
[0077] Figure 2 The application scenario includes a terminal 202 and a server 204. Specifically, the user sends a picture a containing an insulator to the server 204 through the terminal 202. After receiving the picture a, the server 204 first uses a feature point algorithm to detect the feature points of the insulator in the picture a, the feature descriptors (i.e., feature vectors) corresponding to each feature point, and the coordinates of each feature point in the picture a. For the multiple feature points detected in the picture a, based on the feature descriptors corresponding to each feature point, the feature distance between each two feature points is calculated, and then the two feature points that meet the feature distance threshold are used as feature point matching pairs, and the offsets of the feature point matching pairs in the x and y directions of the coordinate axes are recorded. Based on the offsets of all feature point matching pairs in the x and y directions, the offset algorithm is used to calculate the main offset directions of all feature points, and then the picture a and all feature point matching pairs are rotated and corrected according to the main offset directions, so that the insulators in the picture a are horizontal.
[0078] Then, a double-string judgment algorithm is used to determine whether there are two strings of insulators in the image a after rotation correction. If so, the double strings of insulators are separated, and then the fixed interval (or period length) between each insulator umbrella in each single string of insulators is calculated based on the specific coordinate position of the single string of insulators. If not, the fixed interval between each insulator umbrella in the single string of insulators is calculated based on the specific coordinate position of the single string of insulators. Among them, the double-string judgment algorithm and the separation of the double-string insulators can be achieved based on the offset of the feature point matching pair.
[0079] After obtaining the fixed interval between each insulator umbrella in a single string of insulators, the image a is cut into blocks in the horizontal direction based on the fixed interval, and the similarity of each local area after cutting is calculated with the local areas with the same fixed interval on the left and right adjacent areas, and the insulators in the image a are detected. In actual applications, the similarity between each area block of a normal insulator and the surrounding adjacent area blocks is very high, while the similarity between the damaged area block and the surrounding area blocks is very low. In this case, a similarity threshold can be set in advance. When the average similarity between each local area after cutting and the local areas with the same fixed interval on the left and right adjacent areas is less than the similarity threshold, the local area block can be regarded as the final result of the self-explosion damage of the insulator, and then the local area block is marked with a special format (highlighted or circled) and returned to the terminal 202.
[0080] The image processing method provided in the embodiments of this specification is applied to the detection of damaged insulators in the power industry. It uses a traditional image processing method based on feature matching and utilizes the prior knowledge of the repeatability and periodicity of the features of the insulators. It does not use deep learning technology, so there is no need to rely on collecting a large number of sample images containing defective insulators for deep learning model training. While saving labor costs and training resources, the image processing method provided in the embodiments of this specification can also achieve the effect of fast and accurate detection of defective insulators.
[0081] See also Figure 3 , Figure 3 A flowchart of a first image processing method provided by an embodiment of this specification is shown, which specifically includes the following steps.
[0082] Step 302: Obtain a set of feature points of a target object in a to-be-processed image, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the to-be-processed image.
[0083] Among them, the image to be processed can be an image containing any target object with repetitive and periodic characteristics. For example, if the target object is an insulator, the image to be processed is an image containing an insulator; or if the target object is a bicycle chain, the image to be processed is an image containing a bicycle chain, etc. In practical applications, as long as the target object has repetitiveness and periodicity, the image processing method provided in the embodiments of this specification can be applied, and the repetitiveness and periodicity of the target object can be simply understood as the target object can be composed of multiple identical sub-objects with the same period length, or multiple target objects with the same period length form the final target object, etc.
[0084] In practical applications, the image processing method is applied to insulator self-explosion detection, wherein the target object includes an insulator; or
[0085] The image processing method is applied to radiator damage detection, wherein the target object includes a radiator.
[0086] Specifically, obtaining a feature point set of a target object in a to-be-processed image, feature vectors of feature points in the feature point set, and position coordinates of the feature points in the to-be-processed image includes:
[0087] A picture to be processed containing at least one target object is received, and a feature point set of each target object in the picture to be processed, a feature vector of the feature point in the feature point set, and the position coordinates of the feature point in the picture to be processed are obtained based on a feature detection algorithm.
[0088] In actual applications, a picture to be processed contains at least one target object, and may also contain two or more target objects. For ease of understanding, the picture processing method provided in the embodiments of this specification is only described in detail based on the picture to be processed containing one target object and two target objects.
[0089] The feature detection algorithm includes but is not limited to manual features SIFT, SURF or convolutional neural network-based feature model SuperPoint.
[0090] Taking the target object as an insulator as an example, a picture to be processed containing at least one target object is received, and a feature point set of each target object in the picture to be processed, a feature vector of the feature point in the feature point set, and the position coordinates of the feature point in the picture to be processed are obtained based on a feature detection algorithm; it can be understood as receiving a picture to be processed containing at least one insulator, and detecting the feature points of each insulator in the picture to be processed, the feature descriptor (i.e., the feature vector) corresponding to each feature point, and the coordinates of each feature point in the picture to be processed based on manual features SIFT, SURF, or a feature model SuperPoint based on a convolutional neural network.
[0091] For example, each feature point P_i is recorded as (x_i, y_i, f_i), where x and y are the coordinates of the feature point in the image a, and f is a floating-point vector of fixed dimension (usually 128 or 256 dimensions), that is, the feature descriptor.
[0092] See also Figure 4 , Figure 4 A schematic diagram showing feature points in a picture to be processed in a picture processing method provided by an embodiment of this specification is shown.
[0093] Depend on Figure 4 It can be seen that the image to be processed includes two insulators, and each feature point of each insulator in the image to be processed is obtained by the feature detection algorithm.
[0094] See also Figure 5 , Figure 5 A schematic diagram showing feature descriptors corresponding to feature points in a to-be-processed image in an image processing method provided by one embodiment of this specification is shown.
[0095] correspond Figure 4 , Figure 5 The feature points of the two insulators in the image to be processed are displayed in the form of feature vectors, and the image to be processed is annotated with coordinate axes. The position coordinates of each feature point in the image to be processed can be recorded using the xy axis of the coordinate axis.
[0096] In an embodiment of the present specification, after receiving a picture to be processed containing at least one target object, the feature points of each target object in the picture to be processed, the feature vectors corresponding to the feature points, and the position coordinates of each feature point in the picture to be processed are detected based on a preset feature detection method, so as to facilitate the subsequent use of feature matching methods to accurately identify the defective parts of the target object in the picture to be processed.
[0097] Step 304: Determine the interval length of the sub-objects in the target object based on the position coordinates of the feature points in the image to be processed.
[0098] The image to be processed contains at least one target object, each target object includes at least two sub-objects, and under normal circumstances, the interval length (ie, period length) between every two sub-objects is the same.
[0099] Continuing with the above example, if the image to be processed contains an insulator, and the insulator includes multiple insulator umbrellas, normally, the intervals between every two insulator umbrellas are the same.
[0100] Specifically, the position coordinates of each feature point in the image to be processed are obtained, and then the interval length of the sub-objects in the target object is calculated based on the position coordinates.
[0101] In actual applications, since the images to be processed are taken by drones or manually, there are no strict restrictions on shooting angles during the shooting process. Therefore, the target object in the image to be processed may be tilted. In order to facilitate subsequent processing of the target object in the image to be processed, it is necessary to perform rotation correction on the image to be processed and the angle of the target object in the image to be processed. The specific implementation method is as follows:
[0102] Before determining the interval length of the sub-objects in the target object based on the position coordinates of the feature points in the image to be processed, the method further includes:
[0103] Obtaining feature point matching pairs in the feature point set based on feature vector calculation of the feature points;
[0104] An offset angle of the feature point set is determined according to an offset of the feature point matching pair, and rotation correction is performed on the image to be processed and a target object in the image to be processed according to the offset angle.
[0105] The offset can be understood as the offset of the feature point matching pair in the x and y directions of the coordinate axis.
[0106] In practical applications, before performing rotation correction on the image to be processed and the target object in the image to be processed, it is necessary to first obtain feature point matching pairs in the feature point set based on the feature vectors of the feature points. Specifically, obtaining feature point matching pairs in the feature point set based on the feature vectors of the feature points includes:
[0107] Calculating a feature distance between every two adjacent feature points in the feature point set based on the feature vectors of the feature points;
[0108] Two adjacent feature points whose feature distance is greater than or equal to a preset distance threshold are regarded as a feature point matching pair.
[0109] Among them, the setting of the preset distance threshold can be specifically set according to different feature detection algorithms. For example, if the feature detection algorithm is the manual feature SIFT, then the preset distance threshold can be set to 5.0, etc. The preset distance threshold can be set according to the specific application and is not limited here.
[0110] Continuing with the above example, if N feature points P_i~P_j are detected in the image to be processed, the feature distance between each two feature points (for example, the Euclidean distance between feature vectors) can be calculated, and a pair of feature matching points (P_i and P_j) that meet the preset distance threshold (i.e., the feature distance threshold) is recorded as a valid feature point matching pair, and the offset of the feature point matching pair in the x and y directions of the coordinate axis (x_i-x_j, y_i-y_j) is recorded.
[0111] In the embodiments of the present specification, based on the feature distance between each pair of feature points, valid feature point matching pairs in the feature point set are obtained, and then the main offset directions of all feature points can be calculated based on the offsets of the feature point matching in the x and y directions of the coordinate axis to achieve accurate angle rotation correction of the image to be processed and the target object in the image to be processed.
[0112] In practical applications, after obtaining the feature point matching pairs, the offset of each feature point matching pair in the x and y directions of the coordinate axis is obtained, and then the offset of all feature point matching pairs is calculated using the RANSAC Regressor algorithm (random consistency sampling regression algorithm) to calculate the main direction of all feature point matching pairs (that is, the offset angle of the feature point set) and the feature point matching pairs that meet the main direction. These feature point matching pairs are generally intra-string matches parallel to the length direction of the target object. After having the offset angle of the main direction, the image to be processed can be rotationally corrected, so that the target object in the image to be processed can be in a horizontal state, which is convenient for subsequent processing of the target object; at the same time, the xy offset of each feature point matching pair is also rotationally corrected.
[0113] See also Figure 6 , Figure 6 A schematic diagram showing a rotated image to be processed and a target object in the image to be processed in an image processing method provided by one embodiment of this specification is shown.
[0114] Using the above example, Figure 6 There are still two insulators in the image. By matching feature points and calculating the main direction, the rotation correction of the image to be processed and the two insulators in the image to be processed is achieved, which is convenient for subsequent processing.
[0115] See also Figure 7 , Figure 7 A schematic diagram of a vector of a picture to be processed and a target object in the picture to be processed after rotation in a picture processing method provided by one embodiment of this specification is shown.
[0116] and Figure 6 correspond, Figure 7 The vector diagram of two insulators in the processed image after rotation correction is shown in FIG.
[0117] In the embodiment of this specification, the offset of all feature point matching pairs is calculated using the RANSAC Regressor algorithm to obtain the main direction of the offset data, and the image to be processed is rotationally corrected using the main direction so that the target object in the image to be processed is horizontal, which facilitates subsequent processing of the target object in the image to be processed, saves processing time, and improves overall processing efficiency.
[0118] In specific implementation, since there are usually one or two target objects in the image to be processed in actual application scenarios, after correcting the image to be processed and the target object in the image to be processed, it is necessary to determine whether there are two target objects in the image to be processed to avoid affecting the subsequent defect judgment of the target object. The specific implementation method is as follows:
[0119] Before determining the interval length of the sub-objects in the target object based on the position coordinates of the feature points in the image to be processed, the method further includes:
[0120] Obtaining offsets of all feature point matching pairs in the feature point set, and determining that the image to be processed includes a target object when the number of feature point matching pairs whose offsets are equal to a preset offset threshold is greater than a first number threshold;
[0121] When the number of feature point matching pairs whose offsets are greater than and less than the preset offset threshold is greater than a first number threshold, it is determined that the image to be processed includes at least two target objects.
[0122] Among them, the preset offset threshold can be 0, and the first quantity threshold can be set according to actual application. This specification does not impose any restrictions on this. For example, when the number of all feature point matching pairs is 100, the first quantity threshold can be set to 90, 95, etc.
[0123] Specifically, after rotation correction of the image to be processed and the feature point matching pairs, if there is only one target object in the image to be processed, the offset of most feature point matching pairs in the y-direction of the coordinate axis is close to 0. If there are two target objects in the image to be processed, there will be most feature point matching pairs with offsets greater than 0 and less than 0 in the y-direction of the coordinate axis. Therefore, the two target objects need to be separated into two separate target objects to facilitate subsequent processing.
[0124] Continuing with the above example, since the image being processed often contains both single-string and double-string insulators in real-world scenarios, it's necessary to determine whether the insulator in the image is double-string, otherwise it will affect subsequent insulator defect detection. Therefore, after rotation correction is performed on the image being processed and the feature point matching pairs, if the image being processed only contains single-string insulators, the offset in the y-axis direction of most feature point matching pairs will be close to zero. However, if the image being processed contains double-string insulators, some feature point matching pairs will have offsets greater than or less than zero in the y-axis direction. In this case, it's necessary to separate the double-string regions of the double-string insulators.
[0125] In practical applications, after determining that the image to be processed includes at least two target objects, the method further includes:
[0126] A feature point matching pair of each target object in the at least two target objects is obtained, and the at least two target objects are segmented based on an offset of the feature point matching pair of each target object.
[0127] Specifically, when segmenting two target objects, segmentation of the two target objects is achieved based on the offset of each feature point matching pair in the y direction of the coordinate axis.
[0128] Continuing with the above example, for a feature point matching pair with an offset greater than 0 in the y-direction of the coordinate axis, it is generally a match between the upper string insulator and the lower string insulator, so the first point of the feature point matching pair is on the upper string insulator and the second point is on the lower string insulator; similarly, for a feature point matching pair with an offset less than 0 in the y-direction of the coordinate axis, it is generally a match between the lower string insulator and the upper string insulator, so the first point of the feature point matching pair is on the lower string insulator and the second point is on the upper string insulator. Through this method, the regions of the upper and lower strings of insulators can be located, and the segmentation of the two strings of insulators can be achieved through the regional positioning of the upper and lower strings of insulators.
[0129] See for example Figure 7 , Figure 7 It is a vector diagram of feature point matching pairs in the image to be processed after rotation correction. Figure 7 There are three lines in the y direction of the coordinate axis. The offset of one line in the y direction is 0, that is, horizontal matching within the string. The offset of one line in the y direction is greater than 0, that is, matching between the upper string insulator and the lower string insulator. The offset of one line in the y direction is less than 0, that is, matching between the lower string insulator and the upper string insulator. Through the offset of all feature point matching pairs in this y direction, it is possible to find whether the two points of each feature point matching pair are in the same string, or the starting point is in the lower string and the ending point is in the upper string; or the ending point is in the lower string and the starting point is in the upper string. In this way, the following can be obtained: Figure 6 The area of each of the two insulators in the image to be processed.
[0130] In the embodiment of the present specification, in order to avoid affecting the subsequent judgment result of the defective area in the target object when the two target objects are not separated, the double number judgment and separation of the target objects are performed after processing the image to be processed and the target objects in the image to be processed, so that the defective area in each target object can be quickly and accurately obtained by processing the separated single target object.
[0131] Specifically, determining the interval length of sub-objects in the target object based on the position coordinates of the feature point in the image to be processed includes:
[0132] Based on the position coordinates of the rotationally corrected feature point matching pairs in the rotationally corrected image to be processed, the interval length of the sub-objects in the target object is determined.
[0133] In specific implementation, after the target objects in the processed image are segmented, each target object is processed separately to obtain the defect area in each target object. The following is a detailed explanation of the determination of the defective sub-object area in a target object.
[0134] After obtaining the specific location area of each target object, determine the feature point matching pairs within the area, as well as the position coordinates of these feature point matching pairs in the image to be processed after rotation correction. Based on the position coordinates, determine the offset of the feature point matching pairs within the area of each target object in the x-direction of the coordinate axis, and then cluster based on the offset. The absolute value of the offset of the two nearest cluster centers is the period length of the target object in the x-direction of the coordinate axis, that is, the fixed interval length of the sub-objects in the target object.
[0135] See also Figure 8 , Figure 8 A schematic diagram showing sub-objects determined by feature points in a target object in an image processing method provided by an embodiment of this specification is shown.
[0136] Figure 8 The target object in is the insulator, Figure 8 Two insulators are shown in the figure. The offset of the feature point matching pairs in each insulator in the x-direction of the coordinate axis is clustered to obtain the period length of the insulator umbrella in the x-direction in each insulator.
[0137] See also Figure 9 , Figure 9 A vector diagram of a sub-object in a target object in an image processing method provided by an embodiment of this specification is shown.
[0138] pass Figure 9 It can be seen that the vector display form of the insulator umbrella in the x direction of the coordinate axis.
[0139] In the embodiments of the present specification, by clustering the offsets of the feature points inside the target object in the x-direction of the coordinate axis, the interval length of the sub-objects in the target object in the x-direction is obtained. The sub-objects in the target object can then be segmented based on the interval length, and the defective sub-objects can be accurately judged by the similarity of each segmented area.
[0140] Step 306: Segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points.
[0141] In practical applications, after obtaining the interval length between sub-objects in the target object, the target object is segmented in the horizontal direction, and then the similarity between adjacent sub-objects in the target object is calculated based on the feature vectors of the feature points on the segmented sub-objects.
[0142] Specifically, calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points can be understood as calculating the similarity between two adjacent sub-objects after segmentation in the target object based on the feature vectors of the feature points in each sub-object after segmentation.
[0143] Step 308: Determine a target sub-object in the target object based on the similarities between the adjacent sub-objects.
[0144] Specifically, there are two situations in which the target sub-object in the target object is determined based on the similarity between adjacent sub-objects. In one situation, the sub-object after segmentation has two adjacent sub-objects, and in the other situation, the sub-object after segmentation has only one adjacent sub-object. These two situations are described in detail below.
[0145] In a specific implementation, determining the target sub-object in the target object based on the similarity between the adjacent sub-objects includes:
[0146] When there are two adjacent sub-objects of the segmented sub-object, obtaining a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively;
[0147] When the average of the first similarity and the second similarity is less than or equal to a preset similarity threshold, the segmented sub-object is determined as a target sub-object in the target object.
[0148] That is, if there are two adjacent sub-objects with the same period length on the left and right of the segmented sub-object, then it is necessary to obtain the first similarity between the segmented sub-object and the adjacent sub-object on the left; the second similarity between the segmented sub-object and the adjacent sub-object on the right; and then calculate the average of these two similarities. If the average of these two similarities is less than or equal to the preset similarity threshold, the segmented sub-object is determined as the target sub-object in the target object, that is, the sub-object with defects.
[0149] In practical applications, the sub-objects of the target object are segmented in the horizontal direction, and the similarity of each local area after segmentation is calculated with the local areas of the same period length adjacent to the left and right. The similarity is measured by the pixel similarity of the local area and the HoG feature similarity (Histogram of Oriented Gradient (HOG)). Under normal circumstances, the similarity between each local area and the surrounding adjacent local areas is very high, while the similarity between the damaged local area and the surrounding local areas is very low. Therefore, a threshold can be set in advance. When the similarity is lower than the preset threshold, the local area can be output as a damaged area.
[0150] In the embodiment of this specification, when there are two adjacent sub-objects on the left and right of the segmented sub-object, the average similarity between the two adjacent sub-objects on the left and right can be used to determine whether the segmented sub-object is a damaged sub-object to ensure the accuracy of obtaining the target sub-object.
[0151] In another embodiment of the present specification, determining the target sub-object in the target object based on the similarity between the adjacent sub-objects includes:
[0152] When there is only one adjacent sub-object of the segmented sub-object, obtaining a first similarity between the segmented sub-object and the adjacent sub-object;
[0153] When the first similarity is less than or equal to a preset similarity threshold, obtaining a second similarity between the adjacent sub-object and another adjacent sub-object of the adjacent sub-object;
[0154] When the second similarity is less than or equal to a preset similarity threshold, the adjacent sub-object is determined as a target sub-object in the target object.
[0155] Specifically, when the adjacent sub-object of the segmented sub-object is a left adjacent sub-object or a right adjacent sub-object, a first similarity between the segmented sub-object and the adjacent sub-object is obtained. When the first similarity is less than a preset similarity threshold, it may not be possible to accurately determine whether the segmented sub-object is the target sub-object or the adjacent sub-object is the target sub-object. In this case, another adjacent sub-object of the adjacent sub-object is obtained, and a second similarity between the adjacent sub-object and the other adjacent sub-object is calculated. If the second similarity is still less than or equal to the preset similarity threshold, it means that the adjacent sub-object is the target sub-object; wherein the preset similarity threshold can be set according to actual application and is not limited here.
[0156] In the embodiment of this specification, when there is only one adjacent sub-object of a segmented sub-object, the target sub-object is determined through multiple similarity comparisons to ensure the accuracy of the target sub-object.
[0157] In addition, after obtaining the second similarity between the adjacent sub-object and another adjacent sub-object of the adjacent sub-object, the method further includes:
[0158] When the second similarity is greater than a preset similarity threshold, the segmented sub-object is determined as a target sub-object in the target object.
[0159] In practical applications, if the second similarity between the adjacent sub-object and the other adjacent sub-object is greater than a preset similarity threshold, it can be determined that the adjacent sub-object is a normal sub-object, and the segmented sub-object can be processed as a target sub-object.
[0160] In a specific implementation, if the similarities of all the segmented target sub-objects are greater than a preset similarity threshold, it can be indicated that there is no defective target sub-object in the target object.
[0161] The image processing method provided in the embodiments of this specification divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, greatly improving the detection efficiency of the target sub-objects.
[0162] See also Figure 10 , Figure 10 An image processing method provided by an embodiment of this specification and applied to a scene of detecting damaged insulators in the power industry is shown, which specifically includes the following steps.
[0163] Step 1002: Receive a picture containing an insulator.
[0164] Specifically, the picture can be taken by a drone inspection or by other means, and the picture can include damaged insulators or all intact insulators.
[0165] Step 1004: Detect the insulator feature points in the image, the feature descriptor of each feature point, and the coordinates of each feature point in the image using a feature point algorithm.
[0166] Step 1006: Calculate the feature distance between every two feature points based on the feature descriptor of each feature point, take a pair of feature points that meets the feature distance threshold as a valid feature point matching pair, and record the offset of each feature point matching pair in the x and y directions of the coordinate axes.
[0167] Step 1008: Calculate the main direction in the offset data according to the offset of all feature point matching pairs, and perform rotation correction on the image and the feature point matching pairs in the image according to the angle of the main direction.
[0168] Step 1010: Determine whether the image includes two insulators. If it is a double string, execute step 1012; if it is a single string, execute step 1014.
[0169] Step 1012: Segment the two insulators in the image according to the offset of each feature point matching pair in the y-direction of the coordinate axis.
[0170] Step 1014: clustering the offsets in the x-direction based on the matching of the feature points inside the insulator region to obtain the period length of the insulator cap in the x-direction in the insulator.
[0171] Specifically, if there are two insulators, after the insulators are divided in step 1012 , the period length of the insulator umbrella in each insulator in the x direction is obtained in step 1014 for each insulator.
[0172] Step 1016: Cut the insulator into pieces in the horizontal direction based on the period length, and calculate the similarity between each cut local area and the local area with the same period length adjacent to the left and / or right.
[0173] Step 1018: Determine the damaged insulator cap in each insulator according to the calculated similarity and output it.
[0174] Specifically, each local area of a normal insulator after cutting has a very high similarity with the surrounding adjacent local areas, while the similarity between a damaged local area and the surrounding local areas is very low. A threshold can be set in advance, and the local areas below the set threshold can be used as the judgment output of insulator damage.
[0175] For example, if each local area has two local areas adjacent to the left and right, the average of the similarities between the local area and the two local areas adjacent to the left and right is compared with the set threshold. If it is less than or equal to the set threshold, the local area can be determined to be the location of the insulator damage and output; if a local area has only one local area adjacent to the left or right, the similarity between the local area and the local area adjacent to the left or right is calculated, and the similarity is less than or equal to the set threshold. In order to obtain the accurate location of the insulator damage, the local area adjacent to the left or right of the local area will also be calculated for similarity with the other adjacent local areas. If the similarity is still less than or equal to the set threshold, the local area can be determined to be the location of the insulator damage.
[0176] The image processing method described in the embodiments of this specification is a traditional image processing method based on feature matching, which utilizes the prior knowledge of the repeatability and periodicity of the features of the insulator and does not use deep learning technology. Therefore, it does not need to rely on collecting a large number of defect samples (the method based on deep learning relies on a large amount of labeled training data, and drone inspection images containing insulator self-explosion defects are generally difficult to collect, and the accuracy of the method based on deep learning is not high). It can also achieve the effect of fast and accurate detection of insulator defects; specifically, the defect detection problem of insulator self-explosion is modeled as a problem of repeatability judgment of texture features, and the matching results of feature descriptors are used to perform rotation correction, regional positioning, period calculation, etc. of the insulator, and finally the local similarity calculation of the image is used to judge the insulator self-explosion.
[0177] See also Figure 11 , Figure 11 A flowchart of a second image processing method provided in an embodiment of this specification is shown, which specifically includes the following steps.
[0178] Step 1102: Based on the user's call request, a picture input interface is displayed to the user, and a picture to be processed sent by the user based on the picture input interface is received.
[0179] Step 1104: Obtain a set of feature points of the target object in the image to be processed, feature vectors of the feature points in the set of feature points, and position coordinates of the feature points in the image to be processed.
[0180] Step 1106: Determine the interval length of the sub-objects in the target object based on the position coordinates of the feature points in the image to be processed.
[0181] Step 1108: Segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points.
[0182] Step 1110: Determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0183] The image processing method provided in the embodiments of this specification divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, greatly improving the detection efficiency of the target sub-objects.
[0184] The above is a schematic diagram of the second image processing method of this embodiment. It should be noted that the technical solution of the second image processing method and the technical solution of the first image processing method described above are based on the same concept. For details not described in detail in the technical solution of the second image processing method, please refer to the description of the technical solution of the first image processing method described above.
[0185] See also Figure 12 , Figure 12 A flowchart of a third image processing method provided in an embodiment of this specification is shown, which specifically includes the following steps.
[0186] Step 1202: Receive a call request sent by a user, wherein the call request carries a picture to be processed.
[0187] Step 1204: Obtain a set of feature points of the target object in the image to be processed, feature vectors of the feature points in the set of feature points, and position coordinates of the feature points in the image to be processed.
[0188] Step 1206: Determine the interval length of the sub-objects in the target object based on the position coordinates of the feature points in the image to be processed.
[0189] Step 1208: Segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points.
[0190] Step 1210: Determine a target sub-object in the target object based on the similarities between the adjacent sub-objects.
[0191] The image processing method provided in the embodiments of this specification divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, greatly improving the detection efficiency of the target sub-objects.
[0192] The above is a schematic diagram of the third image processing method of this embodiment. It should be noted that the technical solution of this third image processing method is based on the same concept as the technical solution of the first image processing method described above. For details not described in detail in the technical solution of the third image processing method, please refer to the description of the technical solution of the first image processing method described above.
[0193] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 13FIG1 shows a schematic diagram of the structure of a first image processing device provided by an embodiment of this specification. Figure 13 As shown, the device includes:
[0194] A first acquisition module 1302 is configured to acquire a set of feature points of a target object in a to-be-processed image, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the to-be-processed image;
[0195] A first determining module 1304 is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed;
[0196] A first segmentation module 1306 is configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0197] The second determining module 1308 is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0198] Optionally, the first obtaining module 1302 is further configured to:
[0199] A picture to be processed containing at least one target object is received, and a feature point set of each target object in the picture to be processed, a feature vector of the feature point in the feature point set, and the position coordinates of the feature point in the picture to be processed are obtained based on a feature detection algorithm.
[0200] Optionally, the device further includes:
[0201] a matching pair obtaining module, configured to obtain a matching pair of feature points in the feature point set based on feature vectors of the feature points;
[0202] The correction module is configured to determine an offset angle of the feature point set according to an offset of the feature point matching pair, and perform rotation correction on the image to be processed and the target object in the image to be processed according to the offset angle.
[0203] Optionally, the matching pair obtaining module is further configured to:
[0204] Calculating a feature distance between every two adjacent feature points in the feature point set based on the feature vectors of the feature points;
[0205] Two adjacent feature points whose feature distance is greater than or equal to a preset distance threshold are regarded as a feature point matching pair.
[0206] Optionally, the device further includes:
[0207] an object determination module configured to obtain offsets of all feature point matching pairs in the feature point set, and determine that the image to be processed includes a target object when the number of feature point matching pairs with offsets equal to a preset offset threshold is greater than a first number threshold;
[0208] When the number of feature point matching pairs whose offsets are greater than and less than the preset offset threshold is greater than a first number threshold, it is determined that the image to be processed includes at least two target objects.
[0209] Optionally, the device further includes:
[0210] The object segmentation module is configured to obtain a feature point matching pair of each target object in the at least two target objects, and segment the at least two target objects based on an offset of the feature point matching pair of each target object.
[0211] Optionally, the first determining module 1304 is configured to:
[0212] Based on the position coordinates of the rotationally corrected feature point matching pairs in the rotationally corrected image to be processed, the interval length of the sub-objects in the target object is determined.
[0213] Optionally, the second determining module 1308 is further configured to:
[0214] When there are two adjacent sub-objects of the segmented sub-object, obtaining a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively;
[0215] When the average of the first similarity and the second similarity is less than or equal to a preset similarity threshold, the segmented sub-object is determined as a target sub-object in the target object.
[0216] Optionally, the second determining module 1308 is further configured to:
[0217] When there is only one adjacent sub-object of the segmented sub-object, obtaining a first similarity between the segmented sub-object and the adjacent sub-object;
[0218] When the first similarity is less than or equal to a preset similarity threshold, obtaining a second similarity between the adjacent sub-object and another adjacent sub-object of the adjacent sub-object;
[0219] When the second similarity is less than or equal to a preset similarity threshold, the adjacent sub-object is determined as a target sub-object in the target object.
[0220] Optionally, the device further includes:
[0221] The target sub-object determining module is configured to determine the segmented sub-object as a target sub-object in the target object when the second similarity is greater than a preset similarity threshold.
[0222] Optionally, the image processing method is applied to insulator self-explosion detection, wherein the target object includes an insulator; or
[0223] The image processing method is applied to radiator damage detection, wherein the target object includes a radiator.
[0224] In an embodiment of the present specification, the image processing device divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, thereby greatly improving the detection efficiency of the target sub-objects.
[0225] The above is a schematic diagram of the first image processing device of this embodiment. It should be noted that the technical solution of this image processing device and the technical solution of the first image processing method described above are based on the same concept. For details not described in detail in the technical solution of this image processing device, please refer to the description of the technical solution of the first image processing method described above.
[0226] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 14 FIG. 1 shows a schematic diagram of the structure of a second image processing device provided by an embodiment of this specification. Figure 14 As shown, the device includes:
[0227] The picture receiving module 1402 is configured to display a picture input interface for the user based on a user's call request, and receive a picture to be processed sent by the user based on the picture input interface;
[0228] The second acquisition module 1404 is configured to acquire a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed;
[0229] A second determining module 1406 is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed;
[0230] A second segmentation module 1408 is configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0231] The third determining module 1410 is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0232] In an embodiment of the present specification, the image processing device divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, thereby greatly improving the detection efficiency of the target sub-objects.
[0233] The above is a schematic diagram of the second image processing device of this embodiment. It should be noted that the technical solution of this image processing device and the technical solution of the second image processing method described above are based on the same concept. For details not described in detail in the technical solution of this image processing device, please refer to the description of the technical solution of the second image processing method described above.
[0234] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 15 FIG1 shows a schematic diagram of the structure of a first image processing device provided by an embodiment of this specification. Figure 15 As shown, the device includes:
[0235] The request receiving module 1502 is configured to receive a call request sent by a user, wherein the call request carries a picture to be processed;
[0236] The third acquisition module 1504 is configured to acquire a feature point set of a target object in the image to be processed, feature vectors of feature points in the feature point set, and position coordinates of the feature points in the image to be processed;
[0237] A fourth determining module 1506 is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed;
[0238] A third segmentation module 1508 is configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points;
[0239] The fifth determining module 1510 is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects.
[0240] In an embodiment of the present specification, the image processing device divides the sub-objects in the target object by the position coordinates and feature vectors of all feature points of the target object in the image to be processed, and uses the local similarity calculation of the sub-objects in the target object to accurately obtain at least one target sub-object in the target object. It does not use a deep learning model, nor does it need to collect a large number of samples to train the deep learning model, thereby greatly improving the detection efficiency of the target sub-objects.
[0241] The above is a schematic diagram of the third image processing device of this embodiment. It should be noted that the technical solution of this image processing device and the technical solution of the third image processing method described above are based on the same concept. For details not described in detail in the technical solution of this image processing device, please refer to the description of the technical solution of the third image processing method described above.
[0242] Figure 16 16 shows a block diagram of a computing device 1600 according to one embodiment of the present disclosure. Components of the computing device 1600 include, but are not limited to, a memory 1610 and a processor 1620. The processor 1620 is connected to the memory 1610 via a bus 1630, and a database 1650 is used to store data.
[0243] Computing device 1600 also includes an access device 1640 that enables computing device 1600 to communicate via one or more networks 1660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. Access device 1640 may include one or more of any type of network interface (e.g., a network interface card (NIC)), whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0244] In one embodiment of the present specification, the above components of the computing device 1600 and Figure 16 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 16 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0245] Computing device 1600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 1600 can also be a mobile or stationary server.
[0246] The processor 1620 is configured to execute the following computer-executable instructions, wherein the processor implements the steps of the image processing method when executing the computer-executable instructions.
[0247] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-mentioned image processing method.
[0248] An embodiment of the present specification further provides a computer-readable storage medium storing computer instructions, which implement the steps of the image processing method when executed by a processor.
[0249] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-mentioned image processing method.
[0250] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0251] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying 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), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0252] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0253] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0254] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for processing an image, comprising: Obtaining a set of feature points of a target object in a to-be-processed image, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the to-be-processed image; Determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed; Segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; Determining a target sub-object in the target object based on the similarity between the adjacent sub-objects, wherein determining the target sub-object in the target object based on the similarity between the adjacent sub-objects includes: when there are two adjacent sub-objects of the segmented sub-object, obtaining a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively; and when an average of the first similarity and the second similarity is less than or equal to a preset similarity threshold, determining the segmented sub-object as the target sub-object in the target object.
2. The image processing method according to claim 1, wherein obtaining a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed comprises: A picture to be processed containing at least one target object is received, and a feature point set of each target object in the picture to be processed, a feature vector of the feature point in the feature point set, and the position coordinates of the feature point in the picture to be processed are obtained based on a feature detection algorithm.
3. The image processing method according to claim 1, before determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed, further comprising: Obtaining feature point matching pairs in the feature point set based on feature vector calculation of the feature points; An offset angle of the feature point set is determined according to an offset of the feature point matching pair, and rotation correction is performed on the image to be processed and a target object in the image to be processed according to the offset angle.
4. The image processing method according to claim 3, wherein the step of calculating the feature point matching pairs in the feature point set based on the feature vectors of the feature points comprises: Calculating a feature distance between every two adjacent feature points in the feature point set based on the feature vectors of the feature points; Two adjacent feature points whose feature distance is greater than or equal to a preset distance threshold are regarded as a feature point matching pair.
5. The image processing method according to claim 3, before determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed, further comprising: Obtaining offsets of all feature point matching pairs in the feature point set, and determining that the image to be processed includes a target object when the number of feature point matching pairs whose offsets are equal to a preset offset threshold is greater than a first number threshold; When the number of feature point matching pairs whose offsets are greater than and less than the preset offset threshold is greater than a first number threshold, it is determined that the image to be processed includes at least two target objects.
6. The image processing method according to claim 5, further comprising: after determining that the image to be processed includes at least two target objects: A feature point matching pair of each target object in the at least two target objects is obtained, and the at least two target objects are segmented based on an offset of the feature point matching pair of each target object.
7. The image processing method according to claim 6, wherein determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed comprises: Based on the position coordinates of the rotationally corrected feature point matching pairs in the rotationally corrected image to be processed, the interval length of the sub-objects in the target object is determined.
8. The image processing method according to claim 1, further comprising: When there is only one adjacent sub-object of the segmented sub-object, obtaining a first similarity between the segmented sub-object and the adjacent sub-object; When the first similarity is less than or equal to a preset similarity threshold, obtaining a second similarity between the adjacent sub-object and another adjacent sub-object of the adjacent sub-object; When the second similarity is less than or equal to a preset similarity threshold, the adjacent sub-object is determined as a target sub-object in the target object.
9. The image processing method according to claim 8, further comprising: after obtaining the second similarity between the adjacent sub-object and another adjacent sub-object of the adjacent sub-object; When the second similarity is greater than a preset similarity threshold, the segmented sub-object is determined as a target sub-object in the target object.
10. The image processing method according to any one of claims 1 to 9, wherein the image processing method is applied to insulator self-explosion detection, wherein: The target object includes an insulator; or The image processing method is applied to radiator damage detection, wherein the target object includes a radiator.
11. A method for processing an image, comprising: Displaying a picture input interface for the user based on a user's call request, and receiving a picture to be processed sent by the user based on the picture input interface; Obtaining a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed; Determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed; Segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; Determining a target sub-object in the target object based on the similarity between the adjacent sub-objects, wherein determining the target sub-object in the target object based on the similarity between the adjacent sub-objects includes: when there are two adjacent sub-objects of the segmented sub-object, obtaining a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively; and when an average of the first similarity and the second similarity is less than or equal to a preset similarity threshold, determining the segmented sub-object as the target sub-object in the target object.
12. A method for processing an image, comprising: Receive a call request sent by a user, wherein the call request carries a picture to be processed; Obtaining a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed; Determining the interval length of sub-objects in the target object based on the position coordinates of the feature points in the image to be processed; Segmenting the sub-objects in the target object according to the interval length, and calculating the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; Determining a target sub-object in the target object based on the similarity between the adjacent sub-objects, wherein determining the target sub-object in the target object based on the similarity between the adjacent sub-objects includes: when there are two adjacent sub-objects of the segmented sub-object, obtaining a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively; and when an average of the first similarity and the second similarity is less than or equal to a preset similarity threshold, determining the segmented sub-object as the target sub-object in the target object.
13. An image processing device, comprising: A first acquisition module is configured to acquire a set of feature points of a target object in a to-be-processed image, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the to-be-processed image; A first determining module is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed; a first segmentation module configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; The second determination module is configured to determine the target sub-object in the target object based on the similarity between the adjacent sub-objects, wherein the second determination module is further configured to obtain a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively when there are two adjacent sub-objects of the segmented sub-object; and determine the segmented sub-object as the target sub-object in the target object when the average of the first similarity and the second similarity is less than or equal to a preset similarity threshold.
14. An image processing device, comprising: A picture receiving module is configured to display a picture input interface for the user based on a user's call request, and receive a picture to be processed sent by the user based on the picture input interface; A second acquisition module is configured to acquire a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed; A second determining module is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed; a second segmentation module configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; A third determination module is configured to determine a target sub-object in the target object based on the similarity between the adjacent sub-objects, wherein the third determination module is further configured to, when there are two adjacent sub-objects of the segmented sub-object, obtain a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively; and when an average of the first similarity and the second similarity is less than or equal to a preset similarity threshold, determine the segmented sub-object as the target sub-object in the target object.
15. An image processing device, comprising: A request receiving module is configured to receive a call request sent by a user, wherein the call request carries a picture to be processed; A third acquisition module is configured to acquire a set of feature points of a target object in the image to be processed, feature vectors of feature points in the set of feature points, and position coordinates of the feature points in the image to be processed; A fourth determining module is configured to determine the interval length of the sub-objects in the target object based on the position coordinates of the feature point in the image to be processed; a third segmentation module, configured to segment the sub-objects in the target object according to the interval length, and calculate the similarity between adjacent sub-objects in the target object based on the feature vectors of the feature points; The fifth determination module is configured to determine the target sub-object in the target object based on the similarity between the adjacent sub-objects, wherein the fifth determination module is further configured to obtain a first similarity and a second similarity between the segmented sub-object and the two adjacent sub-objects respectively when there are two adjacent sub-objects of the segmented sub-object; and determine the segmented sub-object as the target sub-object in the target object when the average of the first similarity and the second similarity is less than or equal to a preset similarity threshold.
16. A computing device comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the instructions are executed by the processor, the steps of the image processing method described in any one of claims 1-10, 11, and 12 are implemented.
17. A computer-readable storage medium storing computer instructions, wherein when the instructions are executed by a processor, the steps of the image processing method according to any one of claims 1-10, 11, and 12 are implemented.
Citation Information
Patent Citations
Video image sequence-based insulator tracking monitor method
CN106060466A
Insulator positioning and string falling detection method
CN111754465A