Method and device for identifying tower type of communication iron tower
By converting RGB value to YUV value and filtering the communication tower pictures and combining with tower modeling, the problems of low recognition accuracy and slow efficiency in the existing technology are solved, efficient and accurate tower type recognition is achieved, and hardware and manpower requirements are reduced.
Patent Information
- Application Number
- CN202410105563.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2025-08-08
AI Technical Summary
When identifying communication tower tower types in the prior art, there are problems such as low recognition accuracy, slow efficiency, high computing power and storage requirements, and high technical requirements for staff.
By extracting pixel information from the communication tower image to be identified, converting it to RGB value and filtering out effective pixels, performing tower type simulation modeling, and using YUV value to calculate the number of continuous blank areas to match the tower type.
It improves the accuracy and efficiency of communication tower tower recognition, reduces the computing power and storage requirements of the server, and reduces the technical requirements for staff.
Smart Images

Figure CN120451764A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for identifying the type of a communication tower. Background Art
[0002] The current methods for identifying communication towers are mainly: (1) obtaining information from communication tower image slices and using target detection algorithms such as single-stage models and two-stage models to match communication tower features, thereby obtaining the iron shape of the communication tower; (2) using a combination of photos and laser rangefinders to determine the size and position coordinates of the target detection object and identify the iron shape of the communication tower. However, both of the above methods have certain defects. For example, both the single-stage model network and the two-stage model network require preliminary model training, and the training scheme directly affects the final tower type recognition result. In addition, the single-stage model network has a simple structure, and the accuracy of the identified communication tower iron shape is low. Compared with the single-stage model, the two-stage model has a complex network structure and relatively high accuracy, but the recognition speed is slow, which affects the recognition efficiency. In addition, both the single-stage model network and the two-stage model network need to be centrally deployed on the server, which has high requirements for computing power and storage, and is not conducive to the lightweight requirements of distributed applications and processing. The combination of photos and laser rangefinders has high technical requirements for staff, and lacks operational convenience and fault tolerance. Summary of the Invention
[0003] The technical problem to be solved by the present invention is: the present invention provides a method and device for identifying the type of communication tower, which improves the accuracy of communication tower type identification while improving the identification efficiency, and reduces the computing power and storage requirements of the server and the technical requirements for staff.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0005] In a first aspect, the present invention provides a method for identifying the type of a communication tower, comprising:
[0006] Obtain a communication tower image to be identified, extract pixel information from the communication tower image to be identified, and obtain pixel information including RGB values;
[0007] Converting the RGB values into YUV values, and screening out valid pixels from the communication tower picture to be identified according to the YUV values, performing tower type simulation modeling according to the valid pixels, and obtaining a tower type simulation diagram;
[0008] Calculate the number of continuous blank areas in the tower simulation diagram, and match the corresponding communication tower type according to the number of continuous blank areas.
[0009] The beneficial effects of the present invention are as follows: instead of using a single-stage model network or a two-stage model network to identify the type of a communication tower, the RGB values in the image of the communication tower to be identified are directly converted into YUV values, that is, grayscale pixel processing is performed on the image of the communication tower to be identified, lightweight processing is achieved, and valid pixels are screened out therefrom, pixel data is reduced and processing efficiency is improved, tower type simulation modeling is performed based on the valid pixels, the accuracy of the tower type simulation diagram is ensured, the type of the communication tower is determined by the number of continuous blank areas in the tower type simulation diagram, the communication tower type recognition process is simplified, the recognition speed is improved, the recognition accuracy is ensured, and at the same time, the computing power requirements and storage requirements of the server and the technical requirements for the staff are reduced.
[0010] Optionally, the pixel information includes X-axis coordinate data, Y-axis coordinate data, and pixel values, and extracting pixel information from the communication tower image to be identified to obtain pixel information including RGB values includes:
[0011] According to a first conversion formula, the X-axis coordinate data, the Y-axis coordinate data, and the pixel value are converted into corresponding RGB values, wherein the first conversion formula is:
[0012] pixel value & = Picture1.Point (X-axis coordinate data, Y-axis coordinate data) or
[0013] pixel value = (Blue*&H10000)+(Green*&H100&)+Red
[0014] Red = pixel value & Mod 256
[0015] Green = ((pixel value & And & HFF00) / 256) Mod 256
[0016] Blue = ((pixel value & And & HFF0000) / 65536) Mod 256
[0017] Wherein, j represents the X-axis coordinate data, and i represents the Y-axis coordinate data.
[0018] According to the above description, the first conversion formula can realize the conversion between X-axis coordinate data, Y-axis coordinate data, pixel value and RGB value, ensuring the integrity of the obtained RGB value while improving the comprehensiveness of pixel information.
[0019] Optionally, converting the RGB value into a YUV value includes:
[0020] According to a second conversion formula, the RGB value is converted into a YUV value, wherein the second conversion formula is:
[0021] Y value=0.2990*Red+0.5870*Green+0.1140*Blue
[0022] U value=-0.1687*Red-0.3313*Green+0.5000*Blue
[0023] V value=0.5000*Red-0.4187*Green-0.0813*Blue.
[0024] According to the above description, the RGB value is converted into a YUV value according to the second conversion formula, that is, the brightness parameter and the chromaticity parameter are obtained, which facilitates the subsequent screening of valid pixels and ensures the rationality of the valid pixels.
[0025] Optionally, the filtering out valid pixels from the image of the communication tower to be identified according to the YUV value includes:
[0026] Calculate the left edge pixel and the right edge pixel of the communication tower body in the communication tower picture to be identified according to the Y value in the YUV value, and filter out the Y value within a preset range from the YUV value;
[0027] Substitute the left edge pixel of the communication tower body, the right edge pixel of the communication tower body and the Y value in the preset interval into the effective pixel formula to calculate and obtain the effective pixel, where the effective pixel formula is:
[0028] Effective pixels = Y value within the preset range * a + pixels on the left edge of the communication tower + pixels on the right edge of the communication tower;
[0029] Where a is the proportional coefficient of the Y value within the preset range.
[0030] According to the above description, effective pixels are calculated by Y value, that is, calculated according to brightness, which fully considers the pixel characteristics of the communication tower itself. The effective pixels include the pixels on the left edge of the communication tower body, the pixels on the right edge of the communication tower body, and the Y values within the preset range. The effective pixels are screened based on the pixel characteristics of the edge of the communication tower body in practice, ensuring the rationality of the effective pixels while reducing pixel data and improving processing efficiency.
[0031] Optionally, the calculating, according to the Y value in the YUV value, the left edge pixel of the communication tower body and the right edge pixel of the communication tower body in the image of the communication tower to be identified includes:
[0032] Calculate a first Y value difference between the Y value of each pixel and the Y value of the next pixel of the current pixel, and determine whether it is the right edge of the communication tower body based on the first Y value difference. If the first Y value difference is greater than a first threshold, it is the right edge of the communication tower body, and obtain the corresponding communication tower body right edge pixel, where the Y value of the next pixel is the same as the X axis of the current pixel and the Y axis is the Y value of the next row of the Y axis of the current pixel;
[0033] Calculate the second Y value difference between the Y value of each pixel and the Y value of the previous pixel of the current pixel, and determine whether it is the left edge of the communication tower body based on the second Y value difference. If the second Y value difference is greater than a second threshold, it is the left edge of the communication tower body, and obtain the corresponding left edge pixel of the communication tower body, where the Y value of the previous pixel is the same as the X axis of the current pixel and the Y axis is the Y value of the previous row of the Y axis of the current pixel.
[0034] According to the above description, when calculating the left edge pixels of the communication tower body and the right edge pixels of the communication tower body, the corresponding calculation methods are used to ensure the accuracy and rationality of the calculated left edge pixels of the communication tower body and the right edge pixels of the communication tower body.
[0035] Optionally, the filtering out of the Y values within a preset range from the YUV values includes:
[0036] The Y values in the YUV values are sorted in descending order to obtain sorted Y values, and top 10% of the Y values are screened out from the sorted Y values.
[0037] According to the above description, the Y values within the preset range are the top 10% of the Y values. This fully considers that in actual applications, the top 10% of the Y values are generally dark colors, thereby further improving the accuracy of subsequent valid pixels.
[0038] Optionally, performing tower simulation modeling according to the effective pixels to obtain a tower simulation diagram includes:
[0039] According to the effective pixels, tower-shaped simulation modeling is performed through the AddShape method to obtain a tower-shaped simulation diagram.
[0040] According to the above description, the tower simulation modeling is performed through the AddShape method. The AddShape method can optimize and supplement various details of the tower simulation diagram when performing tower simulation modeling, thereby improving the authenticity and comprehensiveness of the tower simulation diagram.
[0041] Optionally, performing tower simulation modeling according to the effective pixels to obtain a tower simulation diagram includes:
[0042] The X pixel coordinate and Y pixel coordinate of the effective pixel are converted into corresponding pixel longitude and pixel latitude respectively by using the first geographic coordinate formula and the second geographic coordinate formula. The tower simulation model is performed in a map dotting manner according to the pixel longitude and pixel latitude to obtain a tower simulation diagram, wherein the first geographic coordinate formula is:
[0043] Pixel longitude = initial longitude + geographic coordinate sample spacing coefficient * X pixel coordinate;
[0044] The second geographic coordinate formula is:
[0045] Pixel latitude = initial dimension - geographic coordinate sample spacing coefficient * Y pixel coordinate.
[0046] According to the above description, by converting the X pixel coordinates and Y pixel coordinates of the effective pixels into the corresponding pixel longitude and pixel dimension, the tower simulation modeling is performed in the form of map dotting to ensure the accuracy of the tower simulation map.
[0047] Optionally, calculating the number of continuous blank areas in the tower type simulation diagram and matching a corresponding communication tower type according to the number of continuous blank areas includes:
[0048] A pixel ray traversal is performed on each pixel point in the tower-type simulation diagram in four directions: up, down, left and right. When pixel ray traversal is performed in each direction, if there is a pixel point, the pixel ray traversal in the current direction is terminated, and the coordinates of the blank pixel points in the current direction are recorded. The blank distance is calculated based on the blank pixel point coordinates, and the number of continuous blank areas is calculated based on the blank distance and blank pixel point coordinates in each direction. When the number of continuous blank areas is greater than the first blank number threshold, the tower type of the communication tower is an angle steel tower. Otherwise, the tower type of the communication tower is a single-tube tower.
[0049] According to the above description, when calculating the number of continuous blank areas in the tower simulation diagram, pixel rays are traversed in the four directions of up, down, left and right for each pixel point to ensure the comprehensiveness of the calculated number of continuous blank areas, thereby improving the accuracy of the matched communication tower type.
[0050] In a second aspect, the present invention provides a device for identifying the type of a communication tower, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for identifying the type of a communication tower as described in the first aspect is implemented.
[0051] Among them, the technical effect corresponding to the device for identifying the type of a communication tower provided by the second aspect refers to the relevant description of the method for identifying the type of a communication tower provided by the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flow chart of a method for identifying the type of a communication tower provided in this embodiment;
[0053] Figure 2 A schematic diagram of the overall process of a method for identifying the type of a communication tower provided in this embodiment;
[0054] Figure 3 This is a table diagram showing the Y value distribution pattern and corresponding color scale of the communication tower image involved in this embodiment;
[0055] Figure 4 The tower type of the communication tower involved in this embodiment is a real-life diagram of an angle steel tower and a corresponding tower type simulation diagram;
[0056] Figure 5 The tower type of the communication tower involved in this embodiment is a real-life diagram of a single-tube tower and a corresponding tower simulation diagram;
[0057] Figure 6 A schematic diagram of the structure of a device for identifying the type of a communication tower provided in this embodiment.
[0058] [Description of Reference Numerals]
[0059] 1. A device for identifying the type of a communication tower;
[0060] 2. Processor;
[0061] 3. Storage. DETAILED DESCRIPTION
[0062] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0063] Example 1
[0064] Please refer to Figures 1 to 5 The present invention provides a method for identifying the type of a communication tower, comprising the steps of:
[0065] S1. Obtain a picture of a communication tower to be identified, extract pixel information from the picture of the communication tower to be identified, and obtain pixel information including RGB values;
[0066] In this embodiment, the image of the communication tower to be identified is taken by a tower surveyor. When pixel information is extracted from the image of the communication tower to be identified, the tower body area of the image of the communication tower to be identified will be locked first, and pixel information of the tower body area will be extracted, wherein the pixel information includes but is not limited to RGB values, X-axis coordinate data, Y-axis coordinate data and pixel values.
[0067] At this time, the pixel information in step S1 includes X-axis coordinate data, Y-axis coordinate data and pixel value, and the pixel information extraction of the communication tower image to be identified to obtain pixel information including RGB values includes:
[0068] S11. Convert the X-axis coordinate data, the Y-axis coordinate data, and the pixel value into corresponding RGB values according to a first conversion formula, wherein the first conversion formula is:
[0069] pixel value & = Picture1.Point (X-axis coordinate data, Y-axis coordinate data) or
[0070] pixel value = (Blue*&H10000)+(Green*&H100&)+Red
[0071] Red = pixel value & Mod 256
[0072] Green = ((pixel value & And & HFF00) / 256) Mod 256
[0073] Blue = ((pixel value & And & HFF0000) / 65536) Mod 256
[0074] Wherein, j represents the X-axis coordinate data, and i represents the Y-axis coordinate data.
[0075] In this embodiment, if Figure 2 As shown, the obtained X-axis coordinate data, Y-axis coordinate data and pixel value are converted into RGB values according to the first conversion formula. At the same time, according to the first conversion formula, it can be known that the inverse conversion can also be performed according to the RGB value to obtain complete pixel information, as shown in Table 1:
[0076] Table 1. RGB value pixel information table
[0077]
[0078]
[0079] S2, converting the RGB value into a YUV value, and filtering out valid pixels from the communication tower picture to be identified according to the YUV value, carrying out tower type simulation modeling according to the valid pixels, and obtaining a tower type simulation diagram;
[0080] In this embodiment, since there are other pixel data besides the communication tower itself in the image of the communication tower to be identified, such as background pixel data, light color pixel data, etc., Figure 2 As shown, the RGB value obtained in step S1 needs to be converted into a YUV value, and the effective pixels in the image of the communication tower to be identified are extracted according to the YUV value, so as to perform tower simulation modeling with the effective pixels to obtain a tower simulation diagram.
[0081] At this time, the conversion of the RGB value into a YUV value in step S2 includes:
[0082] S21. Convert the RGB value into a YUV value according to a second conversion formula, wherein the second conversion formula is:
[0083] Y value=0.2990*Red+0.5870*Green+0.1140*Blue
[0084] U value=-0.1687*Red-0.3313*Green+0.5000*Blue
[0085] V value=0.5000*Red-0.4187*Green-0.0813*Blue.
[0086] In this embodiment, if Figure 2 As shown, the RGB value is converted into a YUV value according to the second conversion formula, and the RGB value in Table 1 is converted into the corresponding YUV value, as shown in Table 2:
[0087] Table 2. YUV value pixel information table
[0088]
[0089]
[0090] At this time, the step S2 of filtering out valid pixels from the image of the communication tower to be identified according to the YUV value includes:
[0091] S22, respectively calculating the left edge pixel of the communication tower body and the right edge pixel of the communication tower body in the communication tower picture to be identified according to the Y value in the YUV value, and filtering out the Y value within a preset range from the YUV value;
[0092] In this embodiment, if Figure 2As shown, the valid pixels include the left edge pixels of the communication tower body, the right edge pixels of the communication tower body and the Y value within the preset range, that is, the valid pixels refer to the outline pixel information of the communication tower body.
[0093] At this time, the step S22 of respectively calculating the left edge pixel of the communication tower body and the right edge pixel of the communication tower body in the image of the communication tower to be identified according to the Y value in the YUV value includes:
[0094] S221, calculating a first Y value difference between the Y value of each pixel and the Y value of the next pixel of the current pixel, and determining whether it is the right edge of the communication tower body according to the first Y value difference; if the first Y value difference is greater than a first threshold, it is the right edge of the communication tower body, and obtaining the corresponding right edge pixel of the communication tower body, wherein the Y value of the next pixel is the same as the X axis of the current pixel and the Y axis is the Y value of the next row of the Y axis of the current pixel;
[0095] S222. Calculate a second Y value difference between the Y value of each pixel and the Y value of the previous pixel of the current pixel, and determine whether it is the left edge of the communication tower body based on the second Y value difference. If the second Y value difference is greater than a second threshold, it is the left edge of the communication tower body, and obtain the corresponding left edge pixel of the communication tower body, where the Y value of the previous pixel is the same as the X axis of the current pixel and the Y axis is the Y value of the previous row of the Y axis of the current pixel.
[0096] In this embodiment, if Figure 2 As shown, when calculating the left edge pixels and the right edge pixels of the communication tower body, the calculation is based on the Y value in the YUV value, and the calculation methods are different. When calculating the right edge pixels of the communication tower body, the first Y value difference between the Y value of each pixel and the Y value of the next pixel of the current pixel is calculated, and the Y value of the next pixel is the same as the X axis of the current pixel, and the Y axis is the Y value of the next row, that is, the right edge pixel of the communication tower body is actually deeper than the left pixel. When the first Y value difference is greater than the first threshold, it is considered to be the right edge pixel of the communication tower body. Right edge, at this time, the first threshold is 190, and when calculating the left edge pixels of the communication tower body, the second Y value difference between the Y value of each pixel and the Y value of the previous pixel of the current pixel is calculated, and the Y value of the previous pixel is the same as the X axis of the current pixel, and the Y axis is the Y value of the previous row, that is, the left edge pixel of the communication tower body is actually deeper than the right pixel. When the second Y value difference is greater than the second threshold, it is considered to be the left edge of the communication tower body. At this time, the second threshold is 173. The specific first threshold and second threshold can be adjusted according to actual conditions.
[0097] At this time, the step S22 of filtering out the Y value within the preset range from the YUV value includes:
[0098] S223 , sorting the Y values in the YUV values in descending order to obtain sorted Y values, and screening out top 10% of the Y values from the sorted Y values.
[0099] In this embodiment, if Figure 3 As shown in the figure, in the actual scene, the Y value distribution pattern of the communication tower image corresponds to the color level. Therefore, by sorting the Y values in the YUV values in descending order, the top 10% of the Y values are filtered out from the sorted Y values, that is, the top 10% of the Y values are filtered out, that is, the color level corresponding to the Y value is filtered to obtain the Y value within the preset range.
[0100] S23, substituting the left edge pixel of the communication tower body, the right edge pixel of the communication tower body and the Y value in the preset interval into the effective pixel formula for calculation to obtain effective pixels, wherein the effective pixel formula is:
[0101] Effective pixels = Y value within the preset range * a + pixels on the left edge of the communication tower + pixels on the right edge of the communication tower;
[0102] Where a is the proportional coefficient of the Y value within the preset range.
[0103] In this embodiment, the proportional coefficient of the Y value within the preset range in the effective pixel formula is 11.13%, wherein the proportional coefficient is calculated based on the hue proportion corresponding to each color level. Therefore, the proportional coefficient can be adjusted according to actual conditions.
[0104] At this time, the tower simulation modeling is performed according to the effective pixels in step S2 to obtain the tower simulation diagram including:
[0105] S24. Perform tower-shaped simulation modeling according to the effective pixels through the AddShape method to obtain a tower-shaped simulation diagram.
[0106] At this time, the tower simulation modeling is performed according to the effective pixels in step S2 to obtain the tower simulation diagram including:
[0107] S25. Convert the X pixel coordinate and the Y pixel coordinate of the effective pixel into corresponding pixel longitude and pixel latitude respectively using a first geographic coordinate formula and a second geographic coordinate formula. Perform tower simulation modeling by dotting the pixel longitude and pixel latitude on a map to obtain a tower simulation diagram. The first geographic coordinate formula is:
[0108] Pixel longitude = initial longitude + geographic coordinate sample spacing coefficient * X pixel coordinate;
[0109] The second geographic coordinate formula is:
[0110] Pixel latitude = initial dimension - geographic coordinate sample spacing coefficient * Y pixel coordinate.
[0111] In this embodiment, if Figure 2 As shown, when performing tower simulation modeling, it can be done through the AddShape method or by converting the X pixel coordinates and Y pixel coordinates of the effective pixels into the corresponding pixel longitude and pixel latitude respectively, and then dotting the map according to the pixel longitude and pixel latitude. The geographic coordinate sample spacing coefficient of the pixel longitude and pixel latitude is 0.001, that is, one unit is 100km. The specific tower simulation image and the corresponding tower real scene image obtained by performing tower simulation modeling based on effective pixels are shown as follows: Figures 4 and 5 shown.
[0112] S3. Calculate the number of continuous blank areas in the tower type simulation diagram, and match the corresponding communication tower type according to the number of continuous blank areas.
[0113] At this time, the step S3 of calculating the number of continuous blank areas in the tower type simulation diagram and matching the corresponding communication tower type according to the number of continuous blank areas includes:
[0114] S31. Perform pixel ray traversal in the four directions of up, down, left and right for each pixel point in the tower-type simulation diagram. When performing pixel ray traversal in each direction, if there is a pixel point, the pixel ray traversal in the current direction is terminated, and the coordinates of the blank pixel points in the current direction are recorded. The blank distance is calculated based on the blank pixel point coordinates. The number of continuous blank areas is calculated based on the blank distance and blank pixel point coordinates in each direction. When the number of continuous blank areas is greater than the first blank number threshold, the tower type of the communication tower is an angle steel tower. Otherwise, the tower type of the communication tower is a single-tube tower.
[0115] In this embodiment, when calculating the number of continuous blank areas in the pyramid simulation diagram, pixel rays are traversed in the four directions of up, down, left, and right for each pixel point. If a pixel point exists, the pixel ray traversal in the current direction is terminated, and the coordinates of the blank pixel point in the current direction are recorded to calculate the blank distance in the ray direction and mark the blank area number. As long as the coordinates of the blank pixel point have been traversed by the pixel ray before, the blank area number of the blank pixel point remains unchanged and is automatically skipped to the next pixel point for pixel ray traversal, as shown in Table 4, an example of pixel ray traversal:
[0116] Table 4. Pixel ray traversal example table
[0117]
[0118]
[0119] The number of continuous blank areas is calculated based on the blank distance and the coordinates of the blank pixel points. The number of continuous blank areas can also be counted based on the blank area numbers, and the obtained number of continuous blank areas is compared with the first blank number threshold. At this time, the first blank number threshold is 100, that is, when the number of continuous blank areas is greater than 100, the communication tower type is an angle steel tower, otherwise, it is a single-tube tower. The specific first blank number threshold can be adjusted according to actual conditions.
[0120] Example 2
[0121] Please refer to Figure 6 A device 1 for identifying the type of a communication tower includes a memory 3, a processor 2, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps in the above-mentioned embodiment 1 are implemented.
[0122] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art will be able to understand the specific structures and variations of these systems / devices based on the methods described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the methods of the above embodiments of the present invention are within the scope of protection of the present invention.
[0123] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions.
[0125] It should be noted that, in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims enumerating several means, several of these means may be embodied by one and the same hardware. The use of the words first, second, third etc. is for convenience only and does not indicate any order. These words may be understood as part of the component name.
[0126] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0127] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments after learning the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0128] Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if such modifications and variations fall within the scope of the claims and their equivalents, the present invention shall also include such modifications and variations.
Claims
1. A method for identifying the type of a communication tower, characterized in that: include: Obtain a communication tower image to be identified, extract pixel information from the communication tower image to be identified, and obtain pixel information including RGB values; Converting the RGB values into YUV values, and screening out valid pixels from the image of the communication tower to be identified according to the YUV values, performing tower type simulation modeling according to the valid pixels, and obtaining a tower type simulation diagram; Calculate the number of continuous blank areas in the tower type simulation diagram, and match the corresponding communication tower type according to the number of continuous blank areas.
2. A method for identifying the type of a communication tower according to claim 1, characterized in that: The pixel information includes X-axis coordinate data, Y-axis coordinate data and pixel values. The pixel information extraction of the communication tower image to be identified to obtain pixel information including RGB values includes: According to a first conversion formula, the X-axis coordinate data, the Y-axis coordinate data, and the pixel value are converted into corresponding RGB values, wherein the first conversion formula is: pixel value & = Picture1.Point (X-axis coordinate data, Y-axis coordinate data) or pixel value = (Blue*&H10000)+(Green*&H100&)+Red Red = pixel value & Mod 256 Green = ((pixel value & And & HFF00) / 256) Mod 256 Blue = ((pixel value & And & HFF0000) / 65536) Mod 256 Wherein, j represents the X-axis coordinate data, and i represents the Y-axis coordinate data.
3. The method for identifying the type of a communication tower according to claim 1, wherein: The converting of the RGB value into a YUV value comprises: According to a second conversion formula, the RGB value is converted into a YUV value, wherein the second conversion formula is: Y value=0.2990*Red+0.5870*Green+0.1140*Blue U value=-0.1687*Red-0.3313*Green+0.5000*Blue V value=0.5000*Red-0.4187*Green-0.0813*Blue.
4. The method for identifying the type of a communication tower according to claim 1, wherein: The step of selecting valid pixels from the image of the communication tower to be identified according to the YUV value includes: Calculate the left edge pixel and the right edge pixel of the communication tower body in the communication tower picture to be identified according to the Y value in the YUV value, and filter out the Y value within a preset range from the YUV value; Substitute the left edge pixel of the communication tower body, the right edge pixel of the communication tower body and the Y value in the preset interval into the effective pixel formula to calculate and obtain the effective pixel, where the effective pixel formula is: Effective pixels = Y value within the preset range * a + pixels on the left edge of the communication tower + pixels on the right edge of the communication tower; Where a is the proportional coefficient of the Y value within the preset range.
5. The method for identifying the type of a communication tower according to claim 4, wherein: The calculating, according to the Y value in the YUV value, respectively the left edge pixel of the communication tower body and the right edge pixel of the communication tower body in the image of the communication tower to be identified comprises: Calculate a first Y value difference between the Y value of each pixel and the Y value of the next pixel of the current pixel, and determine whether it is the right edge of the communication tower body based on the first Y value difference. If the first Y value difference is greater than a first threshold, it is the right edge of the communication tower body, and obtain the corresponding communication tower body right edge pixel, where the Y value of the next pixel is the same as the X axis of the current pixel and the Y axis is the Y value of the next row of the Y axis of the current pixel; Calculate the second Y value difference between the Y value of each pixel and the Y value of the previous pixel of the current pixel, and determine whether it is the left edge of the communication tower body based on the second Y value difference. If the second Y value difference is greater than a second threshold, it is the left edge of the communication tower body, and obtain the corresponding left edge pixel of the communication tower body, where the Y value of the previous pixel is the same as the X axis of the current pixel and the Y axis is the Y value of the previous row of the Y axis of the current pixel.
6. The method for identifying the type of a communication tower according to claim 1, wherein: The step of filtering out the Y value within the preset range from the YUV value includes: The Y values in the YUV values are sorted in descending order to obtain sorted Y values, and top 10% of the Y values are screened out from the sorted Y values.
7. The method for identifying the type of a communication tower according to claim 1, wherein: The tower-shaped simulation modeling is performed according to the effective pixels to obtain a tower-shaped simulation diagram, which includes: According to the effective pixels, tower-shaped simulation modeling is performed through the AddShape method to obtain a tower-shaped simulation diagram.
8. The method for identifying the type of a communication tower according to claim 1, wherein: The tower-shaped simulation modeling is performed according to the effective pixels to obtain a tower-shaped simulation diagram, which includes: The X pixel coordinate and Y pixel coordinate of the effective pixel are converted into corresponding pixel longitude and pixel latitude respectively by using the first geographic coordinate formula and the second geographic coordinate formula. The tower simulation model is performed in a map dotting manner according to the pixel longitude and pixel latitude to obtain a tower simulation diagram, wherein the first geographic coordinate formula is: Pixel longitude = initial longitude + geographic coordinate sample spacing coefficient * X pixel coordinate; The second geographic coordinate formula is: Pixel latitude = initial dimension - geographic coordinate sample spacing coefficient * Y pixel coordinate.
9. The method for identifying the type of a communication tower according to claim 1, wherein: Calculating the number of continuous blank areas in the tower type simulation diagram and matching the corresponding communication tower type according to the number of continuous blank areas includes: A pixel ray traversal is performed on each pixel point in the tower-type simulation diagram in four directions: up, down, left and right. When pixel ray traversal is performed in each direction, if there is a pixel point, the pixel ray traversal in the current direction is terminated, and the coordinates of the blank pixel points in the current direction are recorded. The blank distance is calculated based on the blank pixel point coordinates, and the number of continuous blank areas is calculated based on the blank distance and blank pixel point coordinates in each direction. When the number of continuous blank areas is greater than the first blank number threshold, the tower type of the communication tower is an angle steel tower. Otherwise, the tower type of the communication tower is a single-tube tower.
10. A device for identifying the type of a communication tower, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.